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

Functor used to write initialization of the memory writer. More...

#include <memory_initialization_writer.hpp>

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

Public Member Functions

 MemoryInitializationWriter (std::ofstream &output_stream, const tree_managerConstRef TM, const BehavioralHelperConstRef behavioral_helper, const unsigned long int reserved_mem_bytes, const tree_nodeConstRef function_parameter, const TestbenchGeneration_MemoryType testbench_generation_memory_type, const ParameterConstRef parameters)
 Constructor. More...
 
void Process (const std::string &content) override
 Process an element. More...
 
void ActivateFileInit (const std::string &) override
 In this case the function does not activate anything. More...
 
void FinalizeFileInit () override
 do nothing More...
 
- Public Member Functions inherited from MemoryInitializationWriterBase
 MemoryInitializationWriterBase (const tree_managerConstRef TM, const BehavioralHelperConstRef behavioral_helper, const unsigned long int reserved_mem_bytes, const tree_nodeConstRef function_parameter, const TestbenchGeneration_MemoryType testbench_generation_memory_type, const ParameterConstRef parameters)
 Constructor. More...
 
void CheckEnd () override
 Check that all the necessary information was present in the initialization string. More...
 
void GoDown () override
 Start the initialization of a new aggregated data structure. More...
 
void GoNext () override
 Consume an element of an aggregated data structure. More...
 
void GoUp () override
 Ends the initialization of the current aggregated data structure. More...
 
- Public Member Functions inherited from CInitializationParserFunctor
 CInitializationParserFunctor ()
 Constructor. More...
 
virtual ~CInitializationParserFunctor ()
 Destructor. More...
 

Protected Attributes

std::ofstream & output_stream
 The stream corresponding to the memory initialization file. More...
 
- Protected Attributes inherited from MemoryInitializationWriterBase
const tree_managerConstRef TM
 The tree manager. More...
 
const BehavioralHelperConstRef behavioral_helper
 The behavioral helper. More...
 
const unsigned long int reserved_mem_bytes
 The number of bytes to be written. More...
 
unsigned long int written_bytes
 The number of bytes currently written. More...
 
std::vector< std::pair< const tree_nodeConstRef, size_t > > status
 The stack representing the current status of the parser; the content is the last dumped element. More...
 
const tree_nodeConstRef function_parameter
 The variable/parameter being printed. More...
 
const TestbenchGeneration_MemoryType testbench_generation_memory_type
 The type of initialization being written. More...
 
- Protected Attributes inherited from CInitializationParserFunctor
int debug_level
 The debug level. More...
 
bool write_in_a_file
 the data will be written in a data copied by the caller More...
 
std::string file_variable
 variable used to write in a variable More...
 

Additional Inherited Members

- Protected Member Functions inherited from MemoryInitializationWriterBase
const std::string PrintStatus () const
 Print the current status. More...
 

Detailed Description

Functor used to write initialization of the memory writer.

Definition at line 65 of file memory_initialization_writer.hpp.

Constructor & Destructor Documentation

◆ MemoryInitializationWriter()

MemoryInitializationWriter::MemoryInitializationWriter ( std::ofstream &  _output_stream,
const tree_managerConstRef  _TM,
const BehavioralHelperConstRef  _behavioral_helper,
const unsigned long int  _reserved_mem_bytes,
const tree_nodeConstRef  _function_parameter,
const TestbenchGeneration_MemoryType  _testbench_generation_memory_type,
const ParameterConstRef  _parameters 
)

Constructor.

Header include.

Parameters
output_streamis where memory initialization will be written
TMis the tree manager
behavioral_helperis the behavioral helper
reserved_mem_bytesis the number of bytes to be written
function_parameteris the function parameter whose initialization is being printed
testbench_generation_memory_typeis the type of initialization being printed
parametersis the set of input parameters

. include HLS/simulation include STD include STL include tree includes utility include

Definition at line 68 of file memory_initialization_writer.cpp.

References CInitializationParserFunctor::debug_level, and GET_CLASS.

Member Function Documentation

◆ ActivateFileInit()

void MemoryInitializationWriter::ActivateFileInit ( const std::string &  )
inlineoverridevirtual

In this case the function does not activate anything.

Implements CInitializationParserFunctor.

Definition at line 96 of file memory_initialization_writer.hpp.

◆ FinalizeFileInit()

void MemoryInitializationWriter::FinalizeFileInit ( )
inlineoverridevirtual

do nothing

Implements CInitializationParserFunctor.

Definition at line 103 of file memory_initialization_writer.hpp.

◆ Process()

void MemoryInitializationWriter::Process ( const std::string &  content)
overridevirtual

Field Documentation

◆ output_stream

std::ofstream& MemoryInitializationWriter::output_stream
protected

The stream corresponding to the memory initialization file.

Definition at line 69 of file memory_initialization_writer.hpp.

Referenced by Process().


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

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