OpenASIP
2.0
|
#include <FUArchitecture.hh>
Classes | |
struct | PipelineElementUsage |
Struct PipelineElementUsage. More... | |
Public Member Functions | |
FUArchitecture (TTAMachine::FunctionUnit *fu) | |
FUArchitecture (const FUArchitecture &o) | |
virtual | ~FUArchitecture () |
bool | hasParameterizedWidth (const std::string &port) const |
void | setParameterizedWidth (const std::string &port) |
bool | hasGuardSupport (const std::string &port) const |
void | setGuardSupport (const std::string &port) |
TTAMachine::FunctionUnit & | architecture () const |
HDB::Direction | portDirection (const std::string &port) const |
bool | operator== (const FUArchitecture &rightHand) const |
Public Member Functions inherited from HWBlockArchitecture | |
virtual | ~HWBlockArchitecture () |
bool | hasID () const |
void | setID (RowID id) |
RowID | id () const |
Private Types | |
typedef std::vector< PipelineElementUsage > | PipelineElementUsageTable |
typedef for PipelineElemetnUsageTable More... | |
typedef std::set< std::string > | PortSet |
Set type for port names. More... | |
Private Attributes | |
TTAMachine::FunctionUnit * | fu_ |
The function unit. More... | |
PortSet | parameterizedPorts_ |
Parameterized ports. More... | |
PortSet | guardedPorts_ |
Port that support guard. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from HWBlockArchitecture | |
HWBlockArchitecture () | |
Represents architecture of an FU in HDB.
Definition at line 55 of file FUArchitecture.hh.
|
private |
typedef for PipelineElemetnUsageTable
Definition at line 78 of file FUArchitecture.hh.
|
private |
Set type for port names.
Definition at line 81 of file FUArchitecture.hh.
HDB::FUArchitecture::FUArchitecture | ( | TTAMachine::FunctionUnit * | fu | ) |
The constructor.
fu | The function unit of which architecture is represented. Becomes property of the FUArchitecture object. |
Definition at line 55 of file FUArchitecture.cc.
HDB::FUArchitecture::FUArchitecture | ( | const FUArchitecture & | original | ) |
Copy constructor.
original | FUArchitecture to copy. |
Definition at line 63 of file FUArchitecture.cc.
References TTAMachine::FunctionUnit::copy(), fu_, guardedPorts_, and parameterizedPorts_.
|
virtual |
TTAMachine::FunctionUnit & HDB::FUArchitecture::architecture | ( | ) | const |
Returns the FunctionUnit instance that represents the architecture.
Definition at line 131 of file FUArchitecture.cc.
References fu_.
Referenced by AddFUFromHDBDialog::acceptToList(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), ProGe::NetlistGenerator::addFUToNetlist(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), CostDatabase::buildFunctionUnits(), FUTestbenchGenerator::createMachineState(), FUTestbenchGenerator::createStimulus(), FUTestbenchGenerator::createStimulusArrays(), FUTestbenchGenerator::createTbCode(), FUTestbenchGenerator::createTbInstantiation(), AddFUImplementationCmd::Do(), HDBEditorModifyCmd::Do(), ComponentImplementationSelector::fuArchsByOpSetWithMinLatency(), HDBToHtml::fuArchToHtml(), ImplementationTester::fuFullyPipelined(), ImplementationTester::fuHasMemoryAccess(), HDB::HDBManager::isMatchingArchitecture(), AddFUFromHDBDialog::loadHDB(), AddFUFromHDBDialog::onAdd(), FUArchitectureDialog::onOK(), ProGe::NetlistGenerator::opcodePortWidth(), operator==(), FUTestbenchGenerator::parseFuPorts(), portDirection(), FUTestbenchGenerator::readValuesFromOutPorts(), HDB::HDBManager::resolveArchitecturePort(), FUArchitectureDialog::update(), HDBBrowserWindow::update(), and FUTestbenchGenerator::writeInputPortStimulus().
bool HDB::FUArchitecture::hasGuardSupport | ( | const std::string & | port | ) | const |
Tells whether the given port is guarded.
port | Name of the port. |
Definition at line 109 of file FUArchitecture.cc.
References AssocTools::containsKey(), and guardedPorts_.
Referenced by HDB::HDBManager::addFUArchitecture(), HDBToHtml::fuArchToHtml(), and FUArchitectureDialog::update().
bool HDB::FUArchitecture::hasParameterizedWidth | ( | const std::string & | port | ) | const |
Tells whether the given port has parameterized width.
port | Name of the port. |
Definition at line 86 of file FUArchitecture.cc.
References AssocTools::containsKey(), and parameterizedPorts_.
Referenced by HDB::HDBManager::addFUArchitecture(), CostDatabase::buildFunctionUnits(), HDBToHtml::fuArchToHtml(), HDB::HDBManager::isMatchingArchitecture(), ProGe::NetlistGenerator::isParameterizable(), BlockImplementationDialog::onHDBSelection(), operator==(), and FUArchitectureDialog::update().
bool HDB::FUArchitecture::operator== | ( | const FUArchitecture & | rightHand | ) | const |
Checks whether the given FU has a mathing architecture with the given FU architecture instance.
rightHand | Right hand operand. |
Definition at line 196 of file FUArchitecture.cc.
References architecture(), AssocTools::difference(), hasParameterizedWidth(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), TTAMachine::FUPort::isOpcodeSetting(), TTAMachine::ExecutionPipeline::isResourceUsed(), TTAMachine::FUPort::isTriggering(), TTAMachine::HWOperation::latency(), TTAMachine::PipelineElement::name(), TTAMachine::HWOperation::name(), TTAMachine::Port::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::HWOperation::pipeline(), TTAMachine::FunctionUnit::pipelineElement(), TTAMachine::FunctionUnit::pipelineElementCount(), TTAMachine::HWOperation::port(), TTAMachine::ExecutionPipeline::readOperands(), HDB::FUArchitecture::PipelineElementUsage::usage1, HDB::FUArchitecture::PipelineElementUsage::usage2, TTAMachine::BaseFUPort::width(), and TTAMachine::ExecutionPipeline::writtenOperands().
HDB::Direction HDB::FUArchitecture::portDirection | ( | const std::string & | portName | ) | const |
Tells the direction of the given port.
portName | Name of the port in the FU architecture. |
InstanceNotFound | If the FU architecture does not have the given port. |
InvalidData | If the given port is not used by any pipeline. |
Definition at line 145 of file FUArchitecture.cc.
References __func__, architecture(), HDB::BIDIR, TTAMachine::FunctionUnit::hasOperationPort(), HDB::IN, TTAMachine::ExecutionPipeline::isPortRead(), TTAMachine::ExecutionPipeline::isPortWritten(), TTAMachine::HWOperation::latency(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), HDB::OUT, and TTAMachine::HWOperation::pipeline().
Referenced by ProGe::NetlistGenerator::addFUToNetlist().
void HDB::FUArchitecture::setGuardSupport | ( | const std::string & | port | ) |
Sets guard support for the given port.
port | Name of the port. |
Definition at line 120 of file FUArchitecture.cc.
References guardedPorts_.
Referenced by HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), and FUArchitectureDialog::onOK().
void HDB::FUArchitecture::setParameterizedWidth | ( | const std::string & | port | ) |
Sets parameterized width for the given port.
port | Name of the port. |
Definition at line 97 of file FUArchitecture.cc.
References parameterizedPorts_.
Referenced by HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), and FUArchitectureDialog::onOK().
|
private |
The function unit.
Definition at line 84 of file FUArchitecture.hh.
Referenced by architecture(), FUArchitecture(), and ~FUArchitecture().
|
private |
Port that support guard.
Definition at line 88 of file FUArchitecture.hh.
Referenced by FUArchitecture(), hasGuardSupport(), and setGuardSupport().
|
private |
Parameterized ports.
Definition at line 86 of file FUArchitecture.hh.
Referenced by FUArchitecture(), hasParameterizedWidth(), and setParameterizedWidth().