40 #ifndef TECHNOLOGY_NODE_HPP 41 #define TECHNOLOGY_NODE_HPP 43 #include "config_HAVE_CIRCUIT_BUILT.hpp" 44 #include "config_HAVE_EXPERIMENTAL.hpp" 60 #if HAVE_CIRCUIT_BUILT 83 #define LUT_GATE_STD "LUT" 84 #define IBUF_GATE_STD "IBUF" 85 #define OBUF_GATE_STD "OBUF" 88 #define AND_GATE_STD "AND_GATE" 89 #define NAND_GATE_STD "NAND_GATE" 90 #define OR_GATE_STD "OR_GATE" 91 #define NOR_GATE_STD "NOR_GATE" 92 #define XOR_GATE_STD "XOR_GATE" 93 #define XNOR_GATE_STD "XNOR_GATE" 94 #define NOT_GATE_STD "NOT_GATE" 95 #define DFF_GATE_STD "DFF_GATE" 96 #define BUFF_GATE_STD "BUFF_GATE" 98 #define TEST_MUL_MUX_8 "TEST_MUL_MUX_8" 99 #define MUX_GATE_STD "MUX_GATE" 100 #define DEMUX_GATE_STD "DEMUX_GATE" 101 #define MUX_N_TO_1 "MUX_N_to_1" 102 #define MULTIPLIER_STD "mult_expr_FU" 103 #define UI_MULTIPLIER_STD "ui_mult_expr_FU" 104 #define UI_CONST_MULTIPLIER_STD "ui_const_mult_expr_FU" 105 #define ADDER_STD "plus_expr_FU" 106 #define COND_EXPR_STD "cond_expr_FU" 107 #define UI_ADDER_STD "ui_plus_expr_FU" 108 #define UI_ALIGN_ADDER_STD "ui_align_plus_expr_FU" 109 #define CONCAT4_STD "concat_4_constructor" 110 #define SIGNED_BITFIELD_FU_STD "Sbitfield_FU" 111 #define UNSIGNED_BITFIELD_FU_STD "Ubitfield_FU" 112 #define CONSTANT_STD "constant_value" 113 #define ASSIGN_SIGNED_STD "ASSIGN_SIGNED_FU" 114 #define ASSIGN_UNSIGNED_STD "ASSIGN_UNSIGNED_FU" 115 #define ASSIGN_REAL_STD "ASSIGN_REAL_FU" 116 #define ASSIGN_VECTOR_BOOL_STD "ASSIGN_VECTOR_BOOL_FU" 117 #define ASSIGN_VEC_SIGNED_STD "ASSIGN_VEC_SIGNED_FU" 118 #define ASSIGN_VEC_UNSIGNED_STD "ASSIGN_VEC_UNSIGNED_FU" 119 #define ADDR_EXPR_STD "addr_expr_FU" 120 #define ASSERT_EXPR_SIGNED_STD "assert_expr_FU" 121 #define ASSERT_EXPR_UNSIGNED_STD "ui_assert_expr_FU" 122 #define ASSERT_EXPR_REAL_STD "fp_assert_expr_FU" 123 #define BMEMORY_STD "BMEMORY_CTRL" 124 #define BMEMORY_STDN "BMEMORY_CTRLN" 125 #define MEMCPY_STD "__internal_bambu_memcpy" 126 #define ARRAY_1D_STD_BRAM "ARRAY_1D_STD_BRAM" 127 #define ARRAY_1D_STD_BRAM_SDS "ARRAY_1D_STD_BRAM_SDS" 128 #define ARRAY_1D_STD_BRAM_SDS_BUS "ARRAY_1D_STD_BRAM_SDS_BUS" 129 #define ARRAY_1D_STD_DISTRAM_SDS "ARRAY_1D_STD_DISTRAM_SDS" 130 #define ARRAY_1D_STD_BRAM_N1 "ARRAY_1D_STD_BRAM_N1" 131 #define ARRAY_1D_STD_BRAM_N1_SDS "ARRAY_1D_STD_BRAM_N1_SDS" 132 #define ARRAY_1D_STD_DISTRAM_N1_SDS "ARRAY_1D_STD_DISTRAM_N1_SDS" 133 #define ARRAY_1D_STD_BRAM_N1_SDS_BUS "ARRAY_1D_STD_BRAM_N1_SDS_BUS" 134 #define ARRAY_1D_STD_BRAM_NN "ARRAY_1D_STD_BRAM_NN" 135 #define ARRAY_1D_STD_BRAM_NN_SDS "ARRAY_1D_STD_BRAM_NN_SDS" 136 #define ARRAY_1D_STD_BRAM_NN_SDS_BUS "ARRAY_1D_STD_BRAM_NN_SDS_BUS" 137 #define ARRAY_1D_STD_DISTRAM_NN_SDS "ARRAY_1D_STD_DISTRAM_NN_SDS" 138 #define STD_BRAM "STD_BRAM" 139 #define STD_BRAMN "STD_BRAMN" 140 #define MEMLOAD_STD "__builtin_memload" 141 #define MEMSTORE_STD "__builtin_memstore" 142 #define MEMLOAD_STDN "__builtin_memload_N" 143 #define MEMSTORE_STDN "__builtin_memstore_N" 144 #define BUILTIN_EXIT_STD "__builtin_exit" 145 #define BUILTIN_ABORT_STD "__builtin_abort" 146 #define BUILTIN_WAIT_CALL_STD "__builtin_wait_call" 147 #define PROXY_CTRL "PROXY_CTRL" 148 #define PROXY_CTRLN "PROXY_CTRLN" 149 #define DPROXY_CTRL "DPROXY_CTRL" 150 #define DPROXY_CTRLN "DPROXY_CTRLN" 151 #define SPROXY_CTRL "SPROXY_CTRL" 152 #define SPROXY_CTRLN "SPROXY_CTRLN" 154 #define MEMORY_TYPE_ASYNCHRONOUS "ASYNCHRONOUS" 155 #define MEMORY_TYPE_SYNCHRONOUS_UNALIGNED "SYNCHRONOUS_UNALIGNED" 156 #define MEMORY_TYPE_SYNCHRONOUS_SDS "SYNCHRONOUS_SDS" 157 #define MEMORY_TYPE_SYNCHRONOUS_SDS_BUS "SYNCHRONOUS_SDS_BUS" 159 #define CHANNELS_TYPE_MEM_ACC_11 "MEM_ACC_11" 160 #define CHANNELS_TYPE_MEM_ACC_N1 "MEM_ACC_N1" 161 #define CHANNELS_TYPE_MEM_ACC_NN "MEM_ACC_NN" 162 #define CHANNELS_TYPE_MEM_ACC_P1N "MEM_ACC_P1N" 163 #define CHANNELS_TYPE_MEM_ACC_CS "MEM_ACC_CS" 165 #define MEMORY_CTRL_TYPE_D00 "D00" 166 #define MEMORY_CTRL_TYPE_PROXY "PROXY" 167 #define MEMORY_CTRL_TYPE_DPROXY "DPROXY" 168 #define MEMORY_CTRL_TYPE_SPROXY "SPROXY" 169 #define MEMORY_CTRL_TYPE_PROXYN "PROXYN" 170 #define MEMORY_CTRL_TYPE_DPROXYN "DPROXYN" 171 #define MEMORY_CTRL_TYPE_SPROXYN "SPROXYN" 173 #define UUDATA_CONVERTER_STD "UUdata_converter_FU" 174 #define IUDATA_CONVERTER_STD "IUdata_converter_FU" 175 #define UIDATA_CONVERTER_STD "UIdata_converter_FU" 176 #define IIDATA_CONVERTER_STD "IIdata_converter_FU" 177 #define BIVECTOR_CONVERTER_STD "BIvector_converter_FU" 178 #define BUVECTOR_CONVERTER_STD "BUvector_converter_FU" 179 #define UBVECTOR_CONVERTER_STD "UBvector_converter_FU" 180 #define IIVECTOR_CONVERTER_STD "IIvector_converter_FU" 181 #define UUVECTOR_CONVERTER_STD "UUvector_converter_FU" 182 #define UIVECTOR_CONVERTER_STD "UIvector_converter_FU" 183 #define IUVECTOR_CONVERTER_STD "IUvector_converter_FU" 185 #define FFDATA_CONVERTER_STD "FFdata_converter_FU" 186 #define SF_FFDATA_CONVERTER_32_64_STD "sf_FFdata_converter_FU_32_64" 187 #define SF_FFDATA_CONVERTER_64_32_STD "sf_FFdata_converter_FU_64_32" 189 #define UUCONVERTER_EXPR_STD "UUconvert_expr_FU" 190 #define IUCONVERTER_EXPR_STD "IUconvert_expr_FU" 191 #define UICONVERTER_EXPR_STD "UIconvert_expr_FU" 192 #define IICONVERTER_EXPR_STD "IIconvert_expr_FU" 193 #define VIEW_CONVERT_STD_INT "view_convert_expr_FU" 194 #define VIEW_CONVERT_STD_UINT "ui_view_convert_expr_FU" 195 #define VIEW_CONVERT_STD_REAL "fp_view_convert_expr_FU" 197 #define EXTRACT_BIT_EXPR_SIGNED_STD "extract_bit_expr_FU" 198 #define EXTRACT_BIT_EXPR_UNSIGNED_STD "ui_extract_bit_expr_FU" 199 #define LUT_EXPR_STD "lut_expr_FU" 202 #define CE_STD "CE_FU" 203 #define CE_FSM "CE_FSM" 204 #define CE_BYPASS "CE_BYPASS" 205 #define JOIN_STD "JOIN_FU" 206 #define SIMPLEJOIN_STD "SIMPLEJOIN_FU" 207 #define PT_STD "PT_FU" 208 #define START_STD "START_FU" 209 #define COND_STD "COND_FU" 210 #define SWITCH_CASE_STD "SWITCH_CASE_FU" 211 #define MC_STD "MC_FU" 212 #define FC_STD "FC_FU" 215 #define register_SHIFT "register_SHIFT" 218 #define register_STD "register_STD" 221 #define register_SR "register_SR" 224 #define flipflop_SR "flipflop_SR" 227 #define register_AR "register_AR" 230 #define flipflop_AR "flipflop_AR" 233 #define register_AR_NORETIME "register_AR_NORETIME" 234 #define register_AR_NORETIME_INT "register_AR_NORETIME_INT" 235 #define register_AR_NORETIME_UINT "register_AR_NORETIME_UINT" 236 #define register_AR_NORETIME_REAL "register_AR_NORETIME_REAL" 237 #define register_SE "register_SE" 239 #define register_SRSE "register_SRSE" 241 #define register_ARSE "register_ARSE" 243 #define register_SARSE "register_SARSE" 245 #define MEMORY_MAPPED_REGISTER_FU "memory_mapped_register_FU" 247 #define RETURN_MM_REGISTER_FU "return_value_mm_register_FU" 248 #define NOTYFY_CALLER_MINIMAL_FU "notify_caller_minimal_FU" 249 #define STATUS_REGISTER_FU "status_register_FU" 250 #define STATUS_REGISTER_NO_NOTIFIED_FU "status_register_no_notified_FU" 251 #define MEMORY_MAPPED_REGISTERN_FU "memory_mapped_registerN_FU" 252 #define RETURN_MM_REGISTERN_FU "return_value_mm_registerN_FU" 253 #define NOTYFY_CALLER_MINIMALN_FU "notify_caller_minimalN_FU" 254 #define STATUS_REGISTERN_FU "status_registerN_FU" 255 #define STATUS_REGISTER_NO_NOTIFIEDN_FU "status_register_no_notifiedN_FU" 260 #define GET_TEC_KIND_TEXT(meth) \ 261 std::string get_kind_text() const override \ 263 return std::string(#meth); \ 280 #define GET_TEC_KIND(meth) \ 281 enum tec_kind get_kind() const override \ 305 virtual const std::string&
get_name()
const = 0;
325 virtual void print(std::ostream& os)
const = 0;
372 #if HAVE_EXPERIMENTAL 373 power_modelRef power_m;
411 return operation_name;
419 bool is_type_supported(
const std::string& type_name)
const;
427 bool is_type_supported(
const std::string& type_name,
unsigned long long type_prec)
const;
435 bool is_type_supported(
const std::string& type_name,
const std::vector<unsigned long long>& type_prec,
436 const std::vector<unsigned long long>& type_n_element)
const;
441 std::string get_type_supported_string()
const;
464 return primary_inputs_registered;
471 void print(std::ostream& os)
const override;
489 using type_t =
enum {
UNKNOWN = 0, COMBINATIONAL, STATETABLE, FF, LATCH, PHYSICAL };
515 #if HAVE_CIRCUIT_BUILT 575 if(op_name_to_op.count(curr->
get_name()))
577 auto del = std::find(list_of_operation.begin(), list_of_operation.end(), op_name_to_op[curr->
get_name()]);
578 if(del != list_of_operation.end())
580 list_of_operation.erase(del);
583 list_of_operation.push_back(curr);
584 op_name_to_op[curr->
get_name()] = curr;
591 void set_clock_period(
double _clock_period);
605 void set_clock_period_resource_fraction(
double _clock_period_resource_fraction);
612 return clock_period_resource_fraction;
621 return list_of_operation;
630 return list_of_operation.size();
644 return functional_unit_name;
664 void print(std::ostream& os)
const override;
750 void print(std::ostream& os)
const override;
virtual std::string get_kind_text() const =0
Virtual function used to get the string name of a technology_node instance.
std::map< std::string, std::vector< unsigned int > > supported_types
supported types and precision of the operation, in form (name, list_of_prec).
void add(const technology_nodeRef &curr)
Add the given operation to the current functional_unit.
std::string bram_load_latency
Specify the bram load latency the functional unit is compliant with.
#define GET_TEC_KIND(meth)
Macro used to implement get_kind() function in structural_object hierarchy classes.
Simple pretty print functor.
std::string pipe_parameters
comma separated string with the parameter for the different implementation of the pipeline...
std::string operation_name
name of the operation mappen on a given functional unit.
std::string fu_template_parameters
Template parameters.
std::vector< std::string > ordered_attributes
list of attributes associated to the components
std::string fu_template_name
Name of the template.
operation_vec list_of_operation
At each functional unit can be associate several operations with different performances.
std::string functional_unit_name
name of the functional unit.
std::map< std::string, technology_nodeRef > op_name_to_op
Redefinition of get_kind_text()
This class manages the circuit structures.
virtual void print(std::ostream &os) const =0
Virtual function that prints the class.
double clock_period_resource_fraction
clock period resource fraction
std::string bram_load_latency
Specify the bram load latency the functional unit is compliant with.
bool primary_inputs_registered
true when the primary input of the functional unit are registered
time_infoRef time_m
class representing the timing information associated with this operation
std::string channels_type
Specify the type of the channel the functional unit is compliant with.
const std::string & get_name() const override
Return the name of the operation.
std::string characterizing_constant_value
Value used during the characterization of this instance.
bool no_constant_characterization
The template will not consider constants connected to the inputs during the module characterization...
This class specifies the characteristic of a particular functional unit.
std::string portsize_parameters
comma separed string with the parameter for different portsize values.
TimeStamp characterization_timestamp
The timestamp of the characterization of this functional unit.
std::map< std::string, attributeRef > attributes
map between the attribute keys and the corresponding values
std::string memory_type
Specify the type of memory the functional unit is compliant with.
std::string channels_type
Specify the type of the channel the functional unit is compliant with.
xml_nodeRef XML_description
pointer to the XML description of the cell
technology_node()
Constructor.
This class specifies the characteristic of a particular operation working on a given functional unit...
area_infoRef area_m
This variable stores the resource information of the component.
This class manages the technology library structures.
bool is_primary_inputs_registered() const
std::string specialized
when non empty it defines with respect what the functional unit template has been specialized ...
virtual enum tec_kind get_kind() const =0
Virtual function used to find the real type of a technology_nodeinstance.
const operation_vec & get_operations() const
Return the operations that the functional unit can handle.
double get_clock_period() const
Returns the clock period adopted for the synthesis (0 means that it has been generated with unconstra...
bool bounded
flag to determine if the operation is bounded or not
const std::string & get_name() const override
Returns the name of the operation.
size_t get_operations_num() const
Return the number of the operations that the functional unit can handle.
double get_clock_period_resource_fraction() const
Returns the clock period resource fraction adopted for the synthesis.
std::string characterizing_constant_value
Value used during the characterization of templates.
This file collects some utility functions and macros.
std::string memory_ctrl_type
Specify the type of memory controller the functional unit is compliant with.
static simple_indent PP
pretty print functor object used by all print members to indent the output of the print function...
Template definition of refcount.
bool commutative
property of commutativity
virtual ~technology_node()
Destructor.
virtual void xwrite(xml_element *rootnode, const technology_nodeRef tn, const ParameterConstRef Param)=0
Add a technology_node to an xml tree.
Very simple pretty printer functor.
This class describe a functional unit template.
REF_FORWARD_DECL(technology_node)
RefCount type definition of the technology_node class structure.
friend std::ostream & operator<<(std::ostream &os, const technology_nodeRef &s)
Friend definition of the << operator.
#define GET_TEC_KIND_TEXT(meth)
Macro which defines the get_kind_text function that returns the parameter as a string.
CONSTREF_FORWARD_DECL(Parameter)
std::string memory_ctrl_type
Specify the type of memory controller the functional unit is compliant with.
const std::string & get_name() const override
Return the name of the operation.
virtual const std::string & get_name() const =0
Return the name of the technology node.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
std::string memory_type
Specify the type of memory the functional unit is compliant with.
The type used for timestamp.
std::vector< technology_nodeRef > operation_vec
Type definition of a vector of functional_unit.
virtual void xload(const xml_element *Enode, const technology_nodeRef owner, const ParameterConstRef Param)=0
Load a technology_node starting from an xml file.
technology_nodeRef FU
Functional Unit.
std::string component_timing_alias
Specify that the functional unit has the same timing per operation it has the one specified by this f...
Abstract pure class for the technology structure.
tec_kind
Enumerative type for technology object classes, it is used with get_kind() function to know the actua...
type_t logical_type
return the logical type of the cell
double clock_period
clock period adopted for the synthesis (in ns)
enum { UNKNOWN=0, COMBINATIONAL, STATETABLE, FF, LATCH, PHYSICAL } type_t