PandA-2024.02
|
Class managing the functional-unit binding. More...
#include <fu_binding.hpp>
Public Member Functions | |
fu_binding (const HLS_managerConstRef _HLSMgr, const unsigned int function_id, const ParameterConstRef parameters) | |
Constructor. More... | |
fu_binding (const fu_binding &original) | |
fu_binding & | operator= (const fu_binding &)=delete |
virtual | ~fu_binding () |
Destructor. More... | |
void | bind (const vertex &v, unsigned int unit, unsigned int index=std::numeric_limits< unsigned int >::max()) |
Binds an operation vertex to a functional unit. More... | |
unsigned int | get_assign (const vertex &v) const |
Returns the functional unit assigned to the vertex. More... | |
unsigned int | get_assign (const unsigned int statement_index) const |
Returns the functional unit assigned to the operation. More... | |
unsigned int | get_index (const vertex &v) const |
Returns the index of functional unit assigned to the vertex. More... | |
std::string | get_fu_name (vertex const &v) const |
Returns the name of the functional unit. More... | |
unsigned int | get_number (unsigned int unit) const |
Returns number of functional unit allocated. More... | |
const funit_obj & | operator[] (const vertex &v) |
Redefinition of the [] operator. More... | |
generic_objRef | get (const vertex v) const |
Returns reference to funit object associated with this vertex. More... | |
generic_objRef | get (unsigned int name, unsigned int index) |
std::list< unsigned int > | get_allocation_list () const |
Returns the set of allocated unit. More... | |
bool | is_assigned (const vertex &v) const |
return true in case the vertex has been previously assigned More... | |
bool | is_assigned (const unsigned int statement_index) const |
return true in case the operation has been previously assigned More... | |
virtual void | add_to_SM (const HLS_managerRef HLSMgr, const hlsRef HLS, structural_objectRef clock_port, structural_objectRef reset_port) |
Instance the functional unit inside the structural representation of the datapath. More... | |
virtual void | manage_extern_global_port (const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM, structural_objectRef port_in, unsigned int dir, structural_objectRef circuit, unsigned int num) |
virtual void | manage_memory_ports_parallel_chained (const HLS_managerRef HLSMgr, const structural_managerRef SM, const std::list< structural_objectRef > &memory_modules, const structural_objectRef circuit, const hlsRef HLS, unsigned int &unique_id) |
OpVertexSet | get_operations (unsigned int unit, unsigned int index) const |
Return the operations that are executed by the given functional unit. More... | |
void | specialise_fu (const HLS_managerRef HLSMgr, const hlsRef HLS, structural_objectRef fu_obj, unsigned int fu, const OpVertexSet &operations, unsigned int ar) |
Specialize the functional unit based on variables associated with the corresponding operations. More... | |
void | specialize_memory_unit (const HLS_managerRef HLSMgr, const hlsRef HLS, structural_objectRef fu_obj, unsigned int ar, const std::string &base_address, unsigned long long rangesize, bool is_memory_splitted, bool is_sparse_memory, bool is_sds) |
Specialize a memory unit. More... | |
virtual bool | manage_module_ports (const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM, const structural_objectRef curr_gate, unsigned int num) |
void | set_ports_are_swapped (vertex v, bool condition) |
specify if vertex v have or not its ports swapped More... | |
bool | get_ports_are_swapped (vertex v) const |
Check if vertex v has its ports swapped or not. More... | |
bool | has_resource_sharing () const |
return true in case at least one resource is shared More... | |
Static Public Member Functions | |
static fu_bindingRef | create_fu_binding (const HLS_managerConstRef _HLSMgr, const unsigned int _function_id, const ParameterConstRef _parameters) |
create_fu_binding: factory method for fu_binding More... | |
static void | manage_memory_ports_chained (const structural_managerRef SM, const std::list< structural_objectRef > &memory_modules, const structural_objectRef circuit) |
Manage the connections between memory ports. More... | |
static void | join_merge_split (const structural_managerRef SM, const hlsRef HLS, std::map< structural_objectRef, std::list< structural_objectRef >, jms_sorter > &primary_outs, const structural_objectRef circuit, unsigned int &unique_id) |
static void | fill_array_ref_memory (std::ostream &init_file_a, std::ostream &init_file_b, unsigned int ar, unsigned long long &vec_size, unsigned long long &elts_size, const memoryRef mem, tree_managerConstRef TM, bool is_sds, unsigned long long bitsize_align) |
fill the memory of the array ref More... | |
static void | write_init (const tree_managerConstRef TreeM, tree_nodeRef var_node, tree_nodeRef init_node, std::vector< std::string > &init_file, const memoryRef mem, unsigned long long element_precision) |
Static Public Attributes | |
static const unsigned int | UNKNOWN = std::numeric_limits<unsigned int>::max() |
The value used to identified unknown functional unit. More... | |
Protected Member Functions | |
void | update_allocation (unsigned int unit, unsigned int number) |
Update number of allocated units. More... | |
structural_objectRef | add_gate (const HLS_managerRef HLSMgr, const hlsRef HLS, const technology_nodeRef fu, const std::string &name, const OpVertexSet &ops, structural_objectRef clock_port, structural_objectRef reset_port) const |
Add an instance of the current port. More... | |
void | check_parametrization (structural_objectRef curr_gate) |
check the module parametrization More... | |
void | kill_proxy_memory_units (std::map< unsigned int, unsigned int > &memory_units, structural_objectRef curr_gate, std::map< unsigned int, std::list< structural_objectRef >> &var_call_sites_rel, std::map< unsigned int, unsigned int > &reverse_memory_units) |
fix port properties for proxy memory ports More... | |
void | kill_proxy_function_units (std::map< unsigned int, std::string > &wrapped_units, structural_objectRef curr_gate, std::map< std::string, std::list< structural_objectRef >> &fun_call_sites_rel, std::map< std::string, unsigned int > &reverse_wrapped_units) |
void | manage_killing_memory_proxies (std::map< unsigned int, structural_objectRef > &mem_obj, std::map< unsigned int, unsigned int > &reverse_memory_units, std::map< unsigned int, std::list< structural_objectRef >> &var_call_sites_rel, const structural_managerRef SM, const hlsRef HLS, unsigned int &_unique_id) |
connect proxies with storage components More... | |
void | manage_killing_function_proxies (std::map< unsigned int, structural_objectRef > &fun_obj, std::map< std::string, unsigned int > &reverse_function_units, std::map< std::string, std::list< structural_objectRef >> &fun_call_sites_rel, const structural_managerRef SM, const hlsRef HLS, unsigned int &_unique_id) |
Protected Attributes | |
std::map< unsigned int, unsigned int > | allocation_map |
map between functional unit id and number of units allocated More... | |
std::map< std::pair< unsigned int, unsigned int >, generic_objRef > | unique_table |
map between unit and allocated objects More... | |
std::map< std::pair< unsigned int, unsigned int >, OpVertexSet > | operations |
reverse map that associated each functional unit with the set of operations that are executed More... | |
std::map< unsigned int, generic_objRef > | op_binding |
operation binding More... | |
AllocationInformationRef | allocation_information |
allocation manager. Used to retrieve the string name of the functional units. More... | |
const tree_managerConstRef | TreeM |
information about the tree data-structure More... | |
const OpGraphConstRef | op_graph |
The operation graph. More... | |
CustomOrderedSet< vertex > | ports_are_swapped |
port assignment: ports are swapped predicate More... | |
const ParameterConstRef | parameters |
The set of input parameters. More... | |
int | debug_level |
The debug level. More... | |
bool | has_resource_sharing_p |
useful to know for automatic pipelining More... | |
Class managing the functional-unit binding.
It stores the functional-unit binding, that is, the mapping of operations in the behavioral description onto the set of allocated functional units.
Definition at line 90 of file fu_binding.hpp.
fu_binding::fu_binding | ( | const HLS_managerConstRef | _HLSMgr, |
const unsigned int | function_id, | ||
const ParameterConstRef | parameters | ||
) |
Constructor.
HLS_mgr | is the HLS manager |
function_id | is the index of the function |
parameters | is the set of input parameters |
Definition at line 109 of file fu_binding.cpp.
Referenced by create_fu_binding().
fu_binding::fu_binding | ( | const fu_binding & | original | ) |
Definition at line 120 of file fu_binding.cpp.
References ~fu_binding().
|
virtualdefault |
|
protected |
Add an instance of the current port.
creating structural_manager starting from technology_node
connecting clock and reset ports, if any
Definition at line 267 of file fu_binding.cpp.
References FunctionBehavior::CFG, CLOCK_PORT_NAME, structural_object::copy(), hls::datapath, debug_level, structural_object::find_member(), hls::functionId, structural_manager::get_circ(), GET_NAME, hls::HLS_D, port_o_K, RESET_PORT_NAME, structural_object::set_id(), and THROW_ASSERT.
Referenced by add_to_SM().
|
virtual |
Instance the functional unit inside the structural representation of the datapath.
unique id identifier
initialize resource sharing to false
add the MEMCPY_STD component when parameters has to be copied into the local store
component specialization
propagate memory parameters if contained into the module to be instantiated
rename proxy ports
propagate memory parameters if contained into the module to be instantiated
rename back all the memory proxies ports
rename back all the function proxies ports
Reimplemented in ParallelMemoryFuBinding, and fu_binding_cs.
Definition at line 551 of file fu_binding.cpp.
References add_gate(), memory::add_memory_parameter(), allocation_information, BUILTIN_WAIT_CALL, OpGraph::CGetOpNodeInfo(), tree_helper::CGetType(), CHANNELS_TYPE_MEM_ACC_N1, CHANNELS_TYPE_MEM_ACC_NN, check_parametrization(), CLOCK_PORT_NAME, CONSTANT_STD, hls::control_flow_checker, structural_object::copy(), hls::datapath, debug_level, DEBUG_LEVEL_PEDANTIC, DEBUG_LEVEL_VERY_PEDANTIC, DONE_PORT_NAME, DONE_PORT_NAME_CFC, structural_object::find_member(), flipflop_AR, flipflop_SR, hls::functionId, get_allocation_list(), structural_manager::get_circ(), AllocationInformation::get_fu(), AllocationInformation::get_fu_name(), structural_object::get_id(), structural_object::get_kind(), AllocationInformation::get_memory_units(), get_number(), AllocationInformation::get_number_channels(), get_operations(), generic_obj::get_out_sign(), conn_binding::get_port(), AllocationInformation::get_proxy_function_units(), AllocationInformation::get_proxy_memory_units(), AllocationInformation::get_proxy_memory_var(), AllocationInformation::get_proxy_wrapped_units(), AllocationInformation::get_string_name(), structural_object::get_typeRef(), functions::GetFUName(), has_resource_sharing_p, AllocationInformation::has_to_be_synthetized(), hls::HLS_D, INDENT_DBG_MEX, INDENT_OUT_MEX, reg_binding::is_all_regs_without_enable(), AllocationInformation::is_direct_access_memory_unit(), AllocationInformation::is_direct_proxy_memory_unit(), AllocationInformation::is_dual_port_memory(), AllocationInformation::is_indirect_access_memory_unit(), AllocationInformation::is_memory_unit(), AllocationInformation::is_proxy_memory_unit(), AllocationInformation::is_return(), key, kill_proxy_function_units(), kill_proxy_memory_units(), LIBRARY_STD, LIBRARY_STD_FU, manage_killing_function_proxies(), manage_killing_memory_proxies(), manage_memory_ports_chained(), manage_memory_ports_parallel_chained(), manage_module_ports(), max, MEM_ACC_NN, MEMCPY_STD, MEMORY_TYPE_ASYNCHRONOUS, MEMORY_TYPE_SYNCHRONOUS_SDS, MEMORY_TYPE_SYNCHRONOUS_SDS_BUS, MEMORY_TYPE_SYNCHRONOUS_UNALIGNED, MEMSTORE_STD, MEMSTORE_STDN, tree_helper::name_function(), NEXT_STATE_PORT_NAME, tree_helper::NormalizeTypename(), NumberToBinaryString(), op_graph, operations, hls::output_level, OUTPUT_LEVEL_MINIMUM, hls::Param, parameters, port_o_K, port_vector_o_K, PRESENT_STATE_PORT_NAME, PRINT_DBG_MEX, memory::propagate_memory_parameters(), PROXY_PREFIX, hls::Rconn, hls::registered_inputs, RESET_PORT_NAME, port_o::resize_if_busport(), RETURN_PORT_NAME, hls::Rfu, hls::Rreg, structural_object::set_id(), generic_obj::set_structural_obj(), sign, tree_helper::Size(), specialise_fu(), specialize_memory_unit(), START_PORT_NAME, START_PORT_NAME_CFC, starts_with(), STD_GET_SIZE, STR, THROW_ASSERT, THROW_ERROR, TreeM, U, VHDL, and WORK_LIBRARY.
Referenced by fu_binding_cs::add_to_SM(), ParallelMemoryFuBinding::add_to_SM(), and classic_datapath::InternalExec().
void fu_binding::bind | ( | const vertex & | v, |
unsigned int | unit, | ||
unsigned int | index = std::numeric_limits<unsigned int>::max() |
||
) |
Binds an operation vertex to a functional unit.
The functional unit is identified by an id and its index
v | is operation vertex |
id | is the identifier of the functional unit |
index | is the functional unit index |
Definition at line 173 of file fu_binding.cpp.
References allocation_information, OpGraph::CGetOpNodeInfo(), AllocationInformation::get_string_name(), index, INFINITE_UINT, key, op_binding, op_graph, operations, STR, unique_table, and update_allocation().
Referenced by parametric_list_based::exec(), unique_binding::InternalExec(), easy_module_binding::InternalExec(), SDCScheduling::InternalExec(), cdfc_module_binding::InternalExec(), and hls::xload().
|
protected |
check the module parametrization
Definition at line 1261 of file fu_binding.cpp.
References GET_TYPE_NAME, param, port_o_K, port_vector_o_K, and THROW_ASSERT.
Referenced by add_to_SM().
|
static |
create_fu_binding: factory method for fu_binding
_HLSMgr | |
_function_id | |
_parameters |
Definition at line 135 of file fu_binding.cpp.
References fu_binding().
Referenced by easy_module_binding::Initialize(), fu_binding_creator::Initialize(), Scheduling::Initialize(), and cdfc_module_binding::InternalExec().
|
static |
fill the memory of the array ref
TreeM | is the tree_manager |
init_file_a | is the file where the data is written (all data stored in this file in case is_memory_splitted is false |
initi_file_b | is the file where the data is written (only the odd elements are store in this file and only if is open) |
ar | is the array ref variable declaration |
vec_size | is the number of the element of the array |
elts_size | is the element size in bits |
mem | is the memory reference |
TM | is the tree manager reference |
is_sds | is true if SDS memory alignment is required |
bitsize_align | is the memory alignment bitsize |
Definition at line 2424 of file fu_binding.cpp.
References tree_helper::CGetElements(), tree_helper::CGetType(), counter, get_aligned_bitsize(), tree_helper::get_array_dim_and_bitsize(), GET_CONST_NODE, GET_NODE, index, tree_helper::IsArrayEquivType(), tree_helper::IsBooleanType(), tree_helper::IsComplexType(), tree_helper::IsEnumType(), tree_helper::IsPointerType(), tree_helper::IsRealType(), tree_helper::IsStructType(), tree_helper::IsUnionType(), tree_helper::IsVectorType(), tree_helper::Size(), THROW_ASSERT, THROW_ERROR, and write_init().
Referenced by TestbenchGeneration::generate_init_file(), and specialize_memory_unit().
generic_objRef fu_binding::get | ( | const vertex | v | ) | const |
Returns reference to funit object associated with this vertex.
v | is the given vertex |
Definition at line 3409 of file fu_binding.cpp.
References OpGraph::CGetOpNodeInfo(), op_binding, and op_graph.
Referenced by conn_binding::add_command_ports(), mux_connection_binding::connect_to_registers(), mux_connection_binding::create_connections(), and fsm_controller::create_state_machine().
|
inline |
Definition at line 279 of file fu_binding.hpp.
References index.
std::list< unsigned int > fu_binding::get_allocation_list | ( | ) | const |
Returns the set of allocated unit.
Definition at line 221 of file fu_binding.cpp.
References allocation_map.
Referenced by ParallelMemoryFuBinding::add_to_SM(), add_to_SM(), and mux_connection_binding::create_connections().
unsigned int fu_binding::get_assign | ( | const vertex & | v | ) | const |
Returns the functional unit assigned to the vertex.
v | is the considered vertex. |
Definition at line 242 of file fu_binding.cpp.
References OpGraph::CGetOpNodeInfo(), and op_graph.
Referenced by conn_binding::add_command_ports(), mux_connection_binding::address_precision(), parametric_list_based::check_direct_operation_chaining(), parametric_list_based::check_non_direct_operation_chaining(), BB_based_stg::compute_EPP_edge_increments(), parametric_list_based::compute_starting_ending_time_asap(), mux_connection_binding::create_connections(), fsm_controller::create_state_machine(), estimate_muxes(), parametric_list_based::exec(), get_fu_name(), module_binding_check< vertex_type >::initialize_structures(), pipeline_controller::InternalExec(), BB_based_stg::InternalExec(), unique_binding::InternalExec(), easy_module_binding::InternalExec(), port_swapping::InternalExec(), cdfc_module_binding::InternalExec(), BB_based_stg::optimize_cycles(), BB_based_stg::res_const_operation(), and hls::xwrite().
unsigned int fu_binding::get_assign | ( | const unsigned int | statement_index | ) | const |
Returns the functional unit assigned to the operation.
statement_index | is the considered operation. |
Definition at line 248 of file fu_binding.cpp.
References op_binding, THROW_ASSERT, and TreeM.
std::string fu_binding::get_fu_name | ( | vertex const & | v | ) | const |
Returns the name of the functional unit.
v | is the considered vertex. |
Definition at line 256 of file fu_binding.cpp.
References allocation_information, get_assign(), and AllocationInformation::get_string_name().
Referenced by Schedule::print().
unsigned int fu_binding::get_index | ( | const vertex & | v | ) | const |
Returns the index of functional unit assigned to the vertex.
v | is the considered vertex. |
Definition at line 261 of file fu_binding.cpp.
References OpGraph::CGetOpNodeInfo(), op_binding, and op_graph.
Referenced by conn_binding::add_command_ports(), mux_connection_binding::create_connections(), estimate_muxes(), module_binding_check< vertex_type >::initialize_structures(), unique_binding::InternalExec(), easy_module_binding::InternalExec(), port_swapping::InternalExec(), cdfc_module_binding::InternalExec(), and hls::xwrite().
|
inline |
Returns number of functional unit allocated.
unit | is the identifier associated to functional unit |
Definition at line 249 of file fu_binding.hpp.
Referenced by add_to_SM(), and mux_connection_binding::create_connections().
OpVertexSet fu_binding::get_operations | ( | unsigned int | unit, |
unsigned int | index | ||
) | const |
Return the operations that are executed by the given functional unit.
Definition at line 194 of file fu_binding.cpp.
References op_graph, and operations.
Referenced by add_to_SM().
Check if vertex v has its ports swapped or not.
v | is the vertex |
Definition at line 359 of file fu_binding.hpp.
Referenced by mux_connection_binding::create_connections(), and estimate_muxes().
|
inline |
return true in case at least one resource is shared
Definition at line 365 of file fu_binding.hpp.
References map.
return true in case the vertex has been previously assigned
v |
Definition at line 210 of file fu_binding.cpp.
References OpGraph::CGetOpNodeInfo(), and op_graph.
Referenced by module_binding_check< vertex_type >::initialize_structures().
bool fu_binding::is_assigned | ( | const unsigned int | statement_index | ) | const |
return true in case the operation has been previously assigned
statement_index |
Definition at line 216 of file fu_binding.cpp.
References op_binding.
|
static |
Definition at line 1411 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_module_from_technology_library(), structural_manager::add_sign(), structural_manager::add_sign_vector(), structural_type_descriptor::BOOL, structural_type_descriptor::copy(), DEBUG_LEVEL_NONE, structural_object::get_kind(), structural_object::get_kind_text(), structural_object::get_typeRef(), hls::HLS_D, port_vector_o_K, port_o::resize_std_port(), STD_GET_SIZE, STR, THROW_ASSERT, structural_type_descriptor::type, structural_object::type_resize(), U, and structural_type_descriptor::VECTOR_BOOL.
Referenced by manage_killing_function_proxies(), manage_killing_memory_proxies(), fu_binding_cs::manage_memory_port_hierarchical(), fu_binding_cs::manage_memory_port_kernel(), and manage_memory_ports_parallel_chained().
|
protected |
compute the set of killing functions
Definition at line 356 of file fu_binding.cpp.
References structural_object::get_id(), PROXY_PREFIX, and starts_with().
Referenced by add_to_SM().
|
protected |
fix port properties for proxy memory ports
memory_units | is the list o memory ports |
curr_gate | is the current gate |
var_call_sites_rel | put into relation proxied variables and modules referring to such variables |
compute the set of killing vars
Definition at line 322 of file fu_binding.cpp.
References structural_object::find_member(), port_o_K, and STR.
Referenced by add_to_SM().
|
virtual |
Reimplemented in fu_binding_cs.
Definition at line 1706 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_port(), structural_manager::add_port_vector(), structural_manager::change_port_direction(), debug_level, DEBUG_LEVEL_VERY_PEDANTIC, exp, structural_object::find_member(), port_o::fix_port_properties(), hls::functionId, structural_object::get_kind(), structural_object::get_typeRef(), getFunctionType(), INDENT_DBG_MEX, port_vector_o_K, port_o::resize_std_port(), starts_with(), STD_GET_SIZE, and THROW_ASSERT.
Referenced by ParallelMemoryFuBinding::add_to_SM(), fu_binding_cs::manage_extern_global_port(), and manage_module_ports().
|
protected |
Definition at line 480 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_sign(), structural_manager::add_sign_vector(), structural_object::find_member(), fun(), structural_manager::get_circ(), join_merge_split(), port_o_K, port_vector_o_K, PROXY_PREFIX, starts_with(), THROW_ASSERT, and U.
Referenced by add_to_SM().
|
protected |
connect proxies with storage components
mem_obj | is the relation between fu_id and structural objects |
reverse_memory_units | is the relation between var and functional units |
var_call_sites_rel | is the relation between var and call sites having a proxy as module parameter |
SM | is the structural manager |
Definition at line 417 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_sign(), structural_manager::add_sign_vector(), structural_manager::get_circ(), join_merge_split(), port_o_K, port_vector_o_K, STR, and THROW_ASSERT.
Referenced by add_to_SM().
|
static |
Manage the connections between memory ports.
trimmed away the "?in_"prefix
trimmed away the "?out_"prefix
Definition at line 1316 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_port(), structural_manager::add_port_vector(), structural_manager::add_sign(), structural_manager::add_sign_vector(), structural_object::find_member(), port_o::fix_port_properties(), structural_object::get_kind(), structural_object::get_typeRef(), key, port_vector_o_K, sign, and THROW_ASSERT.
Referenced by add_to_SM().
|
virtual |
Reimplemented in fu_binding_cs.
Definition at line 1584 of file fu_binding.cpp.
References structural_manager::add_connection(), structural_manager::add_port(), structural_manager::add_port_vector(), debug_level, DEBUG_LEVEL_VERY_PEDANTIC, structural_object::find_member(), port_o::fix_port_properties(), structural_object::get_kind(), structural_object::get_kind_text(), structural_object::get_path(), structural_object::get_typeRef(), INDENT_DBG_MEX, join_merge_split(), port_o_K, port_vector_o_K, STR, THROW_ASSERT, and U.
Referenced by add_to_SM(), TopEntityMemoryMapped::InternalExec(), and fu_binding_cs::manage_memory_ports_parallel_chained().
|
virtual |
creating extern IN port on datapath starting from extern ports on module
creating extern OUT port on datapath starting from extern ports on module
creating extern IO port on datapath starting from extern ports on module
Reimplemented in ParallelMemoryFuBinding.
Definition at line 1284 of file fu_binding.cpp.
References debug_level, DEBUG_LEVEL_VERY_PEDANTIC, structural_manager::get_circ(), INDENT_DBG_MEX, and manage_extern_global_port().
Referenced by add_to_SM(), TopEntityMemoryMapped::insertMemoryMappedRegister(), TopEntityMemoryMapped::insertStartDoneLogic(), TopEntityMemoryMapped::insertStatusRegister(), TopEntityMemoryMapped::InternalExec(), and ParallelMemoryFuBinding::manage_module_ports().
|
delete |
Redefinition of the [] operator.
It is necessary because segfaults happen when the vertex is not into the map and so the object has not been created yet. This operator can be used only to read information since it returns a constant object. It's necessary because a direct manipulation of the object can create non-consistent data objects.
v | is the vertex you want to get the object |
Definition at line 203 of file fu_binding.cpp.
References OpGraph::CGetOpNodeInfo(), op_binding, op_graph, and THROW_ASSERT.
specify if vertex v have or not its ports swapped
v | is the vertex |
condition | is true when ports are swapped, false otherwise |
Definition at line 3397 of file fu_binding.cpp.
References ports_are_swapped.
Referenced by port_swapping::InternalExec().
void fu_binding::specialise_fu | ( | const HLS_managerRef | HLSMgr, |
const hlsRef | HLS, | ||
structural_objectRef | fu_obj, | ||
unsigned int | fu, | ||
const OpVertexSet & | operations, | ||
unsigned int | ar | ||
) |
Specialize the functional unit based on variables associated with the corresponding operations.
specializing MEMORY_STD ports
check for precision parameter
Definition at line 1836 of file fu_binding.cpp.
References tree_helper::AccessedMaximumBitsize(), ALL_BRAM, allocation_information, test_panda::args, structural_type_descriptor::BOOL, BUILTIN_WAIT_CALL, FunctionBehavior::CFG, tree_helper::CGetElements(), tree_helper::CGetType(), CLOCK_PORT_NAME, convert_to_binary(), debug_level, DEBUG_LEVEL_PEDANTIC, DEBUG_LEVEL_VERY_PEDANTIC, DONE_PORT_NAME, EXT_PIPELINED_BRAM, FLOAT_EXPR, NP_functionality::FLOPOCO_PROVIDED, hls::functionId, GET_CONST_NODE, AllocationInformation::get_fu(), AllocationInformation::get_fu_name(), structural_object::get_id(), GET_INDEX_CONST_NODE, tree_helper::get_integer_cst_value(), structural_object::get_kind(), GET_NAME, GET_NODE, AllocationInformation::get_number_channels(), structural_object::get_path(), GET_TYPE, GET_TYPE_NAME, structural_object::get_typeRef(), tree_helper::GetBaseVariable(), tree_helper::GetConstValue(), getFunctionType(), GetPath(), hls::HLS_D, INDENT_DBG_MEX, index, tree_helper::is_a_misaligned_vector(), AllocationInformation::is_direct_access_memory_unit(), AllocationInformation::is_dual_port_memory(), tree_helper::IsVectorType(), max, min, MULTI_READ_COND_STD, offset, param, hls::Param, PIPE_PARAMETER, port_vector_o_K, PRINT_DBG_MEX, PROXY_LIBRARY, RESET_PORT_NAME, port_o::resize_if_busport(), port_o::resize_std_port(), tree_helper::Size(), START_PORT_NAME, STR, THROW_ASSERT, THROW_ERROR, ToString(), TreeM, structural_type_descriptor::type, test_panda::type, TYPE_LOAD, TYPE_STORE, U, and WORK_LIBRARY.
Referenced by add_to_SM().
void fu_binding::specialize_memory_unit | ( | const HLS_managerRef | HLSMgr, |
const hlsRef | HLS, | ||
structural_objectRef | fu_obj, | ||
unsigned int | ar, | ||
const std::string & | base_address, | ||
unsigned long long | rangesize, | ||
bool | is_memory_splitted, | ||
bool | is_sparse_memory, | ||
bool | is_sds | ||
) |
Specialize a memory unit.
base address specialization
array ref initialization
specialize the number of elements in the array
Definition at line 2377 of file fu_binding.cpp.
References memory::add_memory_parameter(), hls::datapath, debug_level, DEBUG_LEVEL_VERY_PEDANTIC, fill_array_ref_memory(), hls::functionId, GetPath(), INDENT_DBG_MEX, STR, THROW_ASSERT, and TreeM.
Referenced by add_to_SM().
|
protected |
Update number of allocated units.
It takes effect only if new number is greather than stored one
unit | is the identifier associated to functional unit |
number | is the new number of allocated units |
Definition at line 234 of file fu_binding.cpp.
References allocation_map.
Referenced by bind().
|
static |
check if designated initializers are really used
check if padding is needed
add padding
check if padding is needed
add padding
check if padding is needed
add padding
Definition at line 2722 of file fu_binding.cpp.
References CASE_BINARY_EXPRESSION, CASE_CPP_NODES, CASE_FAKE_NODES, CASE_GIMPLE_NODES, CASE_PRAGMA_NODES, CASE_QUATERNARY_EXPRESSION, CASE_TERNARY_EXPRESSION, CASE_TYPE_NODES, CASE_UNARY_EXPRESSION, tree_helper::CGetType(), convert_fp_to_string(), tree_helper::get_array_dim_and_bitsize(), memory::get_base_address(), GET_CONST_NODE, GET_INDEX_CONST_NODE, GET_INDEX_NODE, tree_node::get_kind(), GET_NODE, tree_helper::GetConstValue(), memory::has_base_address(), index, max, min, offset, tree_helper::Size(), STR, THROW_ASSERT, THROW_ERROR, U, and symmetry::value.
Referenced by fill_array_ref_memory(), and TestbenchGeneration::print_var_init().
|
protected |
allocation manager. Used to retrieve the string name of the functional units.
Definition at line 106 of file fu_binding.hpp.
Referenced by ParallelMemoryFuBinding::add_to_SM(), add_to_SM(), bind(), get_fu_name(), and specialise_fu().
|
protected |
map between functional unit id and number of units allocated
Definition at line 94 of file fu_binding.hpp.
Referenced by get_allocation_list(), and update_allocation().
|
protected |
The debug level.
Definition at line 121 of file fu_binding.hpp.
Referenced by add_gate(), ParallelMemoryFuBinding::add_to_SM(), add_to_SM(), fu_binding_cs::connect_selector_kernel(), fu_binding_cs::fu_binding_cs(), fu_binding_cs::instantiate_component_kernel(), manage_extern_global_port(), fu_binding_cs::manage_memory_port_hierarchical(), fu_binding_cs::manage_memory_port_kernel(), manage_memory_ports_parallel_chained(), manage_module_ports(), ParallelMemoryFuBinding::ParallelMemoryFuBinding(), specialise_fu(), and specialize_memory_unit().
|
protected |
useful to know for automatic pipelining
Definition at line 124 of file fu_binding.hpp.
Referenced by add_to_SM().
|
protected |
operation binding
Definition at line 103 of file fu_binding.hpp.
Referenced by bind(), get(), get_assign(), get_index(), is_assigned(), and operator[]().
|
protected |
The operation graph.
Definition at line 112 of file fu_binding.hpp.
Referenced by ParallelMemoryFuBinding::add_to_SM(), add_to_SM(), bind(), get(), get_assign(), get_index(), get_operations(), is_assigned(), and operator[]().
|
protected |
reverse map that associated each functional unit with the set of operations that are executed
Definition at line 100 of file fu_binding.hpp.
Referenced by add_to_SM(), bind(), and get_operations().
|
protected |
The set of input parameters.
Definition at line 118 of file fu_binding.hpp.
Referenced by ParallelMemoryFuBinding::add_to_SM(), add_to_SM(), fu_binding_cs::connect_selector_kernel(), fu_binding_cs::instantiate_component_kernel(), fu_binding_cs::manage_memory_port_hierarchical(), ParallelMemoryFuBinding::ParallelMemoryFuBinding(), and fu_binding_cs::set_atomic_memory_parameter().
|
protected |
port assignment: ports are swapped predicate
Definition at line 115 of file fu_binding.hpp.
Referenced by set_ports_are_swapped().
|
protected |
information about the tree data-structure
Definition at line 109 of file fu_binding.hpp.
Referenced by add_to_SM(), get_assign(), specialise_fu(), and specialize_memory_unit().
|
protected |
map between unit and allocated objects
Definition at line 97 of file fu_binding.hpp.
Referenced by bind().
|
static |
The value used to identified unknown functional unit.
design_flows/backend/ToHDL include
HLS/module_allocation STD include utility include
Definition at line 178 of file fu_binding.hpp.
Referenced by SDCScheduling::AddDelayConstraints(), AllocationInformation::CanBeChained(), AllocationInformation::CanBeMerged(), Schedule::CanBeMoved(), Schedule::ComputeCriticalPath(), Schedule::EvaluateCondsMerging(), Schedule::EvaluateMultiWayIfsMerging(), AllocationInformation::GetConnectionTime(), AllocationInformation::GetTimeLatency(), AllocationInformation::GetZeroDistanceOperations(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), and Schedule::UpdateTime().