PandA-2024.02
Public Member Functions | Protected Attributes
StorageValueInformationFsm Class Reference

#include <storage_value_information_fsm.hpp>

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

Public Member Functions

 StorageValueInformationFsm (const HLS_managerConstRef HLS_mgr, const unsigned int function_id)
 Constructor. More...
 
 ~StorageValueInformationFsm () override
 Destructor. More...
 
bool is_a_storage_value (vertex curr_vertex, unsigned int var_index) override
 return true in case a storage value exist for the pair vertex variable More...
 
unsigned int get_storage_value_index (vertex curr_vertex, unsigned int var_index) override
 Returns the index of the storage value associated with the variable in a given vertex. More...
 
void set_storage_value_index (vertex curr_state, unsigned int variable, unsigned int sv) override
 assign a strage value to a couple state-variable More...
 
- Public Member Functions inherited from StorageValueInformation
 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...
 
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...
 
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

CustomUnorderedMap< unsigned int, unsigned int > storage_index_map
 put into relation variables/values with storage values More...
 
- Protected Attributes inherited from StorageValueInformation
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...
 

Detailed Description

Definition at line 46 of file storage_value_information_fsm.hpp.

Constructor & Destructor Documentation

◆ StorageValueInformationFsm()

StorageValueInformationFsm::StorageValueInformationFsm ( const HLS_managerConstRef  HLS_mgr,
const unsigned int  function_id 
)

Constructor.

Header include.

Definition at line 44 of file storage_value_information_fsm.cpp.

References ~StorageValueInformationFsm().

Here is the call graph for this function:

◆ ~StorageValueInformationFsm()

StorageValueInformationFsm::~StorageValueInformationFsm ( )
overridedefault

Destructor.

Referenced by StorageValueInformationFsm().

Here is the caller graph for this function:

Member Function Documentation

◆ get_storage_value_index()

unsigned int StorageValueInformationFsm::get_storage_value_index ( vertex  curr_vertex,
unsigned int  var_index 
)
overridevirtual

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

Parameters
curr_vertexis the vertex
var_indexis the variable

Implements StorageValueInformation.

Definition at line 57 of file storage_value_information_fsm.cpp.

References storage_index_map, and THROW_ASSERT.

◆ is_a_storage_value()

bool StorageValueInformationFsm::is_a_storage_value ( vertex  curr_vertex,
unsigned int  var_index 
)
overridevirtual

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

Parameters
curr_vertexis the vertex
var_indexis the variable

Implements StorageValueInformation.

Definition at line 52 of file storage_value_information_fsm.cpp.

References storage_index_map.

◆ set_storage_value_index()

void StorageValueInformationFsm::set_storage_value_index ( vertex  curr_state,
unsigned int  variable,
unsigned int  sv 
)
overridevirtual

assign a strage value to a couple state-variable

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

Implements StorageValueInformation.

Definition at line 63 of file storage_value_information_fsm.cpp.

References storage_index_map.

Field Documentation

◆ storage_index_map

CustomUnorderedMap<unsigned int, unsigned int> StorageValueInformationFsm::storage_index_map
protected

put into relation variables/values with storage values

Definition at line 50 of file storage_value_information_fsm.hpp.

Referenced by get_storage_value_index(), is_a_storage_value(), and set_storage_value_index().


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