OpenASIP  2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ImplementationTester Class Reference

#include <ImplementationTester.hh>

Collaboration diagram for ImplementationTester:
Collaboration graph

Public Member Functions

 ImplementationTester ()
 
 ImplementationTester (std::string hdbFile, VhdlSim simulator)
 
 ImplementationTester (std::string hdbFile, VhdlSim simulator, bool verbose, bool leaveDirty)
 
virtual ~ImplementationTester ()
 
void setVhdlSimulator (VhdlSim simulator)
 
void openHdb (std::string hdbFile)
 
bool canTestFU (const int entryID, std::string &reason)
 
bool canTestRF (const int entryID, std::string &reason)
 
bool validateFU (const int entryID, std::vector< std::string > &errors)
 
bool validateRF (const int entryID, std::vector< std::string > &errors)
 
std::set< int > fuEntryIDs () const
 
std::set< int > rfEntryIDs () const
 

Private Member Functions

bool fuHasMemoryAccess (HDB::FUEntry *fuEntry) const
 
bool fuFullyPipelined (HDB::FUEntry *fuEntry) const
 
bool fuHasExternalPorts (HDB::FUEntry *fuEntry) const
 
bool fuHasOnePort (HDB::FUEntry *fuEntry) const
 
HDB::FUEntryfuEntryFromHdb (int entryID) const
 
HDB::RFEntryrfEntryFromHdb (int entryID) const
 
bool createTempDir ()
 
std::string fuTbName (int id) const
 
std::string rfTbName (int id) const
 
void openTbFile (std::ofstream &fileStream, std::string fileName) const
 
void createListOfSimulationFiles (const HDB::HWBlockImplementation *impl, std::vector< std::string > &files) const
 
void createTestbench (TestbenchGenerator *tbGen, std::string tbName) const
 
bool simulateTestbench (std::string testbench, const HDB::HWBlockImplementation *implementation, std::vector< std::string > &errors) const
 

Private Attributes

std::string hdbFile_
 
HDB::HDBManagerhdb_
 
VhdlSim simulator_
 
bool verbose_
 
bool leaveDirty_
 
std::string tempDir_
 

Detailed Description

Definition at line 52 of file ImplementationTester.hh.

Constructor & Destructor Documentation

◆ ImplementationTester() [1/3]

ImplementationTester::ImplementationTester ( )

Default constructor

Definition at line 74 of file ImplementationTester.cc.

74  :
75  hdbFile_(""),
76  hdb_(NULL),
77  simulator_(SIM_GHDL), verbose_(false), leaveDirty_(false), tempDir_("") {
78 }

◆ ImplementationTester() [2/3]

ImplementationTester::ImplementationTester ( std::string  hdbFile,
VhdlSim  simulator 
)

Constructor

Parameters
hdbFileName of the hdb file
simulatorName of the HDL simulator to be used

Definition at line 86 of file ImplementationTester.cc.

87  :
88  hdbFile_(hdbFile),
89  hdb_(NULL),
90  simulator_(simulator),
91  verbose_(false), leaveDirty_(false), tempDir_("") {
92 
95 }

References FileSystem::absolutePathOf(), hdbFile_, and openHdb().

Here is the call graph for this function:

◆ ImplementationTester() [3/3]

ImplementationTester::ImplementationTester ( std::string  hdbFile,
VhdlSim  simulator,
bool  verbose,
bool  leaveDirty 
)

Constructor

Parameters
hdbFileName of the hdb file
simulatorName of the HDL simulator to be used
verboseEnable verbose messages
leaveDirtyDon't delete created testbench files

Definition at line 106 of file ImplementationTester.cc.

107  :
108  hdbFile_(hdbFile),
109  hdb_(NULL),
110  simulator_(simulator),
111  verbose_(verbose), leaveDirty_(leaveDirty), tempDir_("") {
112 
114  openHdb(hdbFile_);
115 }

References FileSystem::absolutePathOf(), hdbFile_, and openHdb().

Here is the call graph for this function:

◆ ~ImplementationTester()

ImplementationTester::~ImplementationTester ( )
virtual

Destructor

Definition at line 120 of file ImplementationTester.cc.

120  {
121  if (leaveDirty_) {
122  if (tempDir_.empty()) {
123  std::cout << "No testbench files created" << std::endl;
124  } else {
125  std::cout << "Testbench files are stored at " << tempDir_
126  << std::endl;
127  }
128  } else {
129  // clear created files
130  if (!tempDir_.empty()) {
132  }
133  }
134 }

References leaveDirty_, FileSystem::removeFileOrDirectory(), and tempDir_.

Here is the call graph for this function:

Member Function Documentation

◆ canTestFU()

bool ImplementationTester::canTestFU ( const int  entryID,
std::string &  reason 
)

Tests whether a FU can be tested

Parameters
entryIDEntry ID of the FU
reasonIf FU can't be tested this string holds the reason why
Returns
True if can be tested

Definition at line 175 of file ImplementationTester.cc.

175  {
176 
177  bool canTest = true;
178  HDB::FUEntry* fuEntry = NULL;
179  try {
180  fuEntry = fuEntryFromHdb(entryID);
181  } catch (KeyNotFound& e) {
182  std::ostringstream errorStream;
183  errorStream << "ID " << entryID << " does not exist in HDB "
184  << hdbFile_;
185  reason = errorStream.str();
186  return false;
187  }
188  if (!fuEntry->hasArchitecture()) {
189  reason = "FU entry does not have architecture";
190  canTest = false;
191  } else if (!fuEntry->hasImplementation()) {
192  reason = "FU entry does not have implementation";
193  canTest = false;
194  } else if (fuHasMemoryAccess(fuEntry)) {
195  reason = "Simulation of memory accessing FUs is not supported";
196  canTest = false;
197  } else if (!fuFullyPipelined(fuEntry)) {
198  reason = "Simulation of non-pipelined FUs in not supported";
199  canTest = false;
200  } else if (fuHasExternalPorts(fuEntry)) {
201  reason = "Simulation of FUs with external ports is not supported";
202  canTest = false;
203  } else if (fuHasOnePort(fuEntry)) {
204  reason = "FU has only one port";
205  canTest = false;
206  }
207  delete fuEntry;
208  return canTest;
209 }

References fuEntryFromHdb(), fuFullyPipelined(), fuHasExternalPorts(), fuHasMemoryAccess(), fuHasOnePort(), HDB::FUEntry::hasArchitecture(), HDB::FUEntry::hasImplementation(), and hdbFile_.

Referenced by HDBTester::testFU(), and validateFU().

Here is the call graph for this function:

◆ canTestRF()

bool ImplementationTester::canTestRF ( const int  entryID,
std::string &  reason 
)

Tests whether a RF can be tested

Parameters
entryIDEntry ID of the RF
reasonIf RF can't be tested this string holds the reason why
Returns
True if can be tested

Definition at line 219 of file ImplementationTester.cc.

219  {
220 
221  bool canTest = true;
222  HDB::RFEntry* rfEntry = NULL;
223  try {
224  rfEntry = rfEntryFromHdb(entryID);
225  } catch (KeyNotFound& e) {
226  std::ostringstream errorStream;
227  errorStream << "ID " << entryID << " does not exist in HDB "
228  << hdbFile_;
229  reason = errorStream.str();
230  return false;
231  }
232  if (!rfEntry->hasArchitecture()) {
233  reason = "RF entry does not have architecture";
234  canTest = false;
235  } else if (!rfEntry->hasImplementation()) {
236  reason = "RF entry does not have implementation";
237  canTest = false;
238  } else if (rfEntry->architecture().readPortCount() == 0) {
239  reason = "RF does not have a read port";
240  canTest = false;
241  } else if (rfEntry->architecture().writePortCount() == 0) {
242  reason = "RF does not have a write port";
243  canTest = false;
244  } else if (rfEntry->architecture().bidirPortCount() != 0) {
245  reason = "RF has bidirectional ports";
246  canTest = false;
247  } else if (rfEntry->architecture().latency() != 1) {
248  reason = "RF does not have latency of 1 cycle";
249  canTest = false;
250  }
251  delete rfEntry;
252  return canTest;
253 }

References HDB::RFEntry::architecture(), HDB::RFArchitecture::bidirPortCount(), HDB::RFEntry::hasArchitecture(), HDB::RFEntry::hasImplementation(), hdbFile_, HDB::RFArchitecture::latency(), HDB::RFArchitecture::readPortCount(), rfEntryFromHdb(), and HDB::RFArchitecture::writePortCount().

Referenced by HDBTester::testRF(), and validateRF().

Here is the call graph for this function:

◆ createListOfSimulationFiles()

void ImplementationTester::createListOfSimulationFiles ( const HDB::HWBlockImplementation impl,
std::vector< std::string > &  files 
) const
private

Creates a list of HDL files of a FU/RF implementation

Parameters
implFU/RF implementation
filesVector containing the HDL files

Definition at line 510 of file ImplementationTester.cc.

512  {
513 
514  for (int i = 0; i < impl->implementationFileCount(); i++) {
515  string fullPath = "";
516  string filename = impl->file(i).pathToFile();
517  if (FileSystem::isAbsolutePath(filename)) {
518  fullPath = filename;
519  } else {
520  string hdbPath = FileSystem::directoryOfPath(hdbFile_);
521  fullPath = hdbPath + FileSystem::DIRECTORY_SEPARATOR + filename;
522  }
523  files.push_back(fullPath);
524  }
525 }

References FileSystem::DIRECTORY_SEPARATOR, FileSystem::directoryOfPath(), HDB::HWBlockImplementation::file(), hdbFile_, HDB::HWBlockImplementation::implementationFileCount(), FileSystem::isAbsolutePath(), and HDB::BlockImplementationFile::pathToFile().

Referenced by simulateTestbench().

Here is the call graph for this function:

◆ createTempDir()

bool ImplementationTester::createTempDir ( )
private

Definition at line 453 of file ImplementationTester.cc.

453  {
454 
456  return !tempDir_.empty();
457 }

References FileSystem::createTempDirectory(), and tempDir_.

Referenced by validateFU(), and validateRF().

Here is the call graph for this function:

◆ createTestbench()

void ImplementationTester::createTestbench ( TestbenchGenerator tbGen,
std::string  tbName 
) const
private

Definition at line 566 of file ImplementationTester.cc.

567  {
568 
569  ofstream fileStream;
570  openTbFile(fileStream, tbName);
571  tbGen->generateTestbench(fileStream);
572  fileStream.close();
573 }

References TestbenchGenerator::generateTestbench(), and openTbFile().

Referenced by validateFU(), and validateRF().

Here is the call graph for this function:

◆ fuEntryFromHdb()

HDB::FUEntry * ImplementationTester::fuEntryFromHdb ( int  entryID) const
private

Definition at line 427 of file ImplementationTester.cc.

427  {
428 
429  if (!hdb_) {
430  InvalidData e(
431  __FILE__, __LINE__, "ImplementationTester",
432  "HDB is not defined");
433  throw e;
434  }
435  return hdb_->fuByEntryID(entryID);
436 }

References HDB::HDBManager::fuByEntryID(), and hdb_.

Referenced by canTestFU(), and validateFU().

Here is the call graph for this function:

◆ fuEntryIDs()

std::set< int > ImplementationTester::fuEntryIDs ( ) const

Definition at line 369 of file ImplementationTester.cc.

369  {
370 
371  if (!hdb_) {
372  InvalidData e(
373  __FILE__, __LINE__, "ImplementationTester",
374  "HDB is not defined");
375  throw e;
376  }
377  return hdb_->fuEntryIDs();
378 }

References HDB::HDBManager::fuEntryIDs(), and hdb_.

Referenced by HDBTester::testAllEntries().

Here is the call graph for this function:

◆ fuFullyPipelined()

bool ImplementationTester::fuFullyPipelined ( HDB::FUEntry fuEntry) const
private

Definition at line 403 of file ImplementationTester.cc.

403  {
404 
405  HDB::FUArchitecture arch = fuEntry->architecture();
406  return arch.architecture().pipelineElementCount() == 0;
407 }

References HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), and TTAMachine::FunctionUnit::pipelineElementCount().

Referenced by canTestFU().

Here is the call graph for this function:

◆ fuHasExternalPorts()

bool ImplementationTester::fuHasExternalPorts ( HDB::FUEntry fuEntry) const
private

Definition at line 411 of file ImplementationTester.cc.

411  {
412 
413  HDB::FUImplementation* fuImpl = &fuEntry->implementation();
414  return fuImpl->externalPortCount() != 0;
415 }

References HDB::FUImplementation::externalPortCount(), and HDB::FUEntry::implementation().

Referenced by canTestFU().

Here is the call graph for this function:

◆ fuHasMemoryAccess()

bool ImplementationTester::fuHasMemoryAccess ( HDB::FUEntry fuEntry) const
private

Definition at line 395 of file ImplementationTester.cc.

395  {
396 
397  HDB::FUArchitecture arch = fuEntry->architecture();
398  return arch.architecture().hasAddressSpace();
399 }

References HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), and TTAMachine::FunctionUnit::hasAddressSpace().

Referenced by canTestFU().

Here is the call graph for this function:

◆ fuHasOnePort()

bool ImplementationTester::fuHasOnePort ( HDB::FUEntry fuEntry) const
private

Definition at line 419 of file ImplementationTester.cc.

419  {
420 
421  HDB::FUImplementation* fuImpl = &fuEntry->implementation();
422  return fuImpl->architecturePortCount() == 1;
423 }

References HDB::FUImplementation::architecturePortCount(), and HDB::FUEntry::implementation().

Referenced by canTestFU().

Here is the call graph for this function:

◆ fuTbName()

std::string ImplementationTester::fuTbName ( int  id) const
private

Creates name for the testbench file

Parameters
idID number of the FU
Returns
testbench name

Definition at line 467 of file ImplementationTester.cc.

467  {
468 
469  std::ostringstream name;
471  << "tb_fu_" << id << ".vhdl";
472  return name.str();
473 }

References FileSystem::DIRECTORY_SEPARATOR, and tempDir_.

Referenced by validateFU().

◆ openHdb()

void ImplementationTester::openHdb ( std::string  hdbFile)

Tries to open hdb file

Parameters
hdbFileName of the hdb file

Definition at line 154 of file ImplementationTester.cc.

154  {
155 
156  try {
158  } catch (const Exception& e) {
159  InvalidData excep(
160  __FILE__, __LINE__, "ImplementationTester",
161  "Error while loading input data: " + e.errorMessage());
162  throw excep;
163  }
164  hdbFile_ = hdbFile;
165 }

References Exception::errorMessage(), hdb_, hdbFile_, and HDB::CachedHDBManager::instance().

Referenced by ImplementationTester().

Here is the call graph for this function:

◆ openTbFile()

void ImplementationTester::openTbFile ( std::ofstream &  fileStream,
std::string  fileName 
) const
private

Definition at line 492 of file ImplementationTester.cc.

493  {
494 
495  fileStream.open(fileName.c_str());
496  if (!fileStream) {
497  IOException(__FILE__, __LINE__, "ImplementationTester",
498  "Failed to open file " + fileName + " for writing!");
499  }
500 }

Referenced by createTestbench().

◆ rfEntryFromHdb()

HDB::RFEntry * ImplementationTester::rfEntryFromHdb ( int  entryID) const
private

Definition at line 440 of file ImplementationTester.cc.

440  {
441 
442  if (!hdb_) {
443  InvalidData e(
444  __FILE__, __LINE__, "ImplementationTester",
445  "HDB is not defined");
446  throw e;
447  }
448  return hdb_->rfByEntryID(entryID);
449 }

References hdb_, and HDB::HDBManager::rfByEntryID().

Referenced by canTestRF(), and validateRF().

Here is the call graph for this function:

◆ rfEntryIDs()

std::set< int > ImplementationTester::rfEntryIDs ( ) const

Definition at line 382 of file ImplementationTester.cc.

382  {
383 
384  if (!hdb_) {
385  InvalidData e(
386  __FILE__, __LINE__, "ImplementationTester",
387  "HDB is not defined");
388  throw e;
389  }
390  return hdb_->rfEntryIDs();
391 }

References hdb_, and HDB::HDBManager::rfEntryIDs().

Referenced by HDBTester::testAllEntries().

Here is the call graph for this function:

◆ rfTbName()

std::string ImplementationTester::rfTbName ( int  id) const
private

Creates name for the testbench file

Parameters
idID number of the RF
Returns
testbench name

Definition at line 482 of file ImplementationTester.cc.

482  {
483 
484  std::ostringstream name;
486  << "tb_rf_" << id << ".vhdl";
487  return name.str();
488 }

References FileSystem::DIRECTORY_SEPARATOR, and tempDir_.

Referenced by validateRF().

◆ setVhdlSimulator()

void ImplementationTester::setVhdlSimulator ( VhdlSim  simulator)

Set VHDL simulator to be used in simulation

Parameters
simulatorName of the HDL simulator to be used

Definition at line 143 of file ImplementationTester.cc.

143  {
144  simulator_ = simulator;
145 }

References simulator_.

◆ simulateTestbench()

bool ImplementationTester::simulateTestbench ( std::string  testbench,
const HDB::HWBlockImplementation implementation,
std::vector< std::string > &  errors 
) const
private

Compiles and simulates the testbech

Parameters
testbenchName of the testbench file
implementationImplementation of the FU/RF
errorsError messages from the compilation/simulation
Returns
True if compilation and simulation were successfull

Definition at line 536 of file ImplementationTester.cc.

539  {
540 
541  vector<string> hdlFiles;
543 
544  ImplementationSimulator* sim = NULL;
545  if (simulator_ == SIM_GHDL) {
546  sim = new GhdlSimulator(testbench, hdlFiles, verbose_, leaveDirty_);
547  } else if (simulator_ == SIM_MODELSIM) {
548  sim = new ModelsimSimulator(
549  testbench, hdlFiles, verbose_, leaveDirty_);
550  }
551 
552  if (!sim->compile(errors)) {
553  delete sim;
554  return false;
555  }
556 
557  bool success = true;
558  if (!sim->simulate(errors)) {
559  success = false;
560  }
561  delete sim;
562  return success;
563 }

References ImplementationSimulator::compile(), createListOfSimulationFiles(), implementation, leaveDirty_, SIM_GHDL, SIM_MODELSIM, ImplementationSimulator::simulate(), simulator_, and verbose_.

Referenced by validateFU(), and validateRF().

Here is the call graph for this function:

◆ validateFU()

bool ImplementationTester::validateFU ( const int  entryID,
std::vector< std::string > &  errors 
)

Validates that FU behaviour model and implementation are equal

Parameters
entryIDEntry ID of the FU
errorsError messages from the validation process
Returns
True if there were no errors

Definition at line 263 of file ImplementationTester.cc.

264  {
265 
266  if (tempDir_.empty()) {
267  if (!createTempDir()) {
268  IOException exp(__FILE__, __LINE__, "ImplementationTester",
269  "Couldn't create temp directory");
270  throw exp;
271  }
272  }
273 
274  string reason;
275  if (!canTestFU(entryID, reason)) {
276  InvalidData e(
277  __FILE__, __LINE__, "ImplementationTester",
278  "Cannot test FU: " + reason);
279  throw e;
280  }
281 
282  HDB::FUEntry* fuEntry = NULL;
283  try {
284  fuEntry = fuEntryFromHdb(entryID);
285  } catch (KeyNotFound& e) {
286  std::ostringstream errorStream;
287  errorStream << "ID " << entryID << " does not exist in HDB "
288  << hdbFile_;
289  string errorMsg = errorStream.str();
290  errors.push_back(errorMsg);
291  return false;
292  }
293 
294  FUTestbenchGenerator tbGen(fuEntry);
295 
296  ofstream fileStream;
297  string tbName = fuTbName(entryID);
298 
299  createTestbench(&tbGen, tbName);
300 
301  bool success =
302  simulateTestbench(tbName, &fuEntry->implementation(), errors);
303 
304  if (!leaveDirty_) {
306  }
307 
308  delete fuEntry;
309  return success;
310 }

References canTestFU(), createTempDir(), createTestbench(), fuEntryFromHdb(), fuTbName(), hdbFile_, HDB::FUEntry::implementation(), leaveDirty_, FileSystem::removeFileOrDirectory(), simulateTestbench(), and tempDir_.

Referenced by HDBTester::testFU().

Here is the call graph for this function:

◆ validateRF()

bool ImplementationTester::validateRF ( const int  entryID,
std::vector< std::string > &  errors 
)

Validates that RF behaviour model and implementation are equal

Parameters
entryIDEntry ID of the RF
errorsError messages from the validation process
Returns
True if there were no errors

Definition at line 321 of file ImplementationTester.cc.

322  {
323 
324  if (tempDir_.empty()) {
325  if (!createTempDir()) {
326  IOException exp(__FILE__, __LINE__, "ImplementationTester",
327  "Couldn't create temp directory");
328  throw exp;
329  }
330  }
331 
332  string reason;
333  if (!canTestRF(entryID, reason)) {
334  InvalidData e(
335  __FILE__, __LINE__, "ImplementationTester",
336  "Cannot test RF: " + reason);
337  throw e;
338  }
339 
340  HDB::RFEntry* rfEntry = NULL;
341  try {
342  rfEntry = rfEntryFromHdb(entryID);
343  } catch (KeyNotFound& e) {
344  std::ostringstream errorStream;
345  errorStream << "ID " << entryID << " does not exist in HDB "
346  << hdbFile_;
347  string errorMsg = errorStream.str();
348  errors.push_back(errorMsg);
349  return false;
350  }
351 
352  RFTestbenchGenerator tbGen(rfEntry);
353  string tbName = rfTbName(entryID);
354 
355  createTestbench(&tbGen, tbName);
356 
357  bool success =
358  simulateTestbench(tbName, &rfEntry->implementation(), errors);
359 
360  if (!leaveDirty_) {
362  }
363  delete rfEntry;
364  return success;
365 }

References canTestRF(), createTempDir(), createTestbench(), hdbFile_, HDB::RFEntry::implementation(), leaveDirty_, FileSystem::removeFileOrDirectory(), rfEntryFromHdb(), rfTbName(), simulateTestbench(), and tempDir_.

Referenced by HDBTester::testRF().

Here is the call graph for this function:

Member Data Documentation

◆ hdb_

HDB::HDBManager* ImplementationTester::hdb_
private

◆ hdbFile_

std::string ImplementationTester::hdbFile_
private

◆ leaveDirty_

bool ImplementationTester::leaveDirty_
private

◆ simulator_

VhdlSim ImplementationTester::simulator_
private

Definition at line 119 of file ImplementationTester.hh.

Referenced by setVhdlSimulator(), and simulateTestbench().

◆ tempDir_

std::string ImplementationTester::tempDir_
private

◆ verbose_

bool ImplementationTester::verbose_
private

Definition at line 120 of file ImplementationTester.hh.

Referenced by simulateTestbench().


The documentation for this class was generated from the following files:
HDB::FUArchitecture
Definition: FUArchitecture.hh:55
HDB::FUEntry
Definition: FUEntry.hh:49
ImplementationTester::canTestRF
bool canTestRF(const int entryID, std::string &reason)
Definition: ImplementationTester.cc:219
RFTestbenchGenerator
Definition: RFTestbenchGenerator.hh:51
HDB::HWBlockImplementation::file
BlockImplementationFile & file(int index) const
Definition: HWBlockImplementation.cc:267
ImplementationTester::openHdb
void openHdb(std::string hdbFile)
Definition: ImplementationTester.cc:154
FileSystem::removeFileOrDirectory
static bool removeFileOrDirectory(const std::string &path)
Definition: FileSystem.cc:493
FUTestbenchGenerator
Definition: FUTestbenchGenerator.hh:54
HDB::RFEntry::hasImplementation
virtual bool hasImplementation() const
Definition: RFEntry.cc:74
TTAMachine::FunctionUnit::hasAddressSpace
virtual bool hasAddressSpace() const
Definition: FunctionUnit.cc:608
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
HDB::RFArchitecture::latency
int latency() const
Definition: RFArchitecture.cc:497
ImplementationTester::simulator_
VhdlSim simulator_
Definition: ImplementationTester.hh:119
ImplementationTester::fuFullyPipelined
bool fuFullyPipelined(HDB::FUEntry *fuEntry) const
Definition: ImplementationTester.cc:403
ImplementationTester::tempDir_
std::string tempDir_
Definition: ImplementationTester.hh:123
ImplementationTester::fuTbName
std::string fuTbName(int id) const
Definition: ImplementationTester.cc:467
ImplementationSimulator::simulate
virtual bool simulate(std::vector< std::string > &errors)=0
HDB::RFEntry
Definition: RFEntry.hh:47
HDB::HWBlockImplementation::implementationFileCount
int implementationFileCount() const
Definition: HWBlockImplementation.cc:254
ModelsimSimulator
Definition: ModelsimSimulator.hh:40
HDB::FUArchitecture::architecture
TTAMachine::FunctionUnit & architecture() const
Definition: FUArchitecture.cc:131
ImplementationTester::createTestbench
void createTestbench(TestbenchGenerator *tbGen, std::string tbName) const
Definition: ImplementationTester.cc:566
ImplementationTester::canTestFU
bool canTestFU(const int entryID, std::string &reason)
Definition: ImplementationTester.cc:175
FileSystem::absolutePathOf
static std::string absolutePathOf(const std::string &pathName)
Definition: FileSystem.cc:303
HDB::RFEntry::architecture
RFArchitecture & architecture() const
Definition: RFEntry.cc:145
ImplementationTester::simulateTestbench
bool simulateTestbench(std::string testbench, const HDB::HWBlockImplementation *implementation, std::vector< std::string > &errors) const
Definition: ImplementationTester.cc:536
ImplementationTester::fuHasMemoryAccess
bool fuHasMemoryAccess(HDB::FUEntry *fuEntry) const
Definition: ImplementationTester.cc:395
HDB::FUEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: FUEntry.cc:117
InvalidData
Definition: Exception.hh:149
ImplementationTester::hdbFile_
std::string hdbFile_
Definition: ImplementationTester.hh:116
HDB::HDBManager::fuEntryIDs
std::set< RowID > fuEntryIDs() const
Definition: HDBManager.cc:2035
SIM_GHDL
@ SIM_GHDL
Definition: ImplementationTester.hh:48
HDB::FUEntry::architecture
FUArchitecture & architecture() const
Definition: FUEntry.cc:129
FileSystem::directoryOfPath
static std::string directoryOfPath(const std::string fileName)
Definition: FileSystem.cc:79
HDB::RFEntry::implementation
RFImplementation & implementation() const
Definition: RFEntry.cc:102
Exception
Definition: Exception.hh:54
HDB::BlockImplementationFile::pathToFile
std::string pathToFile() const
Definition: BlockImplementationFile.cc:61
ImplementationTester::leaveDirty_
bool leaveDirty_
Definition: ImplementationTester.hh:121
ImplementationTester::createTempDir
bool createTempDir()
Definition: ImplementationTester.cc:453
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
TTAMachine::FunctionUnit::pipelineElementCount
virtual int pipelineElementCount() const
Definition: FunctionUnit.cc:507
ImplementationTester::fuHasExternalPorts
bool fuHasExternalPorts(HDB::FUEntry *fuEntry) const
Definition: ImplementationTester.cc:411
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
HDB::HDBManager::rfEntryIDs
std::set< RowID > rfEntryIDs() const
Definition: HDBManager.cc:2067
HDB::FUImplementation
Definition: FUImplementation.hh:53
ImplementationTester::fuEntryFromHdb
HDB::FUEntry * fuEntryFromHdb(int entryID) const
Definition: ImplementationTester.cc:427
GhdlSimulator
Definition: GhdlSimulator.hh:40
ImplementationTester::hdb_
HDB::HDBManager * hdb_
Definition: ImplementationTester.hh:117
ImplementationTester::fuHasOnePort
bool fuHasOnePort(HDB::FUEntry *fuEntry) const
Definition: ImplementationTester.cc:419
HDB::FUImplementation::architecturePortCount
int architecturePortCount() const
Definition: FUImplementation.cc:326
HDB::RFArchitecture::readPortCount
int readPortCount() const
Definition: RFArchitecture.cc:372
ImplementationSimulator::compile
virtual bool compile(std::vector< std::string > &errors)=0
ImplementationSimulator
Definition: ImplementationSimulator.hh:39
KeyNotFound
Definition: Exception.hh:285
ImplementationTester::createListOfSimulationFiles
void createListOfSimulationFiles(const HDB::HWBlockImplementation *impl, std::vector< std::string > &files) const
Definition: ImplementationTester.cc:510
IOException
Definition: Exception.hh:130
SIM_MODELSIM
@ SIM_MODELSIM
Definition: ImplementationTester.hh:49
HDB::RFArchitecture::bidirPortCount
int bidirPortCount() const
Definition: RFArchitecture.cc:422
HDB::FUEntry::hasImplementation
virtual bool hasImplementation() const
Definition: FUEntry.cc:74
HDB::FUEntry::implementation
FUImplementation & implementation() const
Definition: FUEntry.cc:86
ImplementationTester::rfTbName
std::string rfTbName(int id) const
Definition: ImplementationTester.cc:482
TestbenchGenerator::generateTestbench
virtual void generateTestbench(std::ofstream &file)=0
FileSystem::isAbsolutePath
static bool isAbsolutePath(const std::string &pathName)
Definition: FileSystem.cc:234
HDB::HDBManager::fuByEntryID
FUEntry * fuByEntryID(RowID id) const
Definition: HDBManager.cc:2828
FileSystem::createTempDirectory
static std::string createTempDirectory(const std::string &path="/tmp", const std::string &tempDirPrefix="tmp_tce_")
Definition: FileSystem.cc:441
HDB::RFEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: RFEntry.cc:117
HDB::FUImplementation::externalPortCount
int externalPortCount() const
Definition: FUImplementation.cc:337
ImplementationTester::verbose_
bool verbose_
Definition: ImplementationTester.hh:120
HDB::RFArchitecture::writePortCount
int writePortCount() const
Definition: RFArchitecture.cc:397
ImplementationTester::openTbFile
void openTbFile(std::ofstream &fileStream, std::string fileName) const
Definition: ImplementationTester.cc:492
HDB::HDBManager::rfByEntryID
RFEntry * rfByEntryID(RowID id) const
Definition: HDBManager.cc:2885
HDB::CachedHDBManager::instance
static CachedHDBManager & instance(const std::string &hdbFile)
Definition: CachedHDBManager.cc:89
ImplementationTester::rfEntryFromHdb
HDB::RFEntry * rfEntryFromHdb(int entryID) const
Definition: ImplementationTester.cc:440