PandA-2024.02
Public Member Functions | Protected Attributes | Friends
StorageValueInformation Class Referenceabstract

#include <storage_value_information.hpp>

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

Public Member Functions

 StorageValueInformation (const HLS_managerConstRef HLS_mgr, const unsigned int function_id)
 Constructor. More...
 
virtual ~StorageValueInformation ()
 Destructor. More...
 
void Initialize ()
 Initialize the step (i.e., like a constructor) More...
 
unsigned int get_number_of_storage_values () const
 Returns the number of storage values inserted. More...
 
virtual bool is_a_storage_value (vertex curr_vertex, unsigned int var_index)=0
 return true in case a storage value exist for the pair vertex variable More...
 
virtual unsigned int get_storage_value_index (vertex curr_vertex, unsigned int var_index)=0
 Returns the index of the storage value associated with the variable in a given vertex. More...
 
unsigned int get_variable_index (unsigned int storage_value_index) const
 Returns the index of the variable associated with the storage value in a given vertex. More...
 
int get_compatibility_weight (unsigned int storage_value_index1, unsigned int storage_value_index2) const
 return a weight that estimate how much two storage values are compatible. More...
 
virtual void set_storage_value_index (vertex curr_state, unsigned int variable, unsigned int sv)=0
 assign a storage value to a couple state-variable More...
 
bool are_value_bitsize_compatible (unsigned int storage_value_index1, unsigned int storage_value_index2) const
 return the in case the storage values have compatible size More...
 

Protected Attributes

unsigned int number_of_storage_values
 current number of storage values More...
 
CustomUnorderedMap< unsigned int, unsigned int > variable_index_map
 put into relation storage value index with variables More...
 
CustomUnorderedMap< unsigned int, vertexvw2vertex
 relation between var written and operations More...
 
const HLS_managerConstRef HLS_mgr
 The HLS manager. More...
 
const unsigned int function_id
 The index of the function. More...
 
OpGraphConstRef data
 operation graph used to compute the affinity between storage values More...
 
Wrefcount< const fu_bindingfu
 functional unit assignments More...
 

Friends

class values_scheme
 

Detailed Description

Definition at line 56 of file storage_value_information.hpp.

Constructor & Destructor Documentation

◆ StorageValueInformation()

StorageValueInformation::StorageValueInformation ( const HLS_managerConstRef  _HLS_mgr,
const unsigned int  _function_id 
)

Constructor.

Header include.

Autoheader include behavior include HLS include HLS/binding/module_binding includes tree includes

Definition at line 65 of file storage_value_information.cpp.

References ~StorageValueInformation().

Here is the call graph for this function:

◆ ~StorageValueInformation()

StorageValueInformation::~StorageValueInformation ( )
virtualdefault

Destructor.

Referenced by StorageValueInformation().

Here is the caller graph for this function:

Member Function Documentation

◆ are_value_bitsize_compatible()

bool StorageValueInformation::are_value_bitsize_compatible ( unsigned int  storage_value_index1,
unsigned int  storage_value_index2 
) const

return the in case the storage values have compatible size

Parameters
storage_value_index1is the first storage value
storage_value_index2is the second storage value

Definition at line 371 of file storage_value_information.cpp.

References get_variable_index(), HLS_mgr, tree_helper::IsRealType(), tree_helper::IsSignedIntegerType(), and tree_helper::Size().

Referenced by compatibility_based_register::create_compatibility_graph(), and conflict_based_register::create_conflict_graph().

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

◆ get_compatibility_weight()

int StorageValueInformation::get_compatibility_weight ( unsigned int  storage_value_index1,
unsigned int  storage_value_index2 
) const

return a weight that estimate how much two storage values are compatible.

An high value returned means an high compatibility between the two storage values.

disabled input register sharing

Definition at line 134 of file storage_value_information.cpp.

References OpGraph::CGetOpNodeInfo(), data, DEBUG_LEVEL_VERY_PEDANTIC, fu, GET_NAME, GET_TYPE, get_variable_index(), HLS_mgr, INDENT_DBG_MEX, INFINITE_UINT, Wrefcount< T >::lock(), SCALAR, STR, THROW_ASSERT, THROW_ERROR, TYPE_ENTRY, TYPE_PHI, USE, and vw2vertex.

Referenced by compatibility_based_register::create_compatibility_graph().

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

◆ get_number_of_storage_values()

unsigned int StorageValueInformation::get_number_of_storage_values ( ) const

◆ get_storage_value_index()

virtual unsigned int StorageValueInformation::get_storage_value_index ( vertex  curr_vertex,
unsigned int  var_index 
)
pure virtual

◆ get_variable_index()

unsigned int StorageValueInformation::get_variable_index ( unsigned int  storage_value_index) const

Returns the index of the variable associated with the storage value in a given vertex.

Definition at line 127 of file storage_value_information.cpp.

References THROW_ASSERT, and variable_index_map.

Referenced by are_value_bitsize_compatible(), get_compatibility_weight(), reg_binding::get_vars(), and reg_binding::print_el().

Here is the caller graph for this function:

◆ Initialize()

void StorageValueInformation::Initialize ( )

◆ is_a_storage_value()

virtual bool StorageValueInformation::is_a_storage_value ( vertex  curr_vertex,
unsigned int  var_index 
)
pure virtual

return true in case a storage value exist for the pair vertex variable

Parameters
curr_vertexis the vertex
var_indexis the variable

Implemented in StorageValueInformationFsm, and StorageValueInformationPipeline.

Referenced by mux_connection_binding::connect_to_registers(), mux_connection_binding::create_connections(), fsm_controller::create_state_machine(), estimate_muxes(), values_scheme::InternalExec(), and port_swapping::InternalExec().

Here is the caller graph for this function:

◆ set_storage_value_index()

virtual void StorageValueInformation::set_storage_value_index ( vertex  curr_state,
unsigned int  variable,
unsigned int  sv 
)
pure virtual

assign a storage value to a couple state-variable

Parameters
curr_stateis the current state
variableis the assigned variable
svis the assigned storage value

Implemented in StorageValueInformationFsm, and StorageValueInformationPipeline.

Referenced by values_scheme::InternalExec().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ values_scheme

friend class values_scheme
friend

Definition at line 59 of file storage_value_information.hpp.

Field Documentation

◆ data

OpGraphConstRef StorageValueInformation::data
protected

operation graph used to compute the affinity between storage values

Definition at line 77 of file storage_value_information.hpp.

Referenced by get_compatibility_weight(), and Initialize().

◆ fu

Wrefcount<const fu_binding> StorageValueInformation::fu
protected

functional unit assignments

Definition at line 80 of file storage_value_information.hpp.

Referenced by get_compatibility_weight(), and Initialize().

◆ function_id

const unsigned int StorageValueInformation::function_id
protected

The index of the function.

Definition at line 74 of file storage_value_information.hpp.

Referenced by Initialize().

◆ HLS_mgr

const HLS_managerConstRef StorageValueInformation::HLS_mgr
protected

The HLS manager.

Definition at line 71 of file storage_value_information.hpp.

Referenced by are_value_bitsize_compatible(), get_compatibility_weight(), and Initialize().

◆ number_of_storage_values

unsigned int StorageValueInformation::number_of_storage_values
protected

current number of storage values

Definition at line 62 of file storage_value_information.hpp.

Referenced by get_number_of_storage_values(), and values_scheme::InternalExec().

◆ variable_index_map

CustomUnorderedMap<unsigned int, unsigned int> StorageValueInformation::variable_index_map
protected

put into relation storage value index with variables

Definition at line 65 of file storage_value_information.hpp.

Referenced by get_variable_index(), and values_scheme::InternalExec().

◆ vw2vertex

CustomUnorderedMap<unsigned int, vertex> StorageValueInformation::vw2vertex
protected

relation between var written and operations

Definition at line 68 of file storage_value_information.hpp.

Referenced by get_compatibility_weight(), and Initialize().


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

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