PandA-2024.02
|
#include <allocation_information.hpp>
Public Types | |
enum | op_target { initiation_time, power_consumption, execution_time } |
Public Member Functions | |
AllocationInformation (const HLS_managerRef _hls_manager, const unsigned int _function_index, const ParameterConstRef parameters) | |
Constructor. More... | |
void | Initialize () override |
Initialize all the data structure. More... | |
void | Clear () override |
Clear all the data structure. More... | |
~AllocationInformation () override | |
Destructor. More... | |
const CustomOrderedSet< unsigned int > & | can_implement_set (const vertex v) const |
Returns the set of functional units that can be used to implement the operation associated with vertex v. More... | |
const CustomOrderedSet< unsigned int > & | can_implement_set (const unsigned int v) const |
bool | CanImplementSetNotEmpty (const unsigned int v) const |
Return if any functional unit has been allocated for an operation. More... | |
std::pair< std::string, std::string > | get_fu_name (unsigned int id) const |
Returns the name of the functional unit, associated with the name of the library, given the corresponding identifier. More... | |
unsigned int | get_number_fu (unsigned int fu_name) const |
Returns the number of functional unit given its id. More... | |
unsigned int | get_number_fu_types () const |
Returns the number of functional units types. More... | |
double | get_execution_time (const unsigned int fu_name, const vertex v, const OpGraphConstRef g) const |
Returns the execution time for a given vertex and a given functional unit. More... | |
double | get_execution_time (const unsigned int fu_name, const unsigned int v) const |
ControlStep | op_et_to_cycles (double et, double clock_period) const |
Calculates the control steps required for a specific operation. More... | |
unsigned int | max_number_of_resources (const vertex v) const |
Computes the maximum number of resources implementing the operation associated with the vertex v. More... | |
unsigned int | max_number_of_operations (unsigned int fu) const |
return the maximum number of operations that insists on the same type of functional unit More... | |
double | get_attribute_of_fu_per_op (const vertex v, const OpGraphConstRef g, const Allocation_MinMax allocation_min_max, op_target target, unsigned int &fu_name, bool &flag, const updatecopy_HLS_constraints_functor *CF=nullptr) const |
This method returns the min or the max value of the execution time/power consumption/initiation time for a vertex. More... | |
double | get_attribute_of_fu_per_op (const vertex v, const OpGraphConstRef g, const Allocation_MinMax allocation_min_max, op_target target) const |
This method returns the min or the max value of the execution time/power consumption/initiation time for a vertex. More... | |
unsigned int | min_number_of_resources (const vertex v) const |
Computes the minum number of resources implementing the operation associated with the vertex v. More... | |
double | get_setup_hold_time () const |
bool | is_indirect_access_memory_unit (unsigned int fu) const |
return true in case fu type is a resource unit performing an indirect access to memory More... | |
double | get_worst_execution_time (const unsigned int fu_name) const |
Returns the worst execution time for all the operations associated with the functional unit. More... | |
double | get_area (const unsigned int fu_name) const |
Returns the area for a given functional unit. More... | |
double | GetStatementArea (const unsigned int statement_index) const |
Returns the area for a given statement. More... | |
unsigned long long | get_prec (const unsigned int fu_name) const |
return the precision of the given functional unit More... | |
double | get_DSPs (const unsigned int fu_name) const |
return an estimation of the number of DSPs used by the unit More... | |
ControlStep | get_initiation_time (const unsigned int fu_name, const vertex v) const |
Returns the initiation time for a given vertex and a given functional unit. More... | |
ControlStep | get_initiation_time (const unsigned int fu_name, const unsigned int statement_index) const |
Returns the initiation time for a given operation and a given functional unit. More... | |
bool | is_operation_bounded (const OpGraphConstRef g, const vertex &op, unsigned int fu_type) const |
Checks if the given operation has a bounded execution time or not. More... | |
bool | is_operation_bounded (const unsigned int index, unsigned int fu_type) const |
Checks if the given operation has a bounded execution time or not. More... | |
bool | is_operation_bounded (const unsigned int index) const |
Checks if the given operation has a bounded execution time or not if the operation is assigned to a functional unit, check if execution time on it is bounded or not if the operation is not assigned to a functional unit, return true for small operations (i.e., Boolean expression) More... | |
bool | is_operation_PI_registered (const OpGraphConstRef g, const vertex &op, unsigned int fu_type) const |
Checks if the given operation has its primary input registered or not. More... | |
bool | is_operation_PI_registered (const unsigned int index, unsigned int fu_type) const |
Checks if the given operation has its primary input registered or not. More... | |
bool | is_operation_PI_registered (const unsigned int index) const |
Checks if the given operation has its primary input registered or not. More... | |
bool | is_direct_access_memory_unit (unsigned int fu_type) const |
return true in case fu type is a memory unit with direct access channels More... | |
bool | is_dual_port_memory (unsigned int fu_type) const |
return true in case the memory has decoupled addresses for writing and reading More... | |
bool | is_direct_proxy_memory_unit (unsigned int fu_type) const |
return true in case4 fu type is a memory unit accessed through a proxy module More... | |
bool | is_read_cond (const unsigned int fu_name) const |
Checks if the functional unit implements a READ_COND operation. More... | |
bool | is_assign (const unsigned int fu_name) const |
Checks if the functional unit implements an ASSIGN operation. More... | |
bool | is_return (const unsigned int fu_name) const |
Checks if the functional unit implements a RETURN operation. More... | |
bool | is_memory_unit (const unsigned int fu_name) const |
Returns true if the fu_name is a memory unit. More... | |
bool | is_proxy_unit (const unsigned int fu_name) const |
check if a functional unit is a proxy More... | |
bool | is_proxy_function_unit (const unsigned int fu_name) const |
check if a functional unit is a proxy function unit More... | |
bool | is_proxy_wrapped_unit (const unsigned int fu_name) const |
check if a functional unit is a proxy wrapped unit More... | |
unsigned int | get_memory_var (const unsigned int fu_name) const |
Returns the base address of the functional unit. More... | |
const std::map< unsigned int, unsigned int > & | get_proxy_memory_units () const |
return the set of proxy memory units More... | |
unsigned int | get_proxy_memory_var (const unsigned int fu_name) const |
return the var associated with the proxy unit More... | |
const std::map< unsigned int, std::string > & | get_proxy_function_units () const |
return the set of proxy function units More... | |
const std::map< unsigned int, std::string > & | get_proxy_wrapped_units () const |
return the set of proxy wrapped units More... | |
double | get_stage_period (const unsigned int fu_name, const vertex v, const OpGraphConstRef g) const |
Return the stage period for a given vertex and a given pipelined functional unit. More... | |
double | get_stage_period (const unsigned int fu_name, const unsigned int v) const |
double | get_correction_time (unsigned int fu, const std::string &operation_name, unsigned int n_ins) const |
return a time to be subtracted to the execution time/stage period More... | |
double | estimate_mux_time (unsigned int fu_name) const |
estimate the delay of a mux that can be uses to mux the input of the given functional unit More... | |
double | estimate_muxNto1_delay (unsigned long long fu_prec, unsigned int mux_ins) const |
Return the delay due to mux with n-inputs. More... | |
double | estimate_muxNto1_area (unsigned long long fu_prec, unsigned int mux_ins) const |
Return the area due to mux with n-inputs. More... | |
double | mux_time_unit (unsigned long long fu_prec) const |
double | mux_time_unit_raw (unsigned long long fu_prec) const |
unsigned int | get_cycles (const unsigned int fu_name, const unsigned int v) const |
Return the number of cycles for given vertex and a given functional unit. More... | |
unsigned int | get_cycles (const unsigned int fu_name, const vertex v, const OpGraphConstRef g) const |
bool | is_vertex_bounded_with (const unsigned int v, unsigned int &fu_name) const |
In case the vertex is bounded to a particular functional unit, it returns true and the functional unit. More... | |
bool | is_vertex_bounded_with (const vertex v, unsigned int &fu_name) const |
bool | is_vertex_bounded (const unsigned int fu_name) const |
Checks if the functional unit is uniquely bounded to a vertex. More... | |
technology_nodeRef | get_fu (unsigned int fu_name) const |
Returns the reference to a functional unit given its id. More... | |
unsigned int | get_number_channels (unsigned int fu_name) const |
return the number of channels available for the functional unit More... | |
double | EstimateControllerDelay () const |
estimate the delay of the controller in straightforward mode More... | |
double | estimate_controller_delay_fb () const |
estimate the delay of the controller in feedback mode More... | |
std::string | get_string_name (unsigned int fu_name) const |
Returns the name of the functional for debug purpose. More... | |
double | compute_normalized_area (unsigned int fu_s1) const |
compute a number representing the "weight" of the functional unit More... | |
std::map< unsigned int, unsigned int > | get_memory_units () const |
Returns the memory units. More... | |
bool | has_to_be_synthetized (const unsigned int fu_name) const |
Checks if the functional unit has to be synthetized. More... | |
double | estimate_call_delay () const |
bool | has_to_be_shared (const unsigned int fu_name) const |
Checks if the functional unit has to be shared. More... | |
void | check_library () |
Checks library type and sets if it's ordered, complete or simple. More... | |
bool | is_one_cycle_direct_access_memory_unit (unsigned int fu_type) const |
return true in case the functional unit is a direct_access memory unit with a single clock latency for LOAD More... | |
void | print_allocated_resources () const |
Prints the actual allocation. More... | |
void | print (std::ostream &os) const |
bool | is_artificial_fu (const unsigned int fu_name) const |
Checks if the functional unit is actually an artificial functional unit like: NOP, ENTRY and EXIT. More... | |
bool | can_implement (const unsigned int fu_id, const vertex v) const |
Checks if the operation associated with a vertex can be implemented by a given functional unit. More... | |
std::pair< double, double > | GetTimeLatency (const unsigned int operation, const unsigned int functional_unit, const unsigned int stage=0) const |
Return the execution time of (a stage of) an operation. More... | |
std::pair< double, double > | GetTimeLatency (const vertex operation, const unsigned int functional_unit, const unsigned int stage=0) const |
double | GetConnectionTime (const unsigned int first_operation, const unsigned int second_operation, const AbsControlStep cs) const |
Return the connection time for a couple of operations or the phi overhead for a single operation. More... | |
double | GetConnectionTime (const vertex first_operation, const vertex second_operation, const AbsControlStep cs) const |
bool | IsVariableExecutionTime (const unsigned int operation_index) const |
Return true if the variable execution time depends on the scheduling. More... | |
double | getMinimumSlack () const |
void | setMinimumSlack (const double slack) |
set the minimum slack of the component estimated by scheduling More... | |
double | GetCondExprTimeLatency (const unsigned int operation_index) const |
Return the execution time of a cond expr corresponding to the gimple_phi. More... | |
unsigned int | GetCycleLatency (const unsigned int operationID) const |
Return the latency of an operation in cycle. More... | |
unsigned int | GetCycleLatency (const vertex operationID) const |
unsigned int | GetFuType (const unsigned int operation) const |
Return the functional unit type used to execute an operation. More... | |
unsigned int | GetFuType (const vertex operation) const |
unsigned int | get_n_complex_operations () const |
double | get_connection_time (unsigned fu_type, bool add_delay1, bool add_delay2, size_t n_complex_ops, size_t n_mem_ops) const |
return an estimation of the interconnection time More... | |
double | mux_area_unit_raw (unsigned long long fu_prec) const |
double | estimate_mux_area (unsigned int fu_name) const |
Estimate the area of a mux attached to a given functional unit. More... | |
unsigned int | get_worst_number_of_cycles (const unsigned int fu_name) const |
bool | has_constant_in (unsigned int fu_name) const |
return true in case the functional unit has an input connected to a constant value More... | |
bool | is_proxy_memory_unit (const unsigned int fu_name) const |
Returns true if the fu_name is a proxy memory unit. More... | |
bool | is_readonly_memory_unit (const unsigned int fu_name) const |
return true in case the functional unit is a read-only memory unit More... | |
double | GetClockPeriodMargin () const |
Return the margin to be considered when performing scheduling. More... | |
bool | is_single_bool_test_cond_expr_units (const unsigned int fu_name) const |
return true in case the functional unit implement a cond_expr operation and the condition is a Boolean one More... | |
bool | is_simple_pointer_plus_expr (const unsigned int fu_name) const |
return true in case the functional unit implement a pointer_plus operation and the operands are constants More... | |
bool | can_be_asynchronous_ram (tree_managerConstRef TM, unsigned int var, unsigned int threshold, bool is_read_only_variable, unsigned int channel_number) |
bool | CanBeChained (const unsigned int first_statement_index, const unsigned int second_statement_index) const |
Check if two statements can be chained. More... | |
bool | CanBeChained (const vertex first_statement, const vertex second_statement) const |
Check if two statements can be chained. More... | |
double | getConnectionOffset () const |
getConnectionOffset More... | |
Public Member Functions inherited from HLSFunctionIR | |
HLSFunctionIR (const HLS_managerRef hls_manager, const unsigned int function_index, const ParameterConstRef parameters) | |
Constructor. More... | |
~HLSFunctionIR () override | |
Destructor. More... | |
Public Member Functions inherited from HLSIR | |
HLSIR (const HLS_managerRef &hls_manager, const ParameterConstRef ¶meters) | |
Constructor. More... | |
~HLSIR () override | |
Destructor. More... | |
Public Member Functions inherited from IntermediateRepresentation | |
IntermediateRepresentation (const ParameterConstRef ¶meters) | |
Constructor. More... | |
virtual | ~IntermediateRepresentation () |
Destructor. More... | |
Static Public Member Functions | |
static std::string | extract_bambu_provided_name (unsigned long long prec_in, unsigned long long prec_out, const HLS_managerConstRef hls_manager, technology_nodeRef ¤t_fu) |
Private Member Functions | |
std::string | get_latency_string (const std::string &lat) const |
double | time_m_execution_time (operation *op) const |
return the execution time of the operation corrected by time_multiplier factor More... | |
double | time_m_stage_period (operation *op) const |
return the stage time of the operation corrected by time_multiplier factor 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 |
double | get_worst_stage_period (const unsigned int fu_name) const |
Returns the worst stage period for all the operations associated with the functional unit. More... | |
void | set_number_channels (unsigned int fu_name, unsigned int n_ports) |
set the number of ports associated with the functional unit More... | |
void | GetNodeTypePrec (const vertex node, const OpGraphConstRef g, node_kind_prec_infoRef info, HLS_manager::io_binding_type &constant_id, bool is_constrained) const |
Extract the node kind and precision, if available. More... | |
double | GetPhiConnectionLatency (const unsigned int statement_index) const |
Return the connection delay due to phi. More... | |
bool | CanBeMerged (const unsigned int first_operation, const unsigned int second_operation) const |
Return true if the two operations can be mapped on the same LUT. More... | |
CustomSet< unsigned int > | ComputeRoots (const unsigned int ssa, const AbsControlStep cs) const |
Compute the roots to be considered for fan out computation. More... | |
CustomSet< unsigned int > | ComputeDrivenCondExpr (const unsigned int ssa) const |
Compute the cond_expr indirectly driven by a ssa. More... | |
double | GetToDspRegisterDelay (const unsigned int statement_index) const |
Add the delay to reach a DSP register if necessary. More... | |
CustomSet< unsigned int > | GetZeroDistanceOperations (const unsigned int statement_index) const |
Return the set of operations with zero time distance from source. More... | |
Static Private Member Functions | |
static technology_nodeRef | get_fu (const std::string &fu_name, const HLS_managerConstRef hls_manager) |
Returns the technology_node associated with the given operation. More... | |
static const std::pair< const CustomMap< unsigned long long, CustomUnorderedMapStable< unsigned int, double > > &, const CustomMap< unsigned long long, CustomUnorderedMapStable< unsigned int, double > > & > | InitializeMuxDB (const AllocationInformationConstRef allocation_information) |
Compute the values for the initialization of the multiplexer characteristics database. More... | |
static const std::tuple< const std::vector< unsigned int > &, const std::vector< unsigned int > & > | InitializeDSPDB (const AllocationInformationConstRef allocation_information) |
Compute the values for the initialization of the DSP characteristics database. More... | |
Private Attributes | |
double | connection_time_ratio |
coefficient used to estimate connection delay More... | |
double | controller_delay_multiplier |
coefficient used to estimate the controller delay More... | |
double | setup_multiplier |
coefficient used to modify setup value More... | |
double | time_multiplier |
coefficient used to modify execution time and stage time More... | |
double | mux_time_multiplier |
double | memory_correction_coefficient |
coefficient used to correct timing of memories More... | |
double | connection_offset |
double | output_DSP_connection_time |
Connection delay at the exit of DSP. More... | |
double | output_carry_connection_time |
Connection delay at the exit of carry. More... | |
double | fanout_coefficient |
The coefficient used for estimating fanout delay. More... | |
size_t | max_fanout_size {0} |
The maximum size of fanout. More... | |
double | DSPs_margin |
coefficient used to modify DSPs execution time More... | |
double | DSPs_margin_stage |
coefficient used to modify DSPs stage period More... | |
double | DSP_allocation_coefficient |
coefficient used to modify pipelining DSPs allocation More... | |
OpGraphConstRef | op_graph |
The operation graph. More... | |
HLS_constraintsConstRef | HLS_C |
HLS constraints. More... | |
HLS_deviceConstRef | HLS_D |
reference to the information representing the target for the synthesis More... | |
BehavioralHelperConstRef | behavioral_helper |
The behavioral helper. More... | |
memoryConstRef | Rmem |
The memory. More... | |
const unsigned int & | address_bitsize |
tree_managerConstRef | TreeM |
The tree manager. More... | |
double | minimumSlack |
minimum slack More... | |
unsigned int | n_complex_operations {0} |
number of complex operations More... | |
CustomUnorderedMap< unsigned int, std::pair< std::string, std::string > > | id_to_fu_names |
map between the functional unit identifier and the pair (library, fu) of names for the unit More... | |
CustomOrderedSet< unsigned int > | is_vertex_bounded_rel |
Store the set of functional units (identifiers) uniquely bounded. More... | |
std::vector< technology_nodeRef > | list_of_FU |
Stores the list of the functional units. More... | |
std::map< unsigned int, unsigned int > | memory_units |
map between memory units and the associated variables More... | |
std::map< unsigned int, unsigned int > | nports_map |
define the number of ports associated with the functional unit More... | |
std::map< unsigned int, unsigned long long > | precision_map |
map functional units with their precision More... | |
std::map< unsigned int, std::string > | proxy_function_units |
put into relation proxy function units with shared functions More... | |
std::map< unsigned int, unsigned int > | proxy_memory_units |
put into relation proxy memory units with variables More... | |
std::map< unsigned int, std::string > | proxy_wrapped_units |
put into relation proxy wrapped units with shared functions More... | |
std::vector< unsigned int > | tech_constraints |
For each functional unit (position in the vector), tech_constraints stores the maximum number of resources. More... | |
CustomUnorderedMap< std::pair< unsigned int, std::string >, CustomOrderedSet< unsigned int > > | node_id_to_fus |
for each operation (node-id, operation) return the set of functional unit that can be used More... | |
CustomUnorderedMap< unsigned int, CustomOrderedSet< unsigned int > > | fus_to_node_id |
reverse map putting into relation functional units with the operations that can be mapped on More... | |
CustomUnorderedMap< unsigned int, std::pair< std::string, unsigned int > > | binding |
Puts into relation operation with type and functional units. More... | |
std::map< unsigned int, unsigned long long > | memory_units_sizes |
size of each memory unit in bytes More... | |
std::map< unsigned int, unsigned int > | vars_to_memory_units |
map between variables and associated memory_units More... | |
std::map< std::string, std::string > | precomputed_pipeline_unit |
store the pre-computed pipeline unit: given a functional unit it return the pipeline id compliant More... | |
CustomUnorderedSet< unsigned int > | single_bool_test_cond_expr_units |
store all cond_expr units having a Boolean condition More... | |
CustomUnorderedSet< unsigned int > | simple_pointer_plus_expr |
in case of pointer plus expr between constants: no wire delay More... | |
CustomMap< unsigned int, CustomSet< unsigned int > > | ssa_roots |
The roots used to compute a ssa. More... | |
CustomMap< unsigned int, std::pair< unsigned int, AbsControlStep > > | ssa_bb_versions |
The bb_version-control root on which the roots of a ssa have been computed. More... | |
CustomMap< unsigned int, CustomSet< unsigned int > > | ssa_cond_exprs |
The cond exprs driven by a ssa. More... | |
CustomMap< unsigned int, unsigned int > | cond_expr_bb_versions |
The bb_version on which the cond exprs driven by a ssan have been computed. More... | |
CustomMap< unsigned int, CustomSet< unsigned int > > | zero_distance_ops |
The operations reachable with delay zero. More... | |
CustomMap< unsigned int, unsigned int > | zero_distance_ops_bb_version |
The bb_version on which the reachable delay zero operations. More... | |
CustomMap< unsigned long long, CustomUnorderedMapStable< unsigned int, double > > | mux_timing_db |
store mux timing for the current technology More... | |
CustomMap< unsigned long long, CustomUnorderedMapStable< unsigned int, double > > | mux_area_db |
store mux timing for the current technology More... | |
std::vector< unsigned int > | DSP_x_db |
store DSP x sizes More... | |
std::vector< unsigned int > | DSP_y_db |
store DSP y sizes More... | |
std::map< unsigned int, std::string > | sync_ram_var_latency |
put into relation variable and their latency when they are mapped on a private synchronous ram More... | |
Friends | |
class | allocation |
struct | updatecopy_HLS_constraints_functor |
Additional Inherited Members | |
Protected Attributes inherited from HLSFunctionIR | |
hlsRef | hls |
The hls of the function. More... | |
const unsigned int | function_index |
The index of the function to which this IR is associated. More... | |
Protected Attributes inherited from HLSIR | |
const HLS_managerRef | hls_manager |
The HLS manager. More... | |
Protected Attributes inherited from IntermediateRepresentation | |
const ParameterConstRef | parameters |
The set of input parameters. More... | |
int | debug_level |
The debug level. More... | |
Definition at line 94 of file allocation_information.hpp.
Enumerator | |
---|---|
initiation_time | |
power_consumption | |
execution_time |
Definition at line 380 of file allocation_information.hpp.
AllocationInformation::AllocationInformation | ( | const HLS_managerRef | _hls_manager, |
const unsigned int | _function_index, | ||
const ParameterConstRef | parameters | ||
) |
Constructor.
HLS_mgr | is the HLS manager NOTE: hls cannot be got from HLS_mgr since when allocation information constructor is called we are still in the hls constructor |
function_id | is the index of the function |
parameters | is the set of input parameters |
Definition at line 249 of file allocation_information.cpp.
References IntermediateRepresentation::debug_level, GET_CLASS, and ~AllocationInformation().
|
overridedefault |
bool AllocationInformation::can_be_asynchronous_ram | ( | tree_managerConstRef | TM, |
unsigned int | var, | ||
unsigned int | threshold, | ||
bool | is_read_only_variable, | ||
unsigned int | channel_number | ||
) |
Definition at line 3694 of file allocation_information.cpp.
References tree_helper::CGetType(), tree_helper::get_array_dim_and_bitsize(), GET_CONST_NODE, tree_manager::get_tree_node_const(), tree_helper::Size(), and THROW_ERROR.
Referenced by allocation::IntegrateTechnologyLibraries(), and setMinimumSlack().
Checks if the operation associated with a vertex can be implemented by a given functional unit.
fu_name | is the id of the functional unit. |
v | is the vertex for which the test is performed. |
Definition at line 1195 of file allocation_information.cpp.
References can_implement_set().
const CustomOrderedSet< unsigned int > & AllocationInformation::can_implement_set | ( | const vertex | v | ) | const |
Returns the set of functional units that can be used to implement the operation associated with vertex v.
v | is the vertex. |
g | is the graph of the vertex v. |
Definition at line 285 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), and op_graph.
Referenced by parametric_list_based::add_to_priority_queues(), can_implement(), get_cycles(), get_execution_time(), get_initiation_time(), and get_stage_period().
const CustomOrderedSet< unsigned int > & AllocationInformation::can_implement_set | ( | const unsigned int | v | ) | const |
Definition at line 290 of file allocation_information.cpp.
References tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, node_id_to_fus, THROW_ASSERT, tree_node::ToString(), and TreeM.
bool AllocationInformation::CanBeChained | ( | const unsigned int | first_statement_index, |
const unsigned int | second_statement_index | ||
) | const |
Check if two statements can be chained.
first_statement_index | is the index of the first statement |
second_statement_index | is the index of the second statement |
Load/Store from distributed memory cannot be chained with non-zero delay operations
STORE cannot be executed in the same clock cycle of the condition which controls it
UNBOUNDED operations cannot be executed in the same clock cycle of the condition which controls it
labels cannot be executed in the same clock cycle of the condition which controls it
Operations with side effect cannot be executed in the same clock cycle of the control_step which controls them
Load and store from bus cannot be chained (if param is enabled)
Definition at line 3830 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, EXIT_ID, INDENT_DBG_MEX, test_panda::parameters, STR, and fu_binding::UNKNOWN.
Referenced by SDCScheduling::AddDelayConstraints(), parametric_list_based::compute_starting_ending_time_asap(), and setMinimumSlack().
bool AllocationInformation::CanBeChained | ( | const vertex | first_statement, |
const vertex | second_statement | ||
) | const |
Check if two statements can be chained.
first_statement | is the first vertex |
second_statement | is the second vertex |
Definition at line 3822 of file allocation_information.cpp.
|
private |
Return true if the two operations can be mapped on the same LUT.
first_operation | is the index of the first operation |
second_operation | is the index of the second operations |
Definition at line 3789 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, epsilon, EXIT_ID, INDENT_DBG_MEX, tree_helper::Size(), STR, and fu_binding::UNKNOWN.
bool AllocationInformation::CanImplementSetNotEmpty | ( | const unsigned int | v | ) | const |
Return if any functional unit has been allocated for an operation.
Definition at line 310 of file allocation_information.cpp.
References tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, node_id_to_fus, and TreeM.
Referenced by GetStatementArea(), is_operation_bounded(), and is_operation_PI_registered().
void AllocationInformation::check_library | ( | ) |
Checks library type and sets if it's ordered, complete or simple.
|
overridevirtual |
Clear all the data structure.
Implements HLSIR.
Definition at line 4004 of file allocation_information.cpp.
References HLSIR::Clear(), and max.
Referenced by allocation::Initialize().
double AllocationInformation::compute_normalized_area | ( | unsigned int | fu_s1 | ) | const |
compute a number representing the "weight" of the functional unit
fu_s1 | is the functional unit id |
Definition at line 2970 of file allocation_information.cpp.
References test_panda::parameters.
Referenced by cdfc_module_binding::can_be_clustered(), and cdfc_module_binding::InternalExec().
|
private |
Compute the cond_expr indirectly driven by a ssa.
ssa | is the ssa to be considered |
Definition at line 3210 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, GET_NODE, INDENT_DBG_MEX, and STR.
|
private |
Compute the roots to be considered for fan out computation.
ssa | is the ssa to be considered as starting point of the root conditions |
cs | is the control step where the operation using ssa must be scheduled |
Definition at line 3074 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, GET_NODE, INDENT_DBG_MEX, hls::Rsch, STR, and AbsControlStep::UNKNOWN.
double AllocationInformation::estimate_call_delay | ( | ) | const |
Check if the operation mapped on this fu is bounded
Add delay due to multiplexer in front of the input; the multiplexer has as input the actual input used in first clock cycle and the registered input used in the following cycles
Definition at line 2920 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, structural_manager::get_circ(), structural_object::get_typeRef(), structural_type_descriptor::id_type, INDENT_DBG_MEX, max, test_panda::parameters, STR, hls::top, and WORK_LIBRARY.
Referenced by add_library::InternalExec().
double AllocationInformation::estimate_controller_delay_fb | ( | ) | const |
estimate the delay of the controller in feedback mode
Definition at line 2399 of file allocation_information.cpp.
Referenced by parametric_list_based::compute_starting_ending_time_asap().
double AllocationInformation::estimate_mux_area | ( | unsigned int | fu_name | ) | const |
Estimate the area of a mux attached to a given functional unit.
fu_name | is the functional unit id |
Definition at line 2392 of file allocation_information.cpp.
References resize_1_8_pow2().
Referenced by cdfc_module_binding::InternalExec(), and setMinimumSlack().
double AllocationInformation::estimate_mux_time | ( | unsigned int | fu_name | ) | const |
estimate the delay of a mux that can be uses to mux the input of the given functional unit
fu_name | is the functional unit id |
Definition at line 1082 of file allocation_information.cpp.
References get_prec(), mux_time_unit(), and resize_1_8_pow2().
Referenced by cdfc_module_binding::InternalExec().
double AllocationInformation::estimate_muxNto1_area | ( | unsigned long long | fu_prec, |
unsigned int | mux_ins | ||
) | const |
Return the area due to mux with n-inputs.
fu_prec | is the bitsize of the data |
mux_ins | is the number of mux inputs |
Definition at line 1119 of file allocation_information.cpp.
References max, MAX_MUX_N_INPUTS, mux_area_db, resize_1_8_pow2(), and THROW_ASSERT.
Referenced by module_binding_check< vertex_type >::check_edge_compatibility(), module_binding_check< vertex_type >::cost(), and estimate_muxes().
double AllocationInformation::estimate_muxNto1_delay | ( | unsigned long long | fu_prec, |
unsigned int | mux_ins | ||
) | const |
Return the delay due to mux with n-inputs.
fu_prec | is the bitsize of the data |
mux_ins | is the number of mux inputs |
Definition at line 1089 of file allocation_information.cpp.
References get_setup_hold_time(), HLS_C, MAX_MUX_N_INPUTS, mux_timing_db, resize_1_8_pow2(), STR, and THROW_ASSERT.
Referenced by module_binding_check< vertex_type >::check_edge_compatibility(), estimate_muxes(), and allocation::is_ram_not_timing_compliant().
double AllocationInformation::EstimateControllerDelay | ( | ) | const |
estimate the delay of the controller in straightforward mode
Definition at line 2404 of file allocation_information.cpp.
References FunctionBehavior::BB, DEBUG_LEVEL_VERY_PEDANTIC, delay(), exp, technology_manager::get_fu(), StateTransitionGraphManager::get_number_of_states(), INDENT_DBG_MEX, LIBRARY_STD_FU, MULTIPLIER_STD, NUM_CST_allocation_default_states_number_normalization, NUM_CST_allocation_default_states_number_normalization_BB, NUM_CST_allocation_default_states_number_normalization_linear_factor, test_panda::parameters, hls::STG, STR, and THROW_ASSERT.
Referenced by parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), BB_based_stg::InternalExec(), and cdfc_module_binding::InternalExec().
|
static |
Definition at line 2993 of file allocation_information.cpp.
References SF_FFDATA_CONVERTER_32_64_STD, SF_FFDATA_CONVERTER_64_32_STD, STR, and THROW_ERROR.
Referenced by mux_connection_binding::add_conversion(), conn_binding::add_sparse_logic_dp(), and allocation::InternalExec().
double AllocationInformation::get_area | ( | const unsigned int | fu_name | ) | const |
Returns the area for a given functional unit.
fu_name | is the id of the functional unit. |
Definition at line 653 of file allocation_information.cpp.
References area_info::get_area_value(), get_number_fu_types(), area_info::get_resource_value(), has_to_be_synthetized(), id_to_fu_names, list_of_FU, and THROW_ASSERT.
Referenced by GetStatementArea(), cdfc_module_binding::InternalExec(), resource_ordering_functor::operator()(), and cdfc_resource_ordering_functor::operator()().
double AllocationInformation::get_attribute_of_fu_per_op | ( | const vertex | v, |
const OpGraphConstRef | g, | ||
const Allocation_MinMax | allocation_min_max, | ||
AllocationInformation::op_target | target, | ||
unsigned int & | fu_name, | ||
bool & | flag, | ||
const updatecopy_HLS_constraints_functor * | CF = nullptr |
||
) | const |
This method returns the min or the max value of the execution time/power consumption/initiation time for a vertex.
v | is the vertex for which the analysis is performed. |
g | is the graph of the vertex v. |
allocation_min_max | is an enum that indicates if the desired value is the minimum or the maximum among the fu that can handle the execution of the vertex v. |
target | is an enum that indicates "initiation time" if the needed value is the initiation time, "power consumption" if the needed value is the power consumption, "execution time" if the needed value is the execution time. |
fu_name | is the id of the functional unit associated with vertex v and with the searched attribute. |
flag | is true when there exist a functional_unit for vertex v. |
CF | is the functor used to retrive information |
Definition at line 419 of file allocation_information.cpp.
References binding, OpGraph::CGetOpNodeInfo(), tree_manager::CGetTreeNode(), IntermediateRepresentation::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, execution_time, EXIT_ID, from_strongtype_cast(), get_execution_time_dsp_modified(), GET_NAME, has_to_be_synthetized(), id_to_fu_names, INDENT_DBG_MEX, initiation_time, list_of_FU, max, MAX, MIN, min, node_id_to_fus, tree_helper::NormalizeTypename(), power_consumption, STR, THROW_ASSERT, THROW_ERROR, and TreeM.
Referenced by get_attribute_of_fu_per_op().
double AllocationInformation::get_attribute_of_fu_per_op | ( | const vertex | v, |
const OpGraphConstRef | g, | ||
const Allocation_MinMax | allocation_min_max, | ||
AllocationInformation::op_target | target | ||
) | const |
This method returns the min or the max value of the execution time/power consumption/initiation time for a vertex.
v | is the vertex for which the analysis is performed. |
g | is the graph of the vertex v. |
allocation_min_max | an enum that indicates if the wanted value is the minimum or the maximum among the fu that can handle the execution of the vertex v. |
target | is an enum that indicates "initiation time" if the needed value is the initiation time, "power consumption" if the needed value is the power consumption, "execution time" if the needed value is the execution time. |
Definition at line 408 of file allocation_information.cpp.
References get_attribute_of_fu_per_op(), and THROW_ASSERT.
double AllocationInformation::get_connection_time | ( | unsigned | fu_type, |
bool | add_delay1, | ||
bool | add_delay2, | ||
size_t | n_complex_ops, | ||
size_t | n_mem_ops | ||
) | const |
return an estimation of the interconnection time
Referenced by setMinimumSlack().
double AllocationInformation::get_correction_time | ( | unsigned int | fu, |
const std::string & | operation_name, | ||
unsigned int | n_ins | ||
) | const |
return a time to be subtracted to the execution time/stage period
fu | is the functional unit |
operation_name | is the operation name |
Definition at line 2471 of file allocation_information.cpp.
References tree_helper::AccessedMaximumBitsize(), ADDER_STD, 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_NN_SDS, ARRAY_1D_STD_DISTRAM_SDS, tree_helper::CGetType(), COND_EXPR_STD, DEBUG_LEVEL_VERY_PEDANTIC, delay(), tree_helper::get_array_dimensions(), technology_manager::get_fu(), time_info::get_initiation_time(), technology_manager::get_library(), functional_unit::get_operation(), functional_unit::get_operations(), tree_helper::get_type_index(), tree_helper::GetArrayDimensions(), INDENT_DBG_MEX, tree_helper::is_a_struct(), tree_helper::is_an_array(), tree_helper::is_an_union(), tree_helper::IsArrayEquivType(), LIBRARY_STD_FU, LUT_EXPR_STD, MEMORY_CTRL_TYPE_D00, MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_PROXY, MEMORY_CTRL_TYPE_PROXYN, MEMORY_CTRL_TYPE_SPROXY, MEMORY_CTRL_TYPE_SPROXYN, MEMORY_TYPE_ASYNCHRONOUS, MEMORY_TYPE_SYNCHRONOUS_SDS, MEMORY_TYPE_SYNCHRONOUS_SDS_BUS, MEMORY_TYPE_SYNCHRONOUS_UNALIGNED, resize_1_8_pow2(), STR, THROW_ASSERT, THROW_ERROR, and operation::time_m.
Referenced by cdfc_module_binding::can_be_clustered(), parametric_list_based::compute_exec_stage_time(), and allocation::IntegrateTechnologyLibraries().
unsigned int AllocationInformation::get_cycles | ( | const unsigned int | fu_name, |
const unsigned int | v | ||
) | const |
Return the number of cycles for given vertex and a given functional unit.
fu_name | is the id of the functional unit. |
v | is the vertex for which the test is performed. |
g | is the graph of the vertex v. |
Definition at line 1148 of file allocation_information.cpp.
References can_implement_set(), tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, get_string_name(), has_to_be_synthetized(), id_to_fu_names, list_of_FU, tree_helper::NormalizeTypename(), THROW_ASSERT, and TreeM.
Referenced by parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_exec_stage_time(), get_cycles(), allocation::InternalExec(), and cdfc_module_binding::InternalExec().
unsigned int AllocationInformation::get_cycles | ( | const unsigned int | fu_name, |
const vertex | v, | ||
const OpGraphConstRef | g | ||
) | const |
Definition at line 1142 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), and get_cycles().
double AllocationInformation::get_DSPs | ( | const unsigned int | fu_name | ) | const |
return an estimation of the number of DSPs used by the unit
fu_name | is the id of the functional unit. |
Definition at line 747 of file allocation_information.cpp.
References get_number_fu_types(), area_info::get_resource_value(), has_to_be_synthetized(), id_to_fu_names, list_of_FU, and THROW_ASSERT.
Referenced by get_execution_time_dsp_modified(), get_stage_period_dsp_modified(), allocation::InternalExec(), cdfc_module_binding::InternalExec(), resource_ordering_functor::operator()(), and cdfc_resource_ordering_functor::operator()().
double AllocationInformation::get_execution_time | ( | const unsigned int | fu_name, |
const vertex | v, | ||
const OpGraphConstRef | g | ||
) | const |
Returns the execution time for a given vertex and a given functional unit.
fu_name | is the id of the functional unit. |
v | is the vertex for which the test is performed. |
g | is the graph of the vertex v. |
Definition at line 324 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo().
Referenced by parametric_list_based::compute_exec_stage_time(), and parametric_list_based::exec().
double AllocationInformation::get_execution_time | ( | const unsigned int | fu_name, |
const unsigned int | v | ||
) | const |
first check for component_timing_alias
DSP based components are underestimated when the RTL synthesis backend converts in LUTs, so we slightly increase the execution time
FIXME: here we are passing fu_name and not the index of the alias function which does not exists; however fu_name is used to identify if the operation is mapped on the DSP, so for non DSP operations works
Definition at line 330 of file allocation_information.cpp.
References can_implement_set(), tree_manager::CGetTreeNode(), IntermediateRepresentation::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, EXIT_ID, get_execution_time_dsp_modified(), get_string_name(), has_to_be_synthetized(), HLS_C, HLS_D, id_to_fu_names, INDENT_DBG_MEX, list_of_FU, tree_helper::NormalizeTypename(), STR, THROW_ASSERT, time_m_stage_period(), and TreeM.
|
private |
Definition at line 1219 of file allocation_information.cpp.
References DSPs_margin, get_DSPs(), THROW_ASSERT, and time_m_execution_time().
Referenced by get_attribute_of_fu_per_op(), get_execution_time(), and get_worst_execution_time().
|
staticprivate |
Returns the technology_node associated with the given operation.
fu_name | is the string representing the name of the unit |
Definition at line 1919 of file allocation_information.cpp.
References generic_device::get_technology_manager().
Referenced by conn_binding::add_command_ports(), ParallelMemoryFuBinding::add_to_SM(), fu_binding::add_to_SM(), BB_based_stg::compute_EPP_edge_increments(), mux_connection_binding::create_connections(), fsm_controller::create_state_machine(), pipeline_controller::InternalExec(), BB_based_stg::InternalExec(), is_direct_access_memory_unit(), is_direct_proxy_memory_unit(), is_dual_port_memory(), is_indirect_access_memory_unit(), is_one_cycle_direct_access_memory_unit(), is_operation_bounded(), is_operation_PI_registered(), BB_based_stg::optimize_cycles(), and fu_binding::specialise_fu().
technology_nodeRef AllocationInformation::get_fu | ( | unsigned int | fu_name | ) | const |
Returns the reference to a functional unit given its id.
fu_name | is the id of the functional unit. |
Definition at line 1170 of file allocation_information.cpp.
References get_number_fu_types(), list_of_FU, STR, and THROW_ASSERT.
std::pair< std::string, std::string > AllocationInformation::get_fu_name | ( | unsigned int | id | ) | const |
Returns the name of the functional unit, associated with the name of the library, given the corresponding identifier.
Definition at line 268 of file allocation_information.cpp.
References id_to_fu_names, and THROW_ASSERT.
Referenced by parametric_list_based::add_to_priority_queues(), fu_binding::add_to_SM(), mux_connection_binding::create_connections(), parametric_list_based::exec(), SDCScheduling::Initialize(), SDCScheduling::InternalExec(), cdfc_module_binding::InternalExec(), is_operation_bounded(), resource_ordering_functor::operator()(), BB_based_stg::optimize_cycles(), fu_binding::specialise_fu(), hls::xload(), and hls::xwrite().
ControlStep AllocationInformation::get_initiation_time | ( | const unsigned int | fu_name, |
const vertex | v | ||
) | const |
Returns the initiation time for a given vertex and a given functional unit.
fu_name | is the id of the functional unit. |
v | is the vertex for which the test is performed. |
Definition at line 766 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), and op_graph.
Referenced by SDCScheduling::AddDelayConstraints(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_exec_stage_time(), parametric_list_based::exec(), BB_based_stg::InternalExec(), and cdfc_module_binding::InternalExec().
ControlStep AllocationInformation::get_initiation_time | ( | const unsigned int | fu_name, |
const unsigned int | statement_index | ||
) | const |
Returns the initiation time for a given operation and a given functional unit.
fu_name | is the id of the functional unit. |
statement_index | is the operation |
Definition at line 771 of file allocation_information.cpp.
References can_implement_set(), tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, get_string_name(), has_to_be_synthetized(), id_to_fu_names, list_of_FU, tree_helper::NormalizeTypename(), THROW_ASSERT, and TreeM.
|
private |
Definition at line 2449 of file allocation_information.cpp.
References THROW_ERROR.
Referenced by allocation::get_synch_ram_latency(), and allocation::IntegrateTechnologyLibraries().
std::map< unsigned int, unsigned int > AllocationInformation::get_memory_units | ( | ) | const |
Returns the memory units.
Definition at line 994 of file allocation_information.cpp.
References memory_units.
Referenced by fu_binding::add_to_SM().
unsigned int AllocationInformation::get_memory_var | ( | const unsigned int | fu_name | ) | const |
Returns the base address of the functional unit.
fu_name | is the id of the functional unit |
Definition at line 988 of file allocation_information.cpp.
References is_memory_unit(), memory_units, and THROW_ASSERT.
Referenced by mux_connection_binding::address_precision(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), parametric_list_based::exec(), and cdfc_module_binding::InternalExec().
unsigned int AllocationInformation::get_n_complex_operations | ( | ) | const |
Definition at line 2988 of file allocation_information.cpp.
Referenced by setMinimumSlack().
unsigned int AllocationInformation::get_number_channels | ( | unsigned int | fu_name | ) | const |
return the number of channels available for the functional unit
fu_name | is the functional unit id |
Definition at line 1176 of file allocation_information.cpp.
References nports_map.
Referenced by allocation::add_tech_constraint(), fu_binding::add_to_SM(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), compute_condition1(), parametric_list_based::compute_starting_ending_time_asap(), mux_connection_binding::create_connections(), cdfc_module_binding::InternalExec(), and fu_binding::specialise_fu().
unsigned int AllocationInformation::get_number_fu | ( | unsigned int | fu_name | ) | const |
Returns the number of functional unit given its id.
fu_name | is the id of the functional unit. |
Definition at line 279 of file allocation_information.cpp.
References get_number_fu_types(), tech_constraints, and THROW_ASSERT.
Referenced by parametric_list_based::BB_update_resources_use(), compute_condition1(), parametric_list_based::exec(), SDCScheduling::Initialize(), SDCScheduling::InternalExec(), cdfc_module_binding::InternalExec(), and BB_based_stg::res_const_operation().
unsigned int AllocationInformation::get_number_fu_types | ( | ) | const |
Returns the number of functional units types.
Definition at line 274 of file allocation_information.cpp.
References list_of_FU.
Referenced by parametric_list_based::exec(), get_area(), get_DSPs(), get_fu(), get_number_fu(), get_string_name(), has_to_be_synthetized(), SDCScheduling::Initialize(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), is_artificial_fu(), is_assign(), is_memory_unit(), is_proxy_function_unit(), is_proxy_unit(), is_proxy_wrapped_unit(), is_read_cond(), is_return(), is_vertex_bounded(), max_number_of_operations(), and hls::xload().
unsigned long long AllocationInformation::get_prec | ( | const unsigned int | fu_name | ) | const |
return the precision of the given functional unit
fu_name | is the id of the functional unit. |
Definition at line 1819 of file allocation_information.cpp.
References STR, and THROW_ASSERT.
Referenced by estimate_mux_time(), and cdfc_module_binding::InternalExec().
const std::map< unsigned int, std::string > & AllocationInformation::get_proxy_function_units | ( | ) | const |
return the set of proxy function units
Definition at line 1010 of file allocation_information.cpp.
References proxy_function_units.
Referenced by fu_binding::add_to_SM().
const std::map< unsigned int, unsigned int > & AllocationInformation::get_proxy_memory_units | ( | ) | const |
return the set of proxy memory units
Definition at line 999 of file allocation_information.cpp.
References proxy_memory_units.
Referenced by fu_binding::add_to_SM().
unsigned int AllocationInformation::get_proxy_memory_var | ( | const unsigned int | fu_name | ) | const |
return the var associated with the proxy unit
fu_name | is functional unit |
Definition at line 1004 of file allocation_information.cpp.
References proxy_memory_units, and THROW_ASSERT.
Referenced by fu_binding::add_to_SM(), mux_connection_binding::address_precision(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), parametric_list_based::exec(), and cdfc_module_binding::InternalExec().
const std::map< unsigned int, std::string > & AllocationInformation::get_proxy_wrapped_units | ( | ) | const |
return the set of proxy wrapped units
Definition at line 1015 of file allocation_information.cpp.
References proxy_wrapped_units.
Referenced by fu_binding::add_to_SM().
double AllocationInformation::get_setup_hold_time | ( | ) | const |
Definition at line 622 of file allocation_information.cpp.
References HLS_D, setup_multiplier, and time_multiplier.
Referenced by estimate_muxNto1_delay(), parametric_list_based::exec(), getConnectionOffset(), InitializeMuxDB(), allocation::IntegrateTechnologyLibraries(), parametric_list_based::InternalExec(), cdfc_module_binding::InternalExec(), and allocation::is_ram_not_timing_compliant().
double AllocationInformation::get_stage_period | ( | const unsigned int | fu_name, |
const vertex | v, | ||
const OpGraphConstRef | g | ||
) | const |
Return the stage period for a given vertex and a given pipelined functional unit.
fu_name | is the id of the functional unit. |
v | is the vertex for which the test is performed. |
g | is the graph of the vertex v. |
Definition at line 1037 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo().
double AllocationInformation::get_stage_period | ( | const unsigned int | fu_name, |
const unsigned int | v | ||
) | const |
DSP based components are underestimated when the RTL synthesis backend converts in LUTs, so we slightly increase the stage period first check for component_timing_alias
Definition at line 1043 of file allocation_information.cpp.
References can_implement_set(), tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, get_string_name(), has_to_be_synthetized(), HLS_D, id_to_fu_names, list_of_FU, tree_helper::NormalizeTypename(), THROW_ASSERT, time_m_stage_period(), and TreeM.
|
private |
Definition at line 1233 of file allocation_information.cpp.
References DSPs_margin_stage, get_DSPs(), and time_m_stage_period().
Referenced by get_worst_stage_period().
std::string AllocationInformation::get_string_name | ( | unsigned int | fu_name | ) | const |
Returns the name of the functional for debug purpose.
ToBeCompleted.
Do not use this string as key id.
fu_name | is the id of the functional unit. |
Definition at line 1189 of file allocation_information.cpp.
References get_number_fu_types(), list_of_FU, STR, and THROW_ASSERT.
Referenced by fu_binding::add_to_SM(), fu_binding::bind(), mux_connection_binding::create_connections(), get_cycles(), get_execution_time(), fu_binding::get_fu_name(), get_initiation_time(), get_stage_period(), port_swapping::InternalExec(), and cdfc_module_binding::InternalExec().
double AllocationInformation::get_worst_execution_time | ( | const unsigned int | fu_name | ) | const |
Returns the worst execution time for all the operations associated with the functional unit.
fu_name | is the id of the functional unit. |
Definition at line 637 of file allocation_information.cpp.
References get_execution_time_dsp_modified(), has_to_be_synthetized(), list_of_FU, and max.
Referenced by cdfc_module_binding::can_be_clustered(), and resource_ordering_functor::operator()().
unsigned int AllocationInformation::get_worst_number_of_cycles | ( | const unsigned int | fu_name | ) | const |
Definition at line 3048 of file allocation_information.cpp.
References max.
Referenced by compute_condition1(), and setMinimumSlack().
|
private |
Returns the worst stage period for all the operations associated with the functional unit.
fu_name | is the id of the functional unit. |
Definition at line 1246 of file allocation_information.cpp.
References get_stage_period_dsp_modified(), has_to_be_synthetized(), list_of_FU, and max.
double AllocationInformation::GetClockPeriodMargin | ( | ) | const |
Return the margin to be considered when performing scheduling.
Definition at line 3064 of file allocation_information.cpp.
References test_panda::parameters.
Referenced by Schedule::CanBeMoved(), Schedule::GetBBEndingTime(), SDCScheduling::Initialize(), setMinimumSlack(), and Schedule::UpdateTime().
double AllocationInformation::GetCondExprTimeLatency | ( | const unsigned int | operation_index | ) | const |
Return the execution time of a cond expr corresponding to the gimple_phi.
operation_index | is the index of the gimple_phi |
Computing time of cond_expr as time of cond_expr_FU - setup_time In this way we are correctly estimating only phi with two inputs
Definition at line 2336 of file allocation_information.cpp.
References tree_helper::CGetType(), GET_CONST_NODE, resize_1_8_pow2(), tree_helper::Size(), STR, THROW_ASSERT, and test_panda::type.
Referenced by SDCScheduling::AddDelayConstraints(), and setMinimumSlack().
|
inline |
getConnectionOffset
Definition at line 1050 of file allocation_information.hpp.
References get_setup_hold_time(), and max.
double AllocationInformation::GetConnectionTime | ( | const unsigned int | first_operation, |
const unsigned int | second_operation, | ||
const AbsControlStep | cs | ||
) | const |
Return the connection time for a couple of operations or the phi overhead for a single operation.
first_operation | is the first operation |
second_operation | is the second operation; if it is null, the phi contribution is returned |
cs | is the control step in which second operation would be scheduled |
Definition at line 3340 of file allocation_information.cpp.
References tree_helper::ComputeSsaUses(), DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, epsilon, EXIT_ID, GET_CONST_NODE, GET_NODE, INDENT_DBG_MEX, INFINITE_UINT, tree_helper::is_int(), max, operation::operation(), test_panda::parameters, tree_helper::Size(), STR, THROW_ASSERT, THROW_ERROR, and fu_binding::UNKNOWN.
Referenced by SDCScheduling::AddDelayConstraints(), Schedule::CanBeMoved(), parametric_list_based::compute_exec_stage_time(), parametric_list_based::compute_starting_ending_time_asap(), Schedule::ComputeCriticalPath(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), and Schedule::UpdateTime().
double AllocationInformation::GetConnectionTime | ( | const vertex | first_operation, |
const vertex | second_operation, | ||
const AbsControlStep | cs | ||
) | const |
Definition at line 3332 of file allocation_information.cpp.
unsigned int AllocationInformation::GetCycleLatency | ( | const unsigned int | operationID | ) | const |
Return the latency of an operation in cycle.
operation | is the operation |
Definition at line 1935 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, EXIT_ID, GET_CONST_NODE, tree_node::GetString(), INDENT_DBG_MEX, LIBRARY_STD_FU, resize_1_8_pow2(), tree_helper::Size(), STR, THROW_ASSERT, and THROW_UNREACHABLE.
Referenced by SDCScheduling::AddDelayConstraints(), SDCScheduling::AddDependenceConstraint(), SDCScheduling::AddStageConstraints(), Schedule::CanBeMoved(), SDCScheduling::InternalExec(), setMinimumSlack(), and Schedule::UpdateTime().
unsigned int AllocationInformation::GetCycleLatency | ( | const vertex | operationID | ) | const |
Definition at line 1930 of file allocation_information.cpp.
unsigned int AllocationInformation::GetFuType | ( | const unsigned int | operation | ) | const |
Return the functional unit type used to execute an operation.
operation | is the operation |
Definition at line 2354 of file allocation_information.cpp.
References INDENT_OUT_MEX, STR, and THROW_UNREACHABLE.
Referenced by SDCScheduling::AddDelayConstraints(), Schedule::CanBeMoved(), parametric_list_based::compute_exec_stage_time(), GetStatementArea(), SDCScheduling::Initialize(), SDCScheduling::InternalExec(), is_operation_bounded(), is_operation_PI_registered(), and setMinimumSlack().
unsigned int AllocationInformation::GetFuType | ( | const vertex | operation | ) | const |
Definition at line 2349 of file allocation_information.cpp.
|
inline |
Definition at line 930 of file allocation_information.hpp.
References minimumSlack.
Referenced by BB_based_stg::InternalExec(), and parametric_list_based::InternalExec().
|
private |
Extract the node kind and precision, if available.
node | is the vertex of the graph. |
g | is the graph used to retrieve the required values of the vertex |
info | is where the information retrieved for the node get stored. |
constant_id | is a tree node id (i.e., different from zero) when one of the operands is constant |
no constant characterization for cond expr
Now we need to normalize the size to be compliant with the technology library assumptions
DSPs based components have to be managed in a different way
After first match we exit to prevent matching with larger mults
ad hoc correction for float_expr conversion
ad hoc correction for fix_trunc_expr
these ops never have info->output_prec > max_size_in
timing does not change for these operations
NOT really managed real_output_nelem
NOT really managed real_output_nelem
fix for vec_perm_expr
Definition at line 1318 of file allocation_information.cpp.
References tree_helper::CGetElements(), OpGraph::CGetOpNodeInfo(), tree_manager::CGetTreeReindex(), tree_helper::CGetType(), IntermediateRepresentation::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, DSP_x_db, DSP_y_db, HLSFunctionIR::function_index, GET_NAME, tree_helper::GetFormalIth(), HLSIR::hls_manager, INDENT_DBG_MEX, index, tree_node::index, tree_helper::is_concat_bit_ior_expr(), tree_helper::IsArrayType(), tree_helper::IsBooleanType(), tree_helper::IsComplexType(), tree_helper::IsConstant(), tree_helper::IsPointerType(), tree_helper::IsRealType(), tree_helper::IsSignedIntegerType(), tree_helper::IsStructType(), tree_helper::IsUnionType(), tree_helper::IsUnsignedIntegerType(), tree_helper::IsVectorType(), max, min, tree_helper::NormalizeTypename(), resize_1_8_pow2(), tree_helper::Size(), starts_with(), STR, THROW_ASSERT, THROW_UNREACHABLE, THROW_WARNING, TreeM, and test_panda::type.
Referenced by allocation::InternalExec().
|
private |
Return the connection delay due to phi.
statement_index | is the index of the operation producing the input of the phi |
Checking for output phi
Definition at line 2272 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, EXIT_ID, GET_NODE, INDENT_DBG_MEX, max, resize_1_8_pow2(), tree_helper::Size(), STR, lenet_tvm::target, and THROW_ASSERT.
double AllocationInformation::GetStatementArea | ( | const unsigned int | statement_index | ) | const |
Returns the area for a given statement.
statement_index | is the index of the statement |
Computing time of cond_expr as time of cond_expr_FU - setup_time
Definition at line 670 of file allocation_information.cpp.
References CanImplementSetNotEmpty(), tree_manager::CGetTreeNode(), get_area(), GET_CONST_NODE, tree_node::get_kind(), GET_NODE, GetFuType(), tree_node::GetString(), HLS_D, LIBRARY_STD_FU, mux_area_unit_raw(), resize_1_8_pow2(), tree_helper::Size(), STR, THROW_ASSERT, THROW_UNREACHABLE, and TreeM.
Referenced by MultipleEntryIfReduction::GetAreaCost().
std::pair< double, double > AllocationInformation::GetTimeLatency | ( | const unsigned int | operation, |
const unsigned int | functional_unit, | ||
const unsigned int | stage = 0 |
||
) | const |
Return the execution time of (a stage of) an operation.
operation | is the operation |
functional_unit | is the functional unit |
stage | is the stage to be considered for pipelined operation |
ignore_connection | specifies if connection delays have to be ignored |
For the intermediate stage of multi-cycle the latency is the clock cycle
The operation execution time
The stage period
Computing time of cond_expr as time of cond_expr_FU - setup_time
Definition at line 2011 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, epsilon, EXIT_ID, GET_CONST_NODE, GET_NODE, tree_node::GetString(), INDENT_DBG_MEX, LIBRARY_STD_FU, resize_1_8_pow2(), tree_helper::Size(), STR, THROW_ASSERT, THROW_ERROR, THROW_UNREACHABLE, and fu_binding::UNKNOWN.
Referenced by SDCScheduling::AddDelayConstraints(), Schedule::CanBeMoved(), parametric_list_based::compute_exec_stage_time(), Schedule::ComputeCriticalPath(), Schedule::EvaluateCondsMerging(), Schedule::EvaluateMultiWayIfsMerging(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), and Schedule::UpdateTime().
std::pair< double, double > AllocationInformation::GetTimeLatency | ( | const vertex | operation, |
const unsigned int | functional_unit, | ||
const unsigned int | stage = 0 |
||
) | const |
Definition at line 2004 of file allocation_information.cpp.
|
private |
Add the delay to reach a DSP register if necessary.
statement_index | is the index of the statement |
Add further delay if operations are faraway
Definition at line 4043 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, ENTRY_ID, EXIT_ID, GET_CONST_NODE, INDENT_DBG_MEX, test_panda::parameters, sl, and STR.
|
private |
Return the set of operations with zero time distance from source.
statement_index | is the operation to be considered |
Definition at line 4127 of file allocation_information.cpp.
References DEBUG_LEVEL_VERY_PEDANTIC, GET_CONST_NODE, INDENT_DBG_MEX, STR, AbsControlStep::UNKNOWN, and fu_binding::UNKNOWN.
bool AllocationInformation::has_constant_in | ( | unsigned int | fu_name | ) | const |
return true in case the functional unit has an input connected to a constant value
fu_name | is the id of the functional unit |
Definition at line 3014 of file allocation_information.cpp.
Referenced by setMinimumSlack().
bool AllocationInformation::has_to_be_shared | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit has to be shared.
fu_name | is the id of the functional unit. |
bool AllocationInformation::has_to_be_synthetized | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit has to be synthetized.
fu_name | is the id of the functional unit. |
Definition at line 1020 of file allocation_information.cpp.
References ENTRY_STD, EXIT_STD, get_number_fu_types(), GIMPLE_ASM_STD, GIMPLE_GOTO_STD, GIMPLE_LABEL_STD, GIMPLE_NOP_STD, GIMPLE_PHI_STD, GIMPLE_PRAGMA_STD, GIMPLE_RETURN_STD, list_of_FU, NOP_STD, and THROW_ASSERT.
Referenced by fu_binding::add_to_SM(), get_area(), get_attribute_of_fu_per_op(), get_cycles(), get_DSPs(), get_execution_time(), get_initiation_time(), get_stage_period(), get_worst_execution_time(), get_worst_stage_period(), and is_artificial_fu().
|
overridevirtual |
Initialize all the data structure.
Implements HLSIR.
Definition at line 3936 of file allocation_information.cpp.
References FunctionBehavior::CFG, hls::HLS_C, hls::HLS_D, HLSIR::Initialize(), max, NUM_CST_allocation_default_connection_offset, NUM_CST_allocation_default_fanout_coefficent, NUM_CST_allocation_default_max_fanout_size, NUM_CST_allocation_default_output_carry_connection_ratio, NUM_CST_allocation_default_output_DSP_connection_ratio, and test_panda::parameters.
Referenced by allocation::Initialize().
|
staticprivate |
Compute the values for the initialization of the DSP characteristics database.
allocation_information | is a reference to an instance of this class |
initialize DSP x and y db
Definition at line 219 of file allocation_information.cpp.
References DSP_x_db, DSP_y_db, HLSIR::hls_manager, index, SplitString(), and THROW_ASSERT.
|
staticprivate |
Compute the values for the initialization of the multiplexer characteristics database.
allocation_information | is a reference to an instance of this class |
initialize mux DBs
Definition at line 82 of file allocation_information.cpp.
References functional_unit::area_m, technology_manager::get_fu(), functional_unit::get_operation(), area_info::get_resource_value(), get_setup_hold_time(), HLSIR::hls_manager, LIBRARY_STD_FU, MAX_MUX_N_INPUTS, mux_area_db, mux_area_unit_raw(), MUX_N_TO_1, mux_time_multiplier, mux_time_unit_raw(), mux_timing_db, SplitString(), STR, THROW_ASSERT, and time_multiplier.
bool AllocationInformation::is_artificial_fu | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit is actually an artificial functional unit like: NOP, ENTRY and EXIT.
fu_name | is the id of the functional unit. |
Definition at line 973 of file allocation_information.cpp.
References ASSIGN_REAL_STD, ASSIGN_SIGNED_STD, ASSIGN_UNSIGNED_STD, get_number_fu_types(), has_to_be_synthetized(), list_of_FU, and THROW_ASSERT.
Referenced by hls::xload().
bool AllocationInformation::is_assign | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit implements an ASSIGN operation.
fu_name | is the id of the functional unit. |
Definition at line 1206 of file allocation_information.cpp.
References ASSIGN_REAL_STD, ASSIGN_SIGNED_STD, ASSIGN_UNSIGNED_STD, get_number_fu_types(), list_of_FU, and THROW_ASSERT.
Referenced by hls::xload().
bool AllocationInformation::is_direct_access_memory_unit | ( | unsigned int | fu_type | ) | const |
return true in case fu type is a memory unit with direct access channels
fu_type | is functional unit id |
Definition at line 898 of file allocation_information.cpp.
References get_fu(), MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_PROXY, MEMORY_CTRL_TYPE_PROXYN, MEMORY_CTRL_TYPE_SPROXY, and MEMORY_CTRL_TYPE_SPROXYN.
Referenced by fu_binding::add_to_SM(), mux_connection_binding::address_precision(), parametric_list_based::check_direct_operation_chaining(), mux_connection_binding::create_connections(), parametric_list_based::exec(), cdfc_module_binding::InternalExec(), cdfc_resource_ordering_functor::operator()(), and fu_binding::specialise_fu().
bool AllocationInformation::is_direct_proxy_memory_unit | ( | unsigned int | fu_type | ) | const |
return true in case4 fu type is a memory unit accessed through a proxy module
fu_type | is functional unit id |
Definition at line 909 of file allocation_information.cpp.
References get_fu(), MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_PROXY, MEMORY_CTRL_TYPE_PROXYN, MEMORY_CTRL_TYPE_SPROXY, and MEMORY_CTRL_TYPE_SPROXYN.
Referenced by fu_binding::add_to_SM().
bool AllocationInformation::is_dual_port_memory | ( | unsigned int | fu_type | ) | const |
return true in case the memory has decoupled addresses for writing and reading
fu_type | is functional unit id |
Definition at line 888 of file allocation_information.cpp.
References get_fu(), MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_SPROXY, and MEMORY_CTRL_TYPE_SPROXYN.
Referenced by fu_binding::add_to_SM(), mux_connection_binding::create_connections(), and fu_binding::specialise_fu().
bool AllocationInformation::is_indirect_access_memory_unit | ( | unsigned int | fu | ) | const |
return true in case fu type is a resource unit performing an indirect access to memory
fu_type | is functional unit id |
Definition at line 627 of file allocation_information.cpp.
References get_fu(), MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, MEMORY_CTRL_TYPE_PROXY, MEMORY_CTRL_TYPE_PROXYN, MEMORY_CTRL_TYPE_SPROXY, and MEMORY_CTRL_TYPE_SPROXYN.
Referenced by allocation::add_tech_constraint(), fu_binding::add_to_SM(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::compute_exec_stage_time(), mux_connection_binding::create_connections(), allocation::InternalExec(), resource_ordering_functor::operator()(), and cdfc_resource_ordering_functor::operator()().
bool AllocationInformation::is_memory_unit | ( | const unsigned int | fu_name | ) | const |
Returns true if the fu_name is a memory unit.
fu_name | is the id of the functional unit |
Definition at line 918 of file allocation_information.cpp.
References get_number_fu_types(), memory_units, and THROW_ASSERT.
Referenced by fu_binding::add_to_SM(), mux_connection_binding::address_precision(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), parametric_list_based::exec(), get_memory_var(), unique_binding::InternalExec(), allocation::InternalExec(), and cdfc_module_binding::InternalExec().
bool AllocationInformation::is_one_cycle_direct_access_memory_unit | ( | unsigned int | fu_type | ) | const |
return true in case the functional unit is a direct_access memory unit with a single clock latency for LOAD
fu_type | is functional unit id |
Definition at line 1310 of file allocation_information.cpp.
References get_fu(), MEMORY_CTRL_TYPE_DPROXY, MEMORY_CTRL_TYPE_DPROXYN, and MEMORY_TYPE_ASYNCHRONOUS.
Referenced by Schedule::CanBeMoved(), parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), and cdfc_module_binding::InternalExec().
bool AllocationInformation::is_operation_bounded | ( | const OpGraphConstRef | g, |
const vertex & | op, | ||
unsigned int | fu_type | ||
) | const |
Checks if the given operation has a bounded execution time or not.
g | is the graph of the vertex |
op | is the vertex representing the operation |
fu_type | is the identifier of the function unit |
Definition at line 792 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), get_fu(), tree_helper::NormalizeTypename(), and THROW_ASSERT.
Referenced by SDCScheduling::AddDelayConstraints(), Schedule::CanBeMoved(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::exec(), SDCScheduling::InternalExec(), allocation::InternalExec(), is_operation_bounded(), and Schedule::UpdateTime().
bool AllocationInformation::is_operation_bounded | ( | const unsigned int | index, |
unsigned int | fu_type | ||
) | const |
Checks if the given operation has a bounded execution time or not.
index | is the index of the statement |
fu_type | is the identifier of the function unit |
Definition at line 802 of file allocation_information.cpp.
References tree_manager::CGetTreeNode(), get_fu(), get_fu_name(), functional_unit::get_operation(), tree_helper::NormalizeTypename(), THROW_ASSERT, and TreeM.
bool AllocationInformation::is_operation_bounded | ( | const unsigned int | index | ) | const |
Checks if the given operation has a bounded execution time or not if the operation is assigned to a functional unit, check if execution time on it is bounded or not if the operation is not assigned to a functional unit, return true for small operations (i.e., Boolean expression)
currently all the operations introduced after the allocation has been performed are bounded
currently all the operations introduced after the allocation has been performed are bounded
Definition at line 845 of file allocation_information.cpp.
References CanImplementSetNotEmpty(), tree_manager::CGetTreeNode(), GET_CONST_NODE, GetFuType(), tree_node::GetString(), is_operation_bounded(), THROW_ASSERT, THROW_ERROR, and TreeM.
bool AllocationInformation::is_operation_PI_registered | ( | const OpGraphConstRef | g, |
const vertex & | op, | ||
unsigned int | fu_type | ||
) | const |
Checks if the given operation has its primary input registered or not.
g | is the graph of the vertex |
op | is the vertex representing the operation |
fu_type | is the identifier of the function unit |
Definition at line 814 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), get_fu(), tree_helper::NormalizeTypename(), and THROW_ASSERT.
Referenced by SDCScheduling::AddDelayConstraints(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_exec_stage_time(), Schedule::ComputeCriticalPath(), is_operation_PI_registered(), and Schedule::UpdateTime().
bool AllocationInformation::is_operation_PI_registered | ( | const unsigned int | index, |
unsigned int | fu_type | ||
) | const |
Checks if the given operation has its primary input registered or not.
index | is the index of the statement |
fu_type | is the identifier of the function unit |
Definition at line 825 of file allocation_information.cpp.
References tree_manager::CGetTreeNode(), get_fu(), functional_unit::get_operation(), tree_helper::NormalizeTypename(), THROW_ASSERT, and TreeM.
bool AllocationInformation::is_operation_PI_registered | ( | const unsigned int | index | ) | const |
Checks if the given operation has its primary input registered or not.
index | is the index of the statement |
Definition at line 836 of file allocation_information.cpp.
References CanImplementSetNotEmpty(), GetFuType(), and is_operation_PI_registered().
bool AllocationInformation::is_proxy_function_unit | ( | const unsigned int | fu_name | ) | const |
check if a functional unit is a proxy function unit
fu_name | is the id of the functional unit |
Definition at line 930 of file allocation_information.cpp.
References get_number_fu_types(), proxy_function_units, and THROW_ASSERT.
Referenced by is_proxy_unit().
bool AllocationInformation::is_proxy_memory_unit | ( | const unsigned int | fu_name | ) | const |
Returns true if the fu_name is a proxy memory unit.
fu_name | is the id of the functional unit |
Definition at line 3023 of file allocation_information.cpp.
References THROW_ASSERT.
Referenced by fu_binding::add_to_SM(), and setMinimumSlack().
bool AllocationInformation::is_proxy_unit | ( | const unsigned int | fu_name | ) | const |
check if a functional unit is a proxy
fu_name | is the id of the functional unit |
Definition at line 924 of file allocation_information.cpp.
References get_number_fu_types(), is_proxy_function_unit(), is_proxy_wrapped_unit(), and THROW_ASSERT.
Referenced by cdfc_module_binding::InternalExec().
bool AllocationInformation::is_proxy_wrapped_unit | ( | const unsigned int | fu_name | ) | const |
check if a functional unit is a proxy wrapped unit
fu_name | is the id of the functional unit |
Definition at line 936 of file allocation_information.cpp.
References get_number_fu_types(), proxy_wrapped_units, and THROW_ASSERT.
Referenced by is_proxy_unit().
bool AllocationInformation::is_read_cond | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit implements a READ_COND operation.
fu_name | is the id of the functional unit. |
Definition at line 1200 of file allocation_information.cpp.
References get_number_fu_types(), list_of_FU, READ_COND_STD, and THROW_ASSERT.
bool AllocationInformation::is_readonly_memory_unit | ( | const unsigned int | fu_name | ) | const |
return true in case the functional unit is a read-only memory unit
fu_name | is the functional unit |
Definition at line 3029 of file allocation_information.cpp.
References THROW_ASSERT.
Referenced by parametric_list_based::check_non_direct_operation_chaining(), parametric_list_based::CheckSchedulabilityConditions(), parametric_list_based::compute_starting_ending_time_asap(), cdfc_module_binding::InternalExec(), and setMinimumSlack().
bool AllocationInformation::is_return | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit implements a RETURN operation.
fu_name | is the id of the functional unit. |
Definition at line 1213 of file allocation_information.cpp.
References get_number_fu_types(), GIMPLE_RETURN_STD, list_of_FU, and THROW_ASSERT.
Referenced by fu_binding::add_to_SM().
bool AllocationInformation::is_simple_pointer_plus_expr | ( | const unsigned int | fu_name | ) | const |
return true in case the functional unit implement a pointer_plus operation and the operands are constants
fu_name | is the functional unit |
Definition at line 3042 of file allocation_information.cpp.
References THROW_ASSERT.
Referenced by setMinimumSlack().
bool AllocationInformation::is_single_bool_test_cond_expr_units | ( | const unsigned int | fu_name | ) | const |
return true in case the functional unit implement a cond_expr operation and the condition is a Boolean one
fu_name | is the functional unit |
Definition at line 3036 of file allocation_information.cpp.
References THROW_ASSERT.
Referenced by setMinimumSlack().
bool AllocationInformation::is_vertex_bounded | ( | const unsigned int | fu_name | ) | const |
Checks if the functional unit is uniquely bounded to a vertex.
fu_name | is the id of the functional unit. |
Definition at line 942 of file allocation_information.cpp.
References get_number_fu_types(), is_vertex_bounded_rel, and THROW_ASSERT.
Referenced by unique_binding::InternalExec(), and cdfc_module_binding::InternalExec().
bool AllocationInformation::is_vertex_bounded_with | ( | const unsigned int | v, |
unsigned int & | fu_name | ||
) | const |
In case the vertex is bounded to a particular functional unit, it returns true and the functional unit.
v | is the vertex. |
fu_name | is the eventually bounded functional unit. |
If this codition is true, the operation changed type from last time it was performed allocation; we do not invalidate binding since this function is const
Definition at line 953 of file allocation_information.cpp.
References binding, tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, and TreeM.
Referenced by parametric_list_based::add_to_priority_queues(), and is_vertex_bounded_with().
Definition at line 948 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), is_vertex_bounded_with(), and op_graph.
bool AllocationInformation::IsVariableExecutionTime | ( | const unsigned int | operation_index | ) | const |
Return true if the variable execution time depends on the scheduling.
operation_index | is the index of the operation |
Definition at line 3757 of file allocation_information.cpp.
References ENTRY_ID, and EXIT_ID.
Referenced by Schedule::UpdateTime().
unsigned int AllocationInformation::max_number_of_operations | ( | unsigned int | fu | ) | const |
return the maximum number of operations that insists on the same type of functional unit
fu | is the functional unit id |
Definition at line 1302 of file allocation_information.cpp.
References fus_to_node_id, get_number_fu_types(), and THROW_ASSERT.
unsigned int AllocationInformation::max_number_of_resources | ( | const vertex | v | ) | const |
Computes the maximum number of resources implementing the operation associated with the vertex v.
v | is the vertex for which the test is performed. |
g | is the graph of the vertex v. |
Definition at line 1267 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, INFINITE_UINT, node_id_to_fus, op_graph, tech_constraints, THROW_ASSERT, and TreeM.
unsigned int AllocationInformation::min_number_of_resources | ( | const vertex | v | ) | const |
Computes the minum number of resources implementing the operation associated with the vertex v.
v | is the vertex for which the test is performed. |
g | is the graph of the vertex v. |
Definition at line 594 of file allocation_information.cpp.
References OpGraph::CGetOpNodeInfo(), tree_manager::CGetTreeNode(), ENTRY_ID, EXIT_ID, INFINITE_UINT, node_id_to_fus, op_graph, tech_constraints, THROW_ASSERT, and TreeM.
double AllocationInformation::mux_area_unit_raw | ( | unsigned long long | fu_prec | ) | const |
Definition at line 2376 of file allocation_information.cpp.
References technology_manager::get_fu(), LIBRARY_STD_FU, MUX_GATE_STD, STR, and THROW_ASSERT.
Referenced by GetStatementArea(), InitializeMuxDB(), and setMinimumSlack().
double AllocationInformation::mux_time_unit | ( | unsigned long long | fu_prec | ) | const |
Definition at line 1826 of file allocation_information.cpp.
Referenced by parametric_list_based::compute_exec_stage_time(), estimate_mux_time(), parametric_list_based::exec(), and BB_based_stg::InternalExec().
double AllocationInformation::mux_time_unit_raw | ( | unsigned long long | fu_prec | ) | const |
Definition at line 1831 of file allocation_information.cpp.
References technology_manager::get_fu(), LIBRARY_STD_FU, MUX_GATE_STD, STR, and THROW_ASSERT.
Referenced by InitializeMuxDB().
ControlStep AllocationInformation::op_et_to_cycles | ( | double | et, |
double | clock_period | ||
) | const |
Calculates the control steps required for a specific operation.
et | is the execution time of the operation. |
clock_period | is the clock period of the system. |
Definition at line 3784 of file allocation_information.cpp.
void AllocationInformation::print | ( | std::ostream & | os | ) | const |
Definition at line 1852 of file allocation_information.cpp.
Referenced by node_kind_prec_info::node_kind_prec_info().
void AllocationInformation::print_allocated_resources | ( | ) | const |
Prints the actual allocation.
Definition at line 1876 of file allocation_information.cpp.
References DEBUG_LEVEL_PEDANTIC, DEBUG_LEVEL_VERBOSE, ENTRY_ID, EXIT_ID, tree_helper::NormalizeTypename(), PRINT_DBG_MEX, and STR.
Referenced by allocation::InternalExec().
|
private |
set the number of ports associated with the functional unit
fu_name | is the functional unit id |
n_ports | is the number of ports |
Definition at line 1262 of file allocation_information.cpp.
References nports_map.
|
inline |
set the minimum slack of the component estimated by scheduling
slack | is the timing slack |
Definition at line 939 of file allocation_information.hpp.
References can_be_asynchronous_ram(), CanBeChained(), estimate_mux_area(), get_connection_time(), get_n_complex_operations(), get_worst_number_of_cycles(), GetClockPeriodMargin(), GetCondExprTimeLatency(), GetCycleLatency(), GetFuType(), has_constant_in(), is_proxy_memory_unit(), is_readonly_memory_unit(), is_simple_pointer_plus_expr(), is_single_bool_test_cond_expr_units(), and mux_area_unit_raw().
Referenced by parametric_list_based::InternalExec().
|
private |
return the execution time of the operation corrected by time_multiplier factor
Definition at line 258 of file allocation_information.cpp.
References time_info::get_execution_time(), operation::time_m, and time_multiplier.
Referenced by allocation::check_templated_units(), allocation::get_compliant_pipelined_unit(), get_execution_time_dsp_modified(), allocation::IntegrateTechnologyLibraries(), and allocation::is_ram_not_timing_compliant().
|
private |
return the stage time of the operation corrected by time_multiplier factor
Definition at line 263 of file allocation_information.cpp.
References time_info::get_stage_period(), operation::time_m, and time_multiplier.
Referenced by allocation::get_compliant_pipelined_unit(), get_execution_time(), get_stage_period(), get_stage_period_dsp_modified(), and allocation::InternalExec().
|
friend |
Definition at line 97 of file allocation_information.hpp.
|
friend |
Definition at line 98 of file allocation_information.hpp.
|
private |
Definition at line 155 of file allocation_information.hpp.
|
private |
The behavioral helper.
Definition at line 150 of file allocation_information.hpp.
|
private |
Puts into relation operation with type and functional units.
A pair(node_id, operation_type-fu) means that the fu is used to implement the operation associated with the tree node node_id of type operation_type If the operation_type of the operation is different from the current one, the binding refers to an old version of the operation
Definition at line 206 of file allocation_information.hpp.
Referenced by get_attribute_of_fu_per_op(), allocation::InternalExec(), and is_vertex_bounded_with().
|
mutableprivate |
The bb_version on which the cond exprs driven by a ssan have been computed.
Definition at line 233 of file allocation_information.hpp.
|
private |
Definition at line 117 of file allocation_information.hpp.
|
private |
coefficient used to estimate connection delay
Definition at line 101 of file allocation_information.hpp.
|
private |
coefficient used to estimate the controller delay
Definition at line 104 of file allocation_information.hpp.
|
private |
coefficient used to modify pipelining DSPs allocation
Definition at line 138 of file allocation_information.hpp.
Referenced by allocation::get_compliant_pipelined_unit().
|
private |
store DSP x sizes
Definition at line 248 of file allocation_information.hpp.
Referenced by GetNodeTypePrec(), and InitializeDSPDB().
|
private |
store DSP y sizes
Definition at line 251 of file allocation_information.hpp.
Referenced by allocation::get_compliant_pipelined_unit(), GetNodeTypePrec(), and InitializeDSPDB().
|
private |
coefficient used to modify DSPs execution time
Definition at line 132 of file allocation_information.hpp.
Referenced by allocation::get_compliant_pipelined_unit(), and get_execution_time_dsp_modified().
|
private |
coefficient used to modify DSPs stage period
Definition at line 135 of file allocation_information.hpp.
Referenced by allocation::get_compliant_pipelined_unit(), and get_stage_period_dsp_modified().
|
private |
The coefficient used for estimating fanout delay.
Definition at line 126 of file allocation_information.hpp.
|
private |
reverse map putting into relation functional units with the operations that can be mapped on
Definition at line 200 of file allocation_information.hpp.
Referenced by allocation::InternalExec(), and max_number_of_operations().
|
private |
HLS constraints.
Definition at line 144 of file allocation_information.hpp.
Referenced by estimate_muxNto1_delay(), and get_execution_time().
|
private |
reference to the information representing the target for the synthesis
Definition at line 147 of file allocation_information.hpp.
Referenced by get_execution_time(), get_setup_hold_time(), get_stage_period(), and GetStatementArea().
|
private |
map between the functional unit identifier and the pair (library, fu) of names for the unit
Definition at line 167 of file allocation_information.hpp.
Referenced by get_area(), get_attribute_of_fu_per_op(), get_cycles(), get_DSPs(), get_execution_time(), get_fu_name(), get_initiation_time(), get_stage_period(), allocation::IntegrateTechnologyLibraries(), and allocation::InternalExec().
|
private |
Store the set of functional units (identifiers) uniquely bounded.
Definition at line 170 of file allocation_information.hpp.
Referenced by allocation::InternalExec(), and is_vertex_bounded().
|
private |
Stores the list of the functional units.
Definition at line 173 of file allocation_information.hpp.
Referenced by allocation::add_tech_constraint(), get_area(), get_attribute_of_fu_per_op(), get_cycles(), get_DSPs(), get_execution_time(), get_fu(), get_initiation_time(), get_number_fu_types(), get_stage_period(), get_string_name(), get_worst_execution_time(), get_worst_stage_period(), has_to_be_synthetized(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), is_artificial_fu(), is_assign(), is_read_cond(), and is_return().
|
private |
The maximum size of fanout.
Definition at line 129 of file allocation_information.hpp.
|
private |
coefficient used to correct timing of memories
Definition at line 115 of file allocation_information.hpp.
|
private |
map between memory units and the associated variables
Definition at line 176 of file allocation_information.hpp.
Referenced by get_memory_units(), get_memory_var(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), and is_memory_unit().
|
private |
size of each memory unit in bytes
Definition at line 209 of file allocation_information.hpp.
Referenced by allocation::IntegrateTechnologyLibraries().
|
private |
minimum slack
Definition at line 161 of file allocation_information.hpp.
Referenced by getMinimumSlack().
|
private |
store mux timing for the current technology
Definition at line 245 of file allocation_information.hpp.
Referenced by estimate_muxNto1_area(), and InitializeMuxDB().
|
private |
Definition at line 112 of file allocation_information.hpp.
Referenced by InitializeMuxDB().
|
private |
store mux timing for the current technology
Definition at line 242 of file allocation_information.hpp.
Referenced by estimate_muxNto1_delay(), and InitializeMuxDB().
|
private |
number of complex operations
Definition at line 164 of file allocation_information.hpp.
Referenced by allocation::InternalExec().
|
private |
for each operation (node-id, operation) return the set of functional unit that can be used
Definition at line 197 of file allocation_information.hpp.
Referenced by can_implement_set(), CanImplementSetNotEmpty(), get_attribute_of_fu_per_op(), allocation::InternalExec(), max_number_of_resources(), and min_number_of_resources().
|
private |
define the number of ports associated with the functional unit
Definition at line 179 of file allocation_information.hpp.
Referenced by get_number_channels(), allocation::set_number_channels(), and set_number_channels().
|
private |
The operation graph.
Definition at line 141 of file allocation_information.hpp.
Referenced by can_implement_set(), get_initiation_time(), is_vertex_bounded_with(), max_number_of_resources(), and min_number_of_resources().
|
private |
Connection delay at the exit of carry.
Definition at line 123 of file allocation_information.hpp.
|
private |
Connection delay at the exit of DSP.
Definition at line 120 of file allocation_information.hpp.
|
private |
map functional units with their precision
Definition at line 182 of file allocation_information.hpp.
Referenced by allocation::IntegrateTechnologyLibraries(), and allocation::InternalExec().
|
private |
store the pre-computed pipeline unit: given a functional unit it return the pipeline id compliant
Definition at line 215 of file allocation_information.hpp.
|
private |
put into relation proxy function units with shared functions
Definition at line 185 of file allocation_information.hpp.
Referenced by get_proxy_function_units(), allocation::InternalExec(), and is_proxy_function_unit().
|
private |
put into relation proxy memory units with variables
Definition at line 188 of file allocation_information.hpp.
Referenced by get_proxy_memory_units(), get_proxy_memory_var(), allocation::IntegrateTechnologyLibraries(), and allocation::InternalExec().
|
private |
put into relation proxy wrapped units with shared functions
Definition at line 191 of file allocation_information.hpp.
Referenced by get_proxy_wrapped_units(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), and is_proxy_wrapped_unit().
|
private |
The memory.
Definition at line 153 of file allocation_information.hpp.
|
private |
coefficient used to modify setup value
Definition at line 107 of file allocation_information.hpp.
Referenced by get_setup_hold_time().
|
private |
in case of pointer plus expr between constants: no wire delay
Definition at line 221 of file allocation_information.hpp.
Referenced by allocation::InternalExec().
|
private |
store all cond_expr units having a Boolean condition
Definition at line 218 of file allocation_information.hpp.
Referenced by allocation::InternalExec().
|
mutableprivate |
The bb_version-control root on which the roots of a ssa have been computed.
Definition at line 227 of file allocation_information.hpp.
|
mutableprivate |
The cond exprs driven by a ssa.
Definition at line 230 of file allocation_information.hpp.
The roots used to compute a ssa.
Definition at line 224 of file allocation_information.hpp.
|
private |
put into relation variable and their latency when they are mapped on a private synchronous ram
Definition at line 254 of file allocation_information.hpp.
Referenced by allocation::get_synch_ram_latency().
|
private |
For each functional unit (position in the vector), tech_constraints stores the maximum number of resources.
Definition at line 194 of file allocation_information.hpp.
Referenced by allocation::add_tech_constraint(), get_number_fu(), allocation::IntegrateTechnologyLibraries(), allocation::InternalExec(), max_number_of_resources(), and min_number_of_resources().
|
private |
coefficient used to modify execution time and stage time
Definition at line 110 of file allocation_information.hpp.
Referenced by get_setup_hold_time(), InitializeMuxDB(), time_m_execution_time(), and time_m_stage_period().
|
private |
The tree manager.
Definition at line 158 of file allocation_information.hpp.
Referenced by can_implement_set(), CanImplementSetNotEmpty(), get_attribute_of_fu_per_op(), get_cycles(), get_execution_time(), get_initiation_time(), get_stage_period(), GetNodeTypePrec(), GetStatementArea(), is_operation_bounded(), is_operation_PI_registered(), is_vertex_bounded_with(), max_number_of_resources(), and min_number_of_resources().
|
private |
map between variables and associated memory_units
Definition at line 212 of file allocation_information.hpp.
Referenced by allocation::IntegrateTechnologyLibraries(), and allocation::InternalExec().
|
mutableprivate |
The operations reachable with delay zero.
Definition at line 236 of file allocation_information.hpp.
|
mutableprivate |
The bb_version on which the reachable delay zero operations.
Definition at line 239 of file allocation_information.hpp.