OpenASIP
2.0
|
#include <TestbenchGenerator.hh>
Public Member Functions | |
TestbenchGenerator () | |
virtual | ~TestbenchGenerator () |
virtual void | generateTestbench (std::ofstream &file)=0 |
Protected Types | |
typedef std::map< std::string, std::vector< uint32_t > > | PortDataArray |
Protected Member Functions | |
virtual void | writeStimulusArray (std::ostringstream &stream, std::vector< uint32_t > &dataArray, std::string portName, int portWidth) |
void | writeTbConstants (int totalCycles, int outputIgnoreCycles) |
void | writeTestbench (std::ofstream &file, HDB::HWBlockImplementation *impl) |
std::ostringstream & | declarationStream () |
std::ostringstream & | bindingStream () |
std::ostringstream & | signalStream () |
std::ostringstream & | instantiationStream () |
std::ostringstream & | inputArrayStream () |
std::ostringstream & | opcodeArrayStream () |
std::ostringstream & | loadArrayStream () |
std::ostringstream & | outputArrayStream () |
std::ostringstream & | tbCodeStream () |
Private Member Functions | |
std::string | findVhdlTemplate () const |
void | loadVhdlTemplate (const std::string &fileName, std::string &vhdlTemplate) const |
Private Attributes | |
std::ostringstream | componentDeclaration_ |
std::ostringstream | componentBinding_ |
std::ostringstream | signalDeclaration_ |
std::ostringstream | componentInstantiation_ |
std::ostringstream | inputArrays_ |
std::ostringstream | opcodeArrays_ |
std::ostringstream | loadSignalArrays_ |
std::ostringstream | outputArrays_ |
std::ostringstream | testbenchCode_ |
Static Private Attributes | |
static const std::string | TB_TEMPLATE_ |
Definition at line 47 of file TestbenchGenerator.hh.
|
protected |
Definition at line 56 of file TestbenchGenerator.hh.
TestbenchGenerator::TestbenchGenerator | ( | ) |
Definition at line 57 of file TestbenchGenerator.cc.
|
virtual |
Definition at line 63 of file TestbenchGenerator.cc.
|
protected |
Definition at line 188 of file TestbenchGenerator.cc.
References componentBinding_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and FUTestbenchGenerator::createTbInstantiation().
|
protected |
Definition at line 183 of file TestbenchGenerator.cc.
References componentDeclaration_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and FUTestbenchGenerator::createTbInstantiation().
|
private |
Definition at line 142 of file TestbenchGenerator.cc.
References FileSystem::DIRECTORY_SEPARATOR, FileSystem::fileExists(), Environment::implementationTesterTemplatePaths(), and TB_TEMPLATE_.
Referenced by writeTestbench().
|
pure virtual |
Implemented in FUTestbenchGenerator, and RFTestbenchGenerator.
Referenced by ImplementationTester::createTestbench().
|
protected |
Definition at line 203 of file TestbenchGenerator.cc.
References inputArrays_.
Referenced by RFTestbenchGenerator::createStimulusArrays(), and FUTestbenchGenerator::createStimulusArrays().
|
protected |
Definition at line 198 of file TestbenchGenerator.cc.
References componentInstantiation_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and FUTestbenchGenerator::createTbInstantiation().
|
protected |
Definition at line 213 of file TestbenchGenerator.cc.
References loadSignalArrays_.
Referenced by RFTestbenchGenerator::createStimulusArrays(), and FUTestbenchGenerator::createStimulusArrays().
|
private |
|
protected |
Definition at line 208 of file TestbenchGenerator.cc.
References opcodeArrays_.
Referenced by RFTestbenchGenerator::createStimulusArrays(), and FUTestbenchGenerator::createStimulusArrays().
|
protected |
Definition at line 218 of file TestbenchGenerator.cc.
References outputArrays_.
Referenced by RFTestbenchGenerator::createStimulusArrays(), and FUTestbenchGenerator::createStimulusArrays().
|
protected |
Definition at line 193 of file TestbenchGenerator.cc.
References signalDeclaration_.
Referenced by RFTestbenchGenerator::createTbInstantiation(), and FUTestbenchGenerator::createTbInstantiation().
|
protected |
Definition at line 223 of file TestbenchGenerator.cc.
References testbenchCode_.
Referenced by RFTestbenchGenerator::createTbCode(), and FUTestbenchGenerator::createTbCode().
|
protectedvirtual |
Definition at line 68 of file TestbenchGenerator.cc.
References INDENT, and Conversion::toBinary().
Referenced by FUTestbenchGenerator::createStimulusArrays(), and RFTestbenchGenerator::writeDataArrays().
|
protected |
Definition at line 104 of file TestbenchGenerator.cc.
References INDENT, and outputArrays_.
Referenced by RFTestbenchGenerator::createStimulus(), and FUTestbenchGenerator::createStimulus().
|
protected |
Definition at line 116 of file TestbenchGenerator.cc.
References HDB::HWBlockImplementation::clkPort(), componentBinding_, componentDeclaration_, componentInstantiation_, findVhdlTemplate(), HDB::HWBlockImplementation::glockPort(), inputArrays_, loadSignalArrays_, loadVhdlTemplate(), opcodeArrays_, outputArrays_, HDB::HWBlockImplementation::rstPort(), signalDeclaration_, and testbenchCode_.
Referenced by RFTestbenchGenerator::generateTestbench(), and FUTestbenchGenerator::generateTestbench().
|
private |
Definition at line 86 of file TestbenchGenerator.hh.
Referenced by bindingStream(), and writeTestbench().
|
private |
Definition at line 85 of file TestbenchGenerator.hh.
Referenced by declarationStream(), and writeTestbench().
|
private |
Definition at line 88 of file TestbenchGenerator.hh.
Referenced by instantiationStream(), and writeTestbench().
|
private |
Definition at line 89 of file TestbenchGenerator.hh.
Referenced by inputArrayStream(), and writeTestbench().
|
private |
Definition at line 91 of file TestbenchGenerator.hh.
Referenced by loadArrayStream(), and writeTestbench().
|
private |
Definition at line 90 of file TestbenchGenerator.hh.
Referenced by opcodeArrayStream(), and writeTestbench().
|
private |
Definition at line 92 of file TestbenchGenerator.hh.
Referenced by outputArrayStream(), writeTbConstants(), and writeTestbench().
|
private |
Definition at line 87 of file TestbenchGenerator.hh.
Referenced by signalStream(), and writeTestbench().
|
staticprivate |
Definition at line 95 of file TestbenchGenerator.hh.
Referenced by findVhdlTemplate().
|
private |
Definition at line 93 of file TestbenchGenerator.hh.
Referenced by tbCodeStream(), and writeTestbench().