62 const auto memory_banks_number =
parameters->getOption<
unsigned int>(OPT_memory_banks_number);
64 for(
const auto& component : GetPointer<ParallelMemoryFuBinding>(HLS->
Rfu)->component_to_allow_mem_access)
68 GetPointer<port_o>(done)->add_n_ports(memory_banks_number, done);
71 const auto component_done_signal =
72 GetPointer<port_o>(component_done)->find_bounded_object(component.first->get_owner());
73 THROW_ASSERT(component_done_signal, component_done->get_path());
74 for(
unsigned int memory_bank_index = 0; memory_bank_index < memory_banks_number; memory_bank_index++)
79 const auto op = component.second->find_member(
"op",
port_o_K, component.second);
80 GetPointer<port_o>(op)->add_n_ports(memory_banks_number, op);
81 const auto access_allowed_component = component.first->find_member(
"access_allowed",
port_o_K, component.first);
83 const auto access_allowed_component_sign = SM->
add_sign_vector(
"access_allowed_" + component.first->get_id(),
84 memory_banks_number, circuit, op->get_typeRef());
86 SM->
add_connection(access_allowed_component_sign, access_allowed_component);
88 const auto start = component.first->find_member(
"start_port",
port_o_K, component.first);
90 const auto start_signal = GetPointer<port_o>(start)->find_bounded_object(component.first->get_owner());
92 const auto start_ama = component.second->find_member(
"start_port",
port_o_K, component.second);
94 GetPointer<port_o>(start_ama)->add_n_ports(memory_banks_number, start_ama);
95 for(
unsigned int memory_bank_index = 0; memory_bank_index < memory_banks_number; memory_bank_index++)
void add_connection(structural_objectRef src, structural_objectRef dest)
Create a connection between a source structural object and a destination structural object...
Data structure representing the entire HLS information.
ParallelMemoryConnBinding(const BehavioralHelperConstRef _behavioral_helper, const ParameterConstRef parameters)
Constructor.
const structural_objectRef get_circ() const
Get a reference to circ field.
virtual void add_to_SM(const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM)
Add the interconnection to the structural representation of the datapath.
generic_objRef get_port(unsigned int var, direction_type dir)
Returns reference to generic object associated to a given variable, for a specific port direction...
const ParameterConstRef parameters
The set of input parameters.
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...
fu_bindingRef Rfu
Store the refcounted functional unit binding of the operations.
Class managing the interconnection binding.
Data structure used to store the functional-unit binding of the vertices.
Data structure used to store the interconnection binding of datapath elements when parallel memory co...
This class describes all classes used to represent a structural object.
~ParallelMemoryConnBinding() override
Destructor.
this class is used to manage the command-line or XML options.
Class implementation of the structural_manager.
Datastructure to describe functions allocation in high-level synthesis.
Data structure definition for high-level synthesis flow.
void add_to_SM(const HLS_managerRef HLSMgr, const hlsRef HLS, const structural_managerRef SM) override
Add the interconnection to the structural representation of the datapath.
static structural_objectRef add_sign_vector(std::string id, unsigned int n_signs, structural_objectRef owner, structural_type_descriptorRef sign_type, unsigned int treenode=0)
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...