62 return "register_file";
68 auto mem_dimension =
HLS->
Param->getOption<
unsigned int>(OPT_context_switch);
69 auto dimension =
ceil_log2(
HLS->
Param->getOption<
unsigned long long int>(OPT_context_switch));
75 if(selector_port !=
nullptr)
77 selector_port->
type_resize(static_cast<unsigned>(dimension));
79 GetPointer<module>(reg)->SetParameter(
"n_elements",
STR(mem_dimension));
80 for(
unsigned int j = 0; j < GetPointer<module>(reg)->get_in_port_size();
84 std::string port_name = GetPointer<port_o>(port_i)->get_id();
Data structure representing the entire HLS information.
const ParameterConstRef Param
class containing all the parameters
Class managing the register binding.
mathematical utility function not provided by standard libraries
virtual structural_objectRef find_member(const std::string &id, so_kind type, const structural_objectRef owner) const =0
Return the object named id of a given type which belongs to or it is associated with the object...
Class specification of the manager of the technology library data structures.
~reg_binding_cs() override
Destructor.
hlsRef HLS
HLS data-structure.
#define STR(s)
Macro which performs a lexical_cast to a string.
void specialise_reg(structural_objectRef ®, unsigned int r) override
Specialise a register according to the type of the variables crossing it.
T ceil_log2(T x)
Return the smallest n such that 2**n >= X.
std::string GetRegisterFUName(unsigned int i) override
return the name of register to be used
virtual void specialise_reg(structural_objectRef ®, unsigned int r)
Specialise a register according to the type of the variables crossing it.
This file collects some utility functions and macros.
void type_resize(unsigned long long new_bit_size)
Just resize the size of the bits of the object.
reg_binding_cs(const hlsRef &HLS, const HLS_managerRef HLSMgr_)
Constructor.
This class describes all classes used to represent a structural object.
this class is used to manage the command-line or XML options.
#define SELECTOR_REGISTER_FILE
Class implementation of the structural_manager.
Datastructure to describe functions allocation in high-level synthesis.
Data structure definition for high-level synthesis flow.
HLS specialization of generic_device.