PandA-2024.02
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
allocation Class Reference

This wrapper collects all the methods used by the High-level synthesis classes to retrieve information about the functional units. More...

#include <allocation.hpp>

Inheritance diagram for allocation:
Inheritance graph
[legend]
Collaboration diagram for allocation:
Collaboration graph
[legend]

Public Member Functions

DesignFlowStep_Status InternalExec () override
 Execute the step. More...
 
void Initialize () override
 Initialize the step (i.e., like a constructor, but executed just before exec. More...
 
void PrintInitialIR () const override
 Dump the initial intermediate representation. More...
 
Constructors and destructors.
 allocation (const ParameterConstRef _parameters, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type=HLSFlowStep_Type::ALLOCATION)
 Constructor. More...
 
 ~allocation () override
 Destructor. More...
 
- Public Member Functions inherited from HLSFunctionStep
 HLSFunctionStep (const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization=HLSFlowStepSpecializationConstRef())
 Constructor. More...
 
 ~HLSFunctionStep () override
 Destructor. More...
 
bool HasToBeExecuted () const override
 Check if this step has actually to be executed. More...
 
std::string GetSignature () const final
 Return a unified identifier of this design step. More...
 
std::string GetName () const final
 Return the name of this design step. More...
 
DesignFlowStep_Status Exec () final
 Execute the step. More...
 
- Public Member Functions inherited from HLS_step
 HLS_step (const ParameterConstRef _parameters, const HLS_managerRef HLSMgr, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization=HLSFlowStepSpecializationConstRef())
 Constructor. More...
 
 ~HLS_step () override
 Destructor. More...
 
std::string GetSignature () const override
 Return a unified identifier of this design step. More...
 
std::string GetName () const override
 Return the name of this design step. More...
 
virtual std::string GetKindText () const
 Return the name of the type of this frontend flow step. More...
 
DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory () const final
 Return the factory to create this type of steps. More...
 
- Public Member Functions inherited from DesignFlowStep
 DesignFlowStep (const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
 Constructor. More...
 
virtual ~DesignFlowStep ()
 Destructor. More...
 
DesignFlowStep_Status GetStatus () const
 Return the status of this design step. More...
 
virtual void WriteDot (std::ostream &out) const
 Write the label for a dot graph. More...
 
bool IsComposed () const
 Returns if this step is composed. More...
 
int CGetDebugLevel () const
 Return the debug level of the step. More...
 
virtual void PrintFinalIR () const
 Dump the final intermediate representation. More...
 

Protected Member Functions

technology_nodeRef get_fu (const std::string &fu_name)
 Returns the technology_node associated with the given operation. More...
 
std::string get_compliant_pipelined_unit (double clock, const std::string &pipe_parameter, const technology_nodeRef current_fu, const std::string &curr_op, const std::string &library_name, const std::string &template_suffix, unsigned long long module_prec)
 In case the current functional unit has pipelined operations then it return an id identifying the most compliant functional unit given the current clock period. More...
 
technology_nodeRef extract_bambu_provided (const std::string &library_name, operation *curr_op, const std::string &bambu_provided_resource_)
 
void set_number_channels (unsigned int fu_name, unsigned int n_ports)
 set the number of ports associated with the functional unit More...
 
double get_execution_time_dsp_modified (const unsigned int fu_name, const technology_nodeRef &node_op) const
 
double get_stage_period_dsp_modified (const unsigned int fu_name, const technology_nodeRef &node_op) const
 
void add_proxy_function_module (const HLS_constraintsRef HLS_C, technology_nodeRef techNode_obj, const std::string &orig_fun_name)
 Add a proxy function to the WORK library. More...
 
void add_proxy_function_wrapper (const std::string &library_name, technology_nodeRef techNode_obj, const std::string &orig_fun_name)
 Add a proxy wrapper to the WORK library. More...
 
void BuildProxyWrapper (functional_unit *current_fu, const std::string &orig_fun_name, const std::string &orig_library_name)
 Build the proxy wrapper. More...
 
void BuildProxyFunctionVerilog (functional_unit *current_fu)
 Build the proxy function in Verilog. More...
 
void BuildProxyFunctionVHDL (functional_unit *current_fu)
 Build the proxy function in VHDL. More...
 
void BuildProxyFunction (functional_unit *current_fu)
 Build the proxy function. More...
 
void add_tech_constraint (technology_nodeRef cur_fu, unsigned int tech_constrain_value, unsigned int pos, bool proxy_constrained)
 
void add_resource_to_fu_list (std::string channels_type, const OpGraphConstRef g, technology_nodeRef current_fu, CustomOrderedSet< vertex > vertex_analysed, node_kind_prec_infoRef node_info, unsigned int current_id, CustomOrderedSet< vertex >::const_iterator vert, const std::vector< std::string > &libraries, bool isMemory, std::string bambu_provided_resource, operation *curr_op, std::string specialized_fuName, bool predicate_2, std::string current_op, HLS_manager::io_binding_type constant_id, bool varargs_fu, unsigned int l, std::string memory_ctrl_type, std::map< std::string, technology_nodeRef > new_fu, unsigned int tech_constrain_value)
 
bool check_templated_units (double clock_period, node_kind_prec_infoRef node_info, const library_managerRef library, technology_nodeRef current_fu, operation *curr_op)
 
bool check_for_memory_compliancy (bool Has_extern_allocated_data, technology_nodeRef current_fu, const std::string &memory_ctrl_type, const std::string &channels_type)
 
bool check_type_and_precision (operation *curr_op, node_kind_prec_infoRef node_info)
 
bool check_proxies (const library_managerRef library, const std::string &fu_name_)
 
bool check_generated_bambu_flopoco (bool skip_softfloat_resources, structural_managerRef structManager_obj, std::string &bambu_provided_resource, bool skip_flopoco_resources, technology_nodeRef current_fu)
 
bool is_ram_not_timing_compliant (const HLS_constraintsRef HLS_C, unsigned int var, technology_nodeRef current_fu)
 
std::string get_synch_ram_latency (const std::string &ram_template, const std::string &latency_postfix, const HLS_constraintsRef HLS_C, unsigned int var)
 
virtual void IntegrateTechnologyLibraries ()
 Integrate technology libraries with special functional units. More...
 
const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships (const DesignFlowStep::RelationshipType relationship_type) const override
 Return the set of analyses in relationship with this design step. More...
 
void ComputeRelationships (DesignFlowStepSet &relationship, const DesignFlowStep::RelationshipType relationship_type) override
 Compute the relationships of a step with other steps. More...
 

Protected Attributes

AllocationInformationRef allocation_information
 The allocation solution. More...
 
std::map< std::string, std::string > precomputed_pipeline_unit
 store the precomputed pipeline unit: given a functional unit it return the pipeline id compliant More...
 
std::map< technology_nodeRef, std::map< unsigned long long, std::map< HLS_manager::io_binding_type, unsigned int > > > fu_list
 
HLS_deviceRef HLS_D
 The HLS target. More...
 
technology_managerRef TechM
 The technology manager. More...
 
- Protected Attributes inherited from HLSFunctionStep
std::map< unsigned int, unsigned int > last_bb_ver
 last bb version of the called functions More...
 
std::map< unsigned int, unsigned int > last_bitvalue_ver
 The version of bit value IR representation on which this step was applied. More...
 
const unsigned int funId
 identifier of the function to be processed (0 means that it is a global step) More...
 
hlsRef HLS
 HLS data structure of the function to be analyzed. More...
 
unsigned int bb_version
 The version of bb intermediate representation on which this step was applied. More...
 
unsigned int bitvalue_version
 The version of bitvalue on which this step was applied. More...
 
unsigned int memory_version
 The version of memory representation on which this step was applied. More...
 
- Protected Attributes inherited from HLS_step
const HLS_managerRef HLSMgr
 information about all the HLS synthesis More...
 
const HLSFlowStep_Type hls_flow_step_type
 The type of this step. More...
 
const HLSFlowStepSpecializationConstRef hls_flow_step_specialization
 The information about specialization. More...
 
- Protected Attributes inherited from DesignFlowStep
bool composed
 True if this step represents a composition of design flow steps (e.g., a flow); must be set by specialized constructors. More...
 
const Wrefcount< const DesignFlowManagerdesign_flow_manager
 The design flow manager. More...
 
const ParameterConstRef parameters
 Set of input parameters. More...
 
int debug_level
 The debug level. More...
 
const int output_level
 The output level. More...
 

Friends

struct updatecopy_HLS_constraints_functor
 

Additional Inherited Members

- Public Types inherited from DesignFlowStep
enum  RelationshipType { DEPENDENCE_RELATIONSHIP, INVALIDATION_RELATIONSHIP, PRECEDENCE_RELATIONSHIP }
 The relationship type. More...
 
- Static Public Member Functions inherited from HLSFunctionStep
static std::string ComputeSignature (const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization, const unsigned int function_id)
 Compute the signature of a hls flow step. More...
 
- Static Public Member Functions inherited from HLS_step
static std::string EnumToName (const HLSFlowStep_Type hls_flow_step_type)
 Given a HLS flow step type, return the name of the type. More...
 
static const std::string ComputeSignature (const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization)
 Compute the signature of a hls flow step. More...
 
- Static Protected Attributes inherited from HLS_step
static CustomUnorderedMap< std::string, HLSFlowStep_Typecommand_line_name_to_enum
 Map hls step name to enum. More...
 

Detailed Description

This wrapper collects all the methods used by the High-level synthesis classes to retrieve information about the functional units.

Definition at line 102 of file allocation.hpp.

Constructor & Destructor Documentation

◆ allocation()

allocation::allocation ( const ParameterConstRef  _parameters,
const HLS_managerRef  HLSMgr,
unsigned int  funId,
const DesignFlowManagerConstRef  design_flow_manager,
const HLSFlowStep_Type  = HLSFlowStep_Type::ALLOCATION 
)

Constructor.

Parameters
design_flow_manageris the design flow manager

Definition at line 146 of file allocation.cpp.

References DesignFlowStep::debug_level, GET_CLASS, and ~allocation().

Here is the call graph for this function:

◆ ~allocation()

allocation::~allocation ( )
overridedefault

Destructor.

Referenced by allocation().

Here is the caller graph for this function:

Member Function Documentation

◆ add_proxy_function_module()

void allocation::add_proxy_function_module ( const HLS_constraintsRef  HLS_C,
technology_nodeRef  techNode_obj,
const std::string &  orig_fun_name 
)
protected

◆ add_proxy_function_wrapper()

void allocation::add_proxy_function_wrapper ( const std::string &  library_name,
technology_nodeRef  techNode_obj,
const std::string &  orig_fun_name 
)
protected

◆ add_resource_to_fu_list()

void allocation::add_resource_to_fu_list ( std::string  channels_type,
const OpGraphConstRef  g,
technology_nodeRef  current_fu,
CustomOrderedSet< vertex vertex_analysed,
node_kind_prec_infoRef  node_info,
unsigned int  current_id,
CustomOrderedSet< vertex >::const_iterator  vert,
const std::vector< std::string > &  libraries,
bool  isMemory,
std::string  bambu_provided_resource,
operation curr_op,
std::string  specialized_fuName,
bool  predicate_2,
std::string  current_op,
HLS_manager::io_binding_type  constant_id,
bool  varargs_fu,
unsigned int  l,
std::string  memory_ctrl_type,
std::map< std::string, technology_nodeRef new_fu,
unsigned int  tech_constrain_value 
)
protected

◆ add_tech_constraint()

void allocation::add_tech_constraint ( technology_nodeRef  cur_fu,
unsigned int  tech_constrain_value,
unsigned int  pos,
bool  proxy_constrained 
)
protected

check resource constraints for indirect memory accesses

Definition at line 1097 of file allocation.cpp.

References allocation_information, DesignFlowStep::debug_level, DEBUG_LEVEL_PEDANTIC, technology_node::get_name(), AllocationInformation::get_number_channels(), INDENT_DBG_MEX, AllocationInformation::is_indirect_access_memory_unit(), AllocationInformation::list_of_FU, STR, and AllocationInformation::tech_constraints.

Referenced by InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildProxyFunction()

void allocation::BuildProxyFunction ( functional_unit current_fu)
protected

Build the proxy function.

Definition at line 857 of file allocation.cpp.

References BuildProxyFunctionVerilog(), BuildProxyFunctionVHDL(), DesignFlowStep::parameters, SYSTEM_VERILOG, THROW_UNREACHABLE, VERILOG, and VHDL.

Referenced by add_proxy_function_module(), and extract_bambu_provided().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildProxyFunctionVerilog()

void allocation::BuildProxyFunctionVerilog ( functional_unit current_fu)
protected

◆ BuildProxyFunctionVHDL()

void allocation::BuildProxyFunctionVHDL ( functional_unit current_fu)
protected

◆ BuildProxyWrapper()

void allocation::BuildProxyWrapper ( functional_unit current_fu,
const std::string &  orig_fun_name,
const std::string &  orig_library_name 
)
protected

◆ check_for_memory_compliancy()

bool allocation::check_for_memory_compliancy ( bool  Has_extern_allocated_data,
technology_nodeRef  current_fu,
const std::string &  memory_ctrl_type,
const std::string &  channels_type 
)
protected

LOAD/STORE operations allocated on memories have been already allocated

LOAD/STORE operations on proxys have been already managed

Definition at line 1194 of file allocation.cpp.

References CHANNELS_TYPE_MEM_ACC_CS, CHANNELS_TYPE_MEM_ACC_NN, CHANNELS_TYPE_MEM_ACC_P1N, HLSFunctionStep::funId, HLS_step::HLSMgr, MEM_ACC_11, MEM_ACC_CS, MEM_ACC_N1, MEM_ACC_NN, MEM_ACC_P1N, MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_PROXY, MEMORY_CTRL_TYPE_PROXYN, MEMORY_CTRL_TYPE_SPROXY, MEMORY_CTRL_TYPE_SPROXYN, DesignFlowStep::parameters, THROW_ERROR, and THROW_UNREACHABLE.

Referenced by InternalExec().

Here is the caller graph for this function:

◆ check_generated_bambu_flopoco()

bool allocation::check_generated_bambu_flopoco ( bool  skip_softfloat_resources,
structural_managerRef  structManager_obj,
std::string &  bambu_provided_resource,
bool  skip_flopoco_resources,
technology_nodeRef  current_fu 
)
protected

generated cannot be directly considered for allocation

Definition at line 1356 of file allocation.cpp.

References NP_functionality::BAMBU_PROVIDED, NP_functionality::FLOPOCO_PROVIDED, structural_manager::get_circ(), get_fu(), NP_functionality::get_NP_functionality(), and lenet_tvm::mod.

Referenced by InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_proxies()

bool allocation::check_proxies ( const library_managerRef  library,
const std::string &  fu_name_ 
)
protected

Definition at line 1327 of file allocation.cpp.

References HLSFunctionStep::funId, library_manager::get_library_name(), HLS_step::HLSMgr, PROXY_LIBRARY, PROXY_PREFIX, starts_with(), THROW_ASSERT, and WRAPPED_PROXY_PREFIX.

Referenced by InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_templated_units()

bool allocation::check_templated_units ( double  clock_period,
node_kind_prec_infoRef  node_info,
const library_managerRef  library,
technology_nodeRef  current_fu,
operation curr_op 
)
protected

◆ check_type_and_precision()

bool allocation::check_type_and_precision ( operation curr_op,
node_kind_prec_infoRef  node_info 
)
protected

Definition at line 1311 of file allocation.cpp.

References DesignFlowStep::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, INDENT_DBG_MEX, and operation::is_type_supported().

Referenced by InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeHLSRelationships()

const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > allocation::ComputeHLSRelationships ( const DesignFlowStep::RelationshipType  relationship_type) const
overrideprotectedvirtual

Return the set of analyses in relationship with this design step.

Parameters
relationship_typeis the type of relationship to be considered

Reimplemented from HLS_step.

Definition at line 174 of file allocation.cpp.

References CALLED_FUNCTIONS, DesignFlowStep::DEPENDENCE_RELATIONSHIP, DOMINATOR_ALLOCATION, HLS_FUNCTION_BIT_VALUE, HLS_SYNTHESIS_FLOW, DesignFlowStep::INVALIDATION_RELATIONSHIP, DesignFlowStep::parameters, DesignFlowStep::PRECEDENCE_RELATIONSHIP, SAME_FUNCTION, THROW_UNREACHABLE, and WHOLE_APPLICATION.

◆ ComputeRelationships()

void allocation::ComputeRelationships ( DesignFlowStepSet relationship,
const DesignFlowStep::RelationshipType  relationship_type 
)
overrideprotectedvirtual

Compute the relationships of a step with other steps.

Parameters
dependenciesis where relationships will be stored
relationship_typeis the type of relationship to be computed

Managed in HLS_step::ComputeRelationships

Reimplemented from HLSFunctionStep.

Definition at line 205 of file allocation.cpp.

References HLSFunctionStep::ComputeRelationships(), FunctionFrontendFlowStep::ComputeSignature(), DesignFlowStep::DEPENDENCE_RELATIONSHIP, DesignFlowStep::design_flow_manager, HLSFunctionStep::funId, Wrefcount< T >::lock(), NULL_VERTEX, and DesignFlowStep::parameters.

Here is the call graph for this function:

◆ extract_bambu_provided()

technology_nodeRef allocation::extract_bambu_provided ( const std::string &  library_name,
operation curr_op,
const std::string &  bambu_provided_resource_ 
)
protected

◆ get_compliant_pipelined_unit()

std::string allocation::get_compliant_pipelined_unit ( double  clock,
const std::string &  pipe_parameter,
const technology_nodeRef  current_fu,
const std::string &  curr_op,
const std::string &  library_name,
const std::string &  template_suffix,
unsigned long long  module_prec 
)
protected

In case the current functional unit has pipelined operations then it return an id identifying the most compliant functional unit given the current clock period.

in case no pipelined version exist it returns the one not pipelined

in case clock is not compatible with any of the pipelined version it returns the fastest pipelined version available

Definition at line 2536 of file allocation.cpp.

References allocation_information, AllocationInformation::DSP_allocation_coefficient, AllocationInformation::DSP_y_db, AllocationInformation::DSPs_margin, AllocationInformation::DSPs_margin_stage, NP_functionality::FLOPOCO_PROVIDED, functional_unit_template::FU, structural_manager::get_circ(), NP_functionality::get_NP_functionality(), functional_unit::get_operation(), area_info::get_resource_value(), generic_device::get_technology_manager(), HLS_D, is_a_skip_operation(), max, DesignFlowStep::parameters, precomputed_pipeline_unit, SplitString(), STR, THROW_ASSERT, THROW_WARNING, AllocationInformation::time_m_execution_time(), and AllocationInformation::time_m_stage_period().

Referenced by check_templated_units().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_execution_time_dsp_modified()

double allocation::get_execution_time_dsp_modified ( const unsigned int  fu_name,
const technology_nodeRef node_op 
) const
protected

◆ get_fu()

technology_nodeRef allocation::get_fu ( const std::string &  fu_name)
protected

Returns the technology_node associated with the given operation.

Parameters
fu_nameis the string representing the name of the unit

Definition at line 2698 of file allocation.cpp.

References generic_device::get_technology_manager(), and HLS_D.

Referenced by check_generated_bambu_flopoco(), get_synch_ram_latency(), IntegrateTechnologyLibraries(), and InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_stage_period_dsp_modified()

double allocation::get_stage_period_dsp_modified ( const unsigned int  fu_name,
const technology_nodeRef node_op 
) const
protected

◆ get_synch_ram_latency()

std::string allocation::get_synch_ram_latency ( const std::string &  ram_template,
const std::string &  latency_postfix,
const HLS_constraintsRef  HLS_C,
unsigned int  var 
)
protected

Definition at line 2732 of file allocation.cpp.

References allocation_information, get_fu(), AllocationInformation::get_latency_string(), is_ram_not_timing_compliant(), and AllocationInformation::sync_ram_var_latency.

Referenced by IntegrateTechnologyLibraries().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

void allocation::Initialize ( )
overridevirtual

Initialize the step (i.e., like a constructor, but executed just before exec.

Reimplemented from HLSFunctionStep.

Definition at line 155 of file allocation.cpp.

References allocation_information, hls::allocation_information, AllocationInformation::Clear(), fu_list, HLSFunctionStep::funId, generic_device::get_technology_manager(), HLSFunctionStep::HLS, HLS_D, HLS_step::HLSMgr, HLSFunctionStep::Initialize(), AllocationInformation::Initialize(), DesignFlowStep::parameters, and TechM.

Here is the call graph for this function:

◆ IntegrateTechnologyLibraries()

void allocation::IntegrateTechnologyLibraries ( )
protectedvirtual

Integrate technology libraries with special functional units.

check clock constraints compatibility

allocate proxies

add shared functions to the technology manager

allocate it

add shared function proxies to the technology manager

Reimplemented in OmpAllocation.

Definition at line 2752 of file allocation.cpp.

References add_proxy_function_module(), add_proxy_function_wrapper(), allocation_information, ARRAY_1D_STD_BRAM, ARRAY_1D_STD_BRAM_N1, ARRAY_1D_STD_BRAM_N1_SDS, ARRAY_1D_STD_BRAM_N1_SDS_BUS, ARRAY_1D_STD_BRAM_NN, ARRAY_1D_STD_BRAM_NN_SDS, ARRAY_1D_STD_BRAM_NN_SDS_BUS, ARRAY_1D_STD_BRAM_SDS, ARRAY_1D_STD_BRAM_SDS_BUS, ARRAY_1D_STD_DISTRAM_N1_SDS, ARRAY_1D_STD_DISTRAM_NN_SDS, ARRAY_1D_STD_DISTRAM_SDS, AllocationInformation::can_be_asynchronous_ram(), DesignFlowStep::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, DPROXY_CTRL, DPROXY_CTRLN, fu_list, HLSFunctionStep::funId, structural_manager::get_circ(), AllocationInformation::get_correction_time(), get_fu(), library_manager::get_fu(), technology_manager::get_fu(), GET_INDEX_CONST_NODE, AllocationInformation::get_latency_string(), technology_manager::get_library(), technology_manager::get_library_manager(), technology_node::get_name(), AllocationInformation::get_number_fu_types(), AllocationInformation::get_setup_hold_time(), get_synch_ram_latency(), HLSFunctionStep::HLS, hls::HLS_C, HLS_step::HLSMgr, AllocationInformation::id_to_fu_names, INDENT_DBG_MEX, INFINITE_UINT, is_ram_not_timing_compliant(), AllocationInformation::list_of_FU, MEM_ACC_11, MEM_ACC_N1, MEM_ACC_NN, MEM_ACC_P1N, AllocationInformation::memory_units, AllocationInformation::memory_units_sizes, DesignFlowStep::parameters, AllocationInformation::precision_map, PROXY_CTRL, PROXY_CTRLN, PROXY_LIBRARY, AllocationInformation::proxy_memory_units, PROXY_PREFIX, AllocationInformation::proxy_wrapped_units, set_number_channels(), tree_helper::Size(), SPROXY_CTRL, SPROXY_CTRLN, STR, AllocationInformation::tech_constraints, TechM, THROW_ASSERT, THROW_ERROR, AllocationInformation::time_m_execution_time(), AllocationInformation::vars_to_memory_units, NP_functionality::VERILOG_GENERATOR, NP_functionality::VHDL_GENERATOR, and WRAPPED_PROXY_PREFIX.

Referenced by OmpAllocation::IntegrateTechnologyLibraries(), and InternalExec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InternalExec()

DesignFlowStep_Status allocation::InternalExec ( )
overridevirtual

Execute the step.

Returns
the exit status of this step

skip library of internal components

check proxy functions

check for generated module and bambu/flopoco resources

Check for correct type and precision

in case the operation is pipelined check the clock period

These data structure are filled only once

Implements HLSFunctionStep.

Definition at line 1419 of file allocation.cpp.

References technology_manager::add(), add_tech_constraint(), ADDR_EXPR, ADDR_EXPR_STD, ALL_BRAM, allocation_information, ASSERT_EXPR, ASSERT_EXPR_REAL_STD, ASSERT_EXPR_SIGNED_STD, ASSERT_EXPR_UNSIGNED_STD, ASSIGN, ASSIGN_REAL_STD, ASSIGN_SIGNED_STD, ASSIGN_UNSIGNED_STD, ASSIGN_VEC_SIGNED_STD, ASSIGN_VEC_UNSIGNED_STD, ASSIGN_VECTOR_BOOL_STD, HLSFunctionStep::bb_version, AllocationInformation::binding, BIVECTOR_CONVERTER_STD, BUVECTOR_CONVERTER_STD, FunctionBehavior::CFG, tree_helper::CGetElements(), tree_helper::CGetType(), CHANNELS_TYPE_MEM_ACC_NN, CHANNELS_TYPE_MEM_ACC_P1N, check_for_memory_compliancy(), check_generated_bambu_flopoco(), check_proxies(), check_templated_units(), check_type_and_precision(), CLOCK_PORT_NAME, CONVERT_EXPR, DesignFlowStep::debug_level, DEBUG_LEVEL_PEDANTIC, DEBUG_LEVEL_VERBOSE, DEBUG_LEVEL_VERY_PEDANTIC, ENCODE_FU_LIB, encode_op_type(), encode_op_type_prec(), ENTRY, ENTRY_ID, ENTRY_STD, EXIT, EXIT_ID, EXIT_STD, EXT_PIPELINED_BRAM, extract_bambu_provided(), AllocationInformation::extract_bambu_provided_name(), EXTRACT_BIT_EXPR, EXTRACT_BIT_EXPR_SIGNED_STD, EXTRACT_BIT_EXPR_UNSIGNED_STD, FFDATA_CONVERTER_STD, fu_list, functional_unit_K, hls::functionId, HLSFunctionStep::funId, AllocationInformation::fus_to_node_id, GET_CONST_NODE, AllocationInformation::get_cycles(), AllocationInformation::get_DSPs(), get_fu(), technology_manager::get_fu(), library_manager::get_fu(), technology_manager::get_library(), technology_manager::get_library_list(), technology_manager::get_library_manager(), GET_NAME, technology_node::get_name(), AllocationInformation::get_number_fu_types(), GET_TYPE, tree_helper::GetBaseVariable(), functions::GetFUName(), AllocationInformation::GetNodeTypePrec(), GIMPLE_ASM, GIMPLE_GOTO, GIMPLE_GOTO_STD, GIMPLE_LABEL, GIMPLE_LABEL_STD, GIMPLE_NOP, GIMPLE_NOP_STD, GIMPLE_PHI, GIMPLE_PHI_STD, GIMPLE_PRAGMA, GIMPLE_PRAGMA_STD, GIMPLE_RETURN, GIMPLE_RETURN_STD, HLSFunctionStep::HLS, hls::HLS_C, HLS_step::HLSMgr, AllocationInformation::id_to_fu_names, IICONVERTER_EXPR_STD, IIDATA_CONVERTER_STD, IIVECTOR_CONVERTER_STD, INDENT_DBG_MEX, INDENT_OUT_MEX, tree_node::index, INFINITE_UINT, insert(), IntegrateTechnologyLibraries(), INTERFACE_LIBRARY, AllocationInformation::is_indirect_access_memory_unit(), AllocationInformation::is_memory_unit(), AllocationInformation::is_operation_bounded(), AllocationInformation::is_vertex_bounded_rel, tree_helper::IsBooleanType(), tree_helper::IsComplexType(), tree_helper::IsEnumType(), tree_helper::IsPointerType(), tree_helper::IsRealType(), tree_helper::IsSignedIntegerType(), tree_helper::IsUnsignedIntegerType(), tree_helper::IsVectorType(), IUCONVERTER_EXPR_STD, IUDATA_CONVERTER_STD, IUVECTOR_CONVERTER_STD, key, AllocationInformation::list_of_FU, LUT_EXPR, LUT_EXPR_STD, AllocationInformation::memory_units, lenet_tvm::mod, MULTI_READ_COND, MULTI_READ_COND_STD, AllocationInformation::n_complex_operations, AllocationInformation::node_id_to_fus, NOP, NOP_EXPR, NOP_STD, tree_helper::NormalizeTypename(), hls::operations, DesignFlowStep::output_level, OUTPUT_LEVEL_MINIMUM, OUTPUT_LEVEL_PEDANTIC, OUTPUT_LEVEL_VERY_VERY_PEDANTIC, DesignFlowStep::parameters, AllocationInformation::precision_map, AllocationInformation::print_allocated_resources(), print_cpu_time(), AllocationInformation::proxy_function_units, PROXY_LIBRARY, AllocationInformation::proxy_memory_units, PROXY_PREFIX, AllocationInformation::proxy_wrapped_units, READ_COND, READ_COND_STD, RESET_PORT_NAME, set_number_channels(), AllocationInformation::simple_pointer_plus_expr, AllocationInformation::single_bool_test_cond_expr_units, tree_helper::Size(), START_PORT_NAME, START_TIME, starts_with(), STOP_TIME, STR, SUCCESS, SWITCH_COND, SWITCH_COND_STD, AllocationInformation::tech_constraints, TechM, THROW_ASSERT, THROW_ERROR, THROW_UNREACHABLE, AllocationInformation::time_m_stage_period(), test_panda::type, TYPE_LOAD, TYPE_MEMCPY, TYPE_STORE, U, UBVECTOR_CONVERTER_STD, UICONVERTER_EXPR_STD, UIDATA_CONVERTER_STD, UIVECTOR_CONVERTER_STD, UUCONVERTER_EXPR_STD, UUDATA_CONVERTER_STD, UUVECTOR_CONVERTER_STD, AllocationInformation::vars_to_memory_units, NP_functionality::VERILOG_GENERATOR, NP_functionality::VHDL_GENERATOR, VIEW_CONVERT_EXPR, VIEW_CONVERT_STD_INT, VIEW_CONVERT_STD_REAL, VIEW_CONVERT_STD_UINT, WORK_LIBRARY, and WRAPPED_PROXY_PREFIX.

Here is the call graph for this function:

◆ is_ram_not_timing_compliant()

bool allocation::is_ram_not_timing_compliant ( const HLS_constraintsRef  HLS_C,
unsigned int  var,
technology_nodeRef  current_fu 
)
protected

◆ PrintInitialIR()

void allocation::PrintInitialIR ( ) const
overridevirtual

Dump the initial intermediate representation.

Reimplemented from DesignFlowStep.

Definition at line 3165 of file allocation.cpp.

References HLSFunctionStep::GetName(), DesignFlowStep::parameters, technology_manager::print(), and TechM.

Here is the call graph for this function:

◆ set_number_channels()

void allocation::set_number_channels ( unsigned int  fu_name,
unsigned int  n_ports 
)
protected

set the number of ports associated with the functional unit

Parameters
fu_nameis the functional unit id
n_portsis the number of ports

Definition at line 2693 of file allocation.cpp.

References allocation_information, and AllocationInformation::nports_map.

Referenced by IntegrateTechnologyLibraries(), and InternalExec().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ updatecopy_HLS_constraints_functor

friend struct updatecopy_HLS_constraints_functor
friend

Definition at line 107 of file allocation.hpp.

Field Documentation

◆ allocation_information

AllocationInformationRef allocation::allocation_information
protected

◆ fu_list

std::map<technology_nodeRef, std::map<unsigned long long, std::map<HLS_manager::io_binding_type, unsigned int> > > allocation::fu_list
protected

Definition at line 113 of file allocation.hpp.

Referenced by Initialize(), IntegrateTechnologyLibraries(), and InternalExec().

◆ HLS_D

HLS_deviceRef allocation::HLS_D
protected

The HLS target.

Definition at line 116 of file allocation.hpp.

Referenced by get_compliant_pipelined_unit(), get_fu(), and Initialize().

◆ precomputed_pipeline_unit

std::map<std::string, std::string> allocation::precomputed_pipeline_unit
protected

store the precomputed pipeline unit: given a functional unit it return the pipeline id compliant

Definition at line 110 of file allocation.hpp.

Referenced by get_compliant_pipelined_unit().

◆ TechM

technology_managerRef allocation::TechM
protected

The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:03:43 for PandA-2024.02 by doxygen 1.8.13