41 #ifndef HLS_C_WRITER_HPP 42 #define HLS_C_WRITER_HPP 72 const std::map<std::string, std::string>& curr_test_vector);
139 void WriteFile(
const std::string& file_name)
override;
HLSCWriter(const CBackendInformationConstRef hls_c_backend_information, const HLS_managerConstRef _HLSMgr, const InstructionWriterRef instruction_writer, const IndentedOutputStreamRef indented_output_stream, const ParameterConstRef _parameters, bool verbose=true)
Constructor of the class.
const CBackendInformationConstRef c_backend_info
Backend information.
void WriteHeader() override
Writes the header of the file.
Class used to write the C code representing a program, this class can't be directly instantiated sinc...
void WriteBuiltinWaitCall() override
Writes implementation of __builtin_wait_call.
bool verbose
Verbosity means that a comment is printed for each line in the output file.
void WriteFunctionImplementation(unsigned int function_index) override
Write function implementation.
void WriteSimulatorInitMemory(const unsigned int function_id)
Write some print statements used to dump the values used by the HDL to initialize the memory before t...
void WriteTestbenchFunctionCall(const BehavioralHelperConstRef behavioral_helper)
Writes a call to the top function to be tested, using its parameters.
CONSTREF_FORWARD_DECL(HLSCBackendInformation)
Superclass include.
const IndentedOutputStreamRef indented_output_stream
Represents the stream we are currently writing to.
void WriteParamInitialization(const BehavioralHelperConstRef behavioral_helper, const std::map< std::string, std::string > &curr_test_vector)
Initialize the parameters of the function.
Template definition of refcount.
void WriteGlobalDeclarations() override
Writes the global declarations.
virtual void WriteExtraInitCode()
Write additional initialization code needed by subclasses.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
This file contains the routines necessary to create a C executable program.
virtual void WriteMainTestbench()
Writes the main() of the testbench C program.
void WriteFile(const std::string &file_name) override
Writes the final C file.
virtual void WriteExtraCodeBeforeEveryMainCall()
void WriteParamDecl(const BehavioralHelperConstRef behavioral_helper)
Write declaration of the top function parameters.