46 #ifndef REG_BINDING_HPP 47 #define REG_BINDING_HPP 63 class reg_binsign_creator;
75 using type_t =
enum { STG = 0, CDFG };
143 void bind(
unsigned int sv,
unsigned int index);
177 return reverse_map.find(sv)->second;
189 void print_el(const_iterator& it)
const override;
198 return unique_table.find(r) != unique_table.end() ? unique_table.find(r)->second :
generic_objRef();
214 unsigned long long get_bitsize(
unsigned int r)
const;
Data structures used to manage set of variables.
unsigned int get_register(unsigned int sv) const
return the register index where the storage value is stored
unsigned long long compute_bitsize(unsigned int r)
return and set the bitsize associated with given register
~reg_binding() override
Destructor.
std::map< unsigned int, generic_objRef > stall_reg_table
map between std register index and stall register object for pipelines
CustomOrderedSet< unsigned int > get_vars(const unsigned int &r) const
Returns the set of variable associated with the register.
bool all_regs_without_enable
when true all registers do not require write enable: pipelining comes for free
Class managing the register binding.
const FunctionBehaviorConstRef FB
void set_used_regs(unsigned int regs)
sets number of used register
std::map< unsigned int, unsigned long long > bitsize_map
relation between registers and their bitsize
void bind(unsigned int sv, unsigned int index)
class modeling a register object
std::map< unsigned int, generic_objRef > unique_table
map between register index and object
reg_binding(const hlsRef &HLS, const HLS_managerRef HLSMgr_)
Constructor.
hlsRef HLS
HLS data-structure.
const register_obj & operator[](unsigned int v)
redefinition of the [] operator
static std::string reset_type
static reg_bindingRef create_reg_binding(const hlsRef &HLS, const HLS_managerRef HLSMgr_)
bool is_all_regs_without_enable()
return true when all registers are without write enable: pipelining comes for free ...
unsigned long long get_bitsize(unsigned int r) const
return bitsize
const HLS_managerRef HLSMgr
information about all the HLS synthesis
std::map< unsigned int, CustomOrderedSet< unsigned int > > reg2storage_values
map between the register and the associated storage value
redefinition of set to manage ordered/unordered structures
Generic class managing all resources into datapath.
enum { STG=0, CDFG } type_t
Generic class managing the different register allocation algorithms.
virtual void specialise_reg(structural_objectRef ®, unsigned int r)
Specialise a register according to the type of the variables crossing it.
Class managing map of the storage values on a generic object.
int debug
level of the verbosity during the debugging
Template definition of refcount.
virtual std::string GetRegisterFUName(unsigned int i)
return the name of register to be used
unsigned int get_used_regs() const
returns number of used register
void compute_is_without_enable()
compute the is with out enable relation
virtual void add_to_SM(structural_objectRef clock_port, structural_objectRef reset_port)
Add the resulting registers to the structural description of the datapath.
CustomOrderedSet< unsigned int > is_without_enable
store the set of register without enable
Data structure that contains all information about high level synthesis process.
void print_el(const_iterator &it) const override
Function that print the register binding associated with a storage value.
unsigned int used_regs
number of used register
CONSTREF_FORWARD_DECL(FunctionBehavior)
Base object for all the structural objects.
std::map< unsigned int, unsigned int > reverse_map
bind the storage value with the register instance
refcount< generic_obj > generic_objRef
RefCount definition for generic_obj class.