|
OpenASIP 2.2
|
#include <RFArchitecture.hh>


Public Member Functions | |
| RFArchitecture (int readPorts, int writePorts, int bidirPorts, int maxReads, int maxWrites, int latency, bool guardSupport, int guardLatency=0, bool zeroRegister=false) | |
| RFArchitecture (const TTAMachine::RegisterFile *rf) | |
| RFArchitecture (const TTAMachine::BaseRegisterFile *rf) | |
| RFArchitecture (const TTAMachine::ImmediateUnit *rf) | |
| virtual | ~RFArchitecture () |
| bool | hasParameterizedWidth () const |
| bool | hasParameterizedSize () const |
| void | setWidth (int width) |
| void | setSize (int size) |
| int | size () const |
| int | width () const |
| void | setReadPortCount (int portCount) |
| int | readPortCount () const |
| void | setWritePortCount (int portCount) |
| int | writePortCount () const |
| void | setBidirPortCount (int portCount) |
| int | bidirPortCount () const |
| void | setMaxReads (int maxReads) |
| int | maxReads () const |
| void | setMaxWrites (int maxWrites) |
| int | maxWrites () const |
| void | setLatency (int latency) |
| int | latency () const |
| void | setGuardSupport (bool supported) |
| bool | hasGuardSupport () const |
| void | setZeroRegister (bool zeroRegister) |
| bool | zeroRegister () const |
| int | guardLatency () const |
| bool | operator== (const RFArchitecture &rightHand) const |
Public Member Functions inherited from HWBlockArchitecture | |
| virtual | ~HWBlockArchitecture () |
| bool | hasID () const |
| void | setID (RowID id) |
| RowID | id () const |
Private Attributes | |
| int | readPorts_ |
| Number of read ports. | |
| int | writePorts_ |
| Number of write ports. | |
| int | bidirPorts_ |
| Number of bidir ports. | |
| int | maxReads_ |
| Maximum number of simultaneous reads. | |
| int | maxWrites_ |
| Maximum number of ports that can read a register in the same cycle in which another port writes the same register. | |
| int | latency_ |
| The latency. | |
| bool | guardSupport_ |
| The guard support. | |
| int | width_ |
| Width of the register file. | |
| int | size_ |
| Size of the register file. | |
| int | guardLatency_ |
| Guard latency. | |
| bool | zeroRegister_ |
| Zero register. | |
Additional Inherited Members | |
Protected Member Functions inherited from HWBlockArchitecture | |
| HWBlockArchitecture () | |
Represents the architecture of an RF in HDB.
Definition at line 50 of file RFArchitecture.hh.
| HDB::RFArchitecture::RFArchitecture | ( | int | readPorts, |
| int | writePorts, | ||
| int | bidirPorts, | ||
| int | maxReads, | ||
| int | maxWrites, | ||
| int | latency, | ||
| bool | guardSupport, | ||
| int | guardLatency = 0, |
||
| bool | zeroRegister = false |
||
| ) |
The constructor.
Creates an architecture that has parameterized width and size. To set fixed size or width, use setWidth or setSize method.
| readPorts | The number of read ports. |
| writePorts | The number of write ports. |
| bidirPorts | The number of bidirectional ports. |
| maxReads | The maximum number of simultaneous reads. |
| maxWrites | The maximum number of simultaneous writes. |
| latency | Latency of the register file. |
| guardSupport | Tells whether the RF architecture supports guards. |
| guardLatency | Latency between writing a register and updating the value of guard port. |
| zeroRegister | Tells whether RF architecture has a zero register. |
| OutOfRange | If some of the arguments is out of range. |
Definition at line 63 of file RFArchitecture.cc.
References guardLatency(), latency(), maxReads(), and maxWrites().

| HDB::RFArchitecture::RFArchitecture | ( | const TTAMachine::RegisterFile * | rf | ) |
Builds RFArchitecture from RegisterFile*.
| rf | RegisterFile*. |
Definition at line 90 of file RFArchitecture.cc.
References bidirPorts_, TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::RegisterFile::guardLatency(), guardLatency_, guardSupport_, TTAMachine::Port::inputSocket(), TTAMachine::Component::isRegistered(), TTAMachine::Machine::Navigator< ComponentType >::item(), latency_, TTAMachine::Component::machine(), TTAMachine::RegisterFile::maxReads(), maxReads_, TTAMachine::RegisterFile::maxWrites(), maxWrites_, TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), readPorts_, TTAMachine::RegisterGuard::registerFile(), size_, TTAMachine::BaseRegisterFile::width(), width_, and writePorts_.

| HDB::RFArchitecture::RFArchitecture | ( | const TTAMachine::BaseRegisterFile * | baseRF | ) |
Builds RFArchitecture from BaseRegisterFile*.
| baseRF | BaseRegisterfile*. |
Definition at line 177 of file RFArchitecture.cc.
References bidirPorts_, TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::RegisterFile::guardLatency(), guardLatency_, guardSupport_, TTAMachine::Port::inputSocket(), TTAMachine::Component::isRegistered(), TTAMachine::Machine::Navigator< ComponentType >::item(), latency_, TTAMachine::Component::machine(), TTAMachine::RegisterFile::maxReads(), maxReads_, TTAMachine::RegisterFile::maxWrites(), maxWrites_, TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), readPorts_, TTAMachine::RegisterGuard::registerFile(), size_, TTAMachine::BaseRegisterFile::width(), width_, and writePorts_.

| HDB::RFArchitecture::RFArchitecture | ( | const TTAMachine::ImmediateUnit * | imm | ) |
Builds RFArchitecture from ImmediateUnit*.
| imm | ImmediateUnit*. |
Definition at line 142 of file RFArchitecture.cc.
References bidirPorts_, guardLatency_, guardSupport_, TTAMachine::Port::inputSocket(), latency_, maxReads_, maxWrites_, TTAMachine::BaseRegisterFile::numberOfRegisters(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), readPorts_, size_, TTAMachine::BaseRegisterFile::width(), width_, and writePorts_.

|
virtual |
| int HDB::RFArchitecture::bidirPortCount | ( | ) | const |
Returns the number of bidirectional ports.
Definition at line 422 of file RFArchitecture.cc.
References bidirPorts_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), ImplementationTester::canTestRF(), InterpolatingRFEstimator::createSearch(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddRFFromHDBDialog::onAdd(), operator==(), and HDBToHtml::rfArchToHtml().
| int HDB::RFArchitecture::guardLatency | ( | ) | const |
Returns the guard latency.
Definition at line 551 of file RFArchitecture.cc.
References guardLatency_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), RFTestbenchGenerator::createMachineState(), InterpolatingRFEstimator::createSearch(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), operator==(), RFArchitecture(), and HDBToHtml::rfArchToHtml().
| bool HDB::RFArchitecture::hasGuardSupport | ( | ) | const |
Tells whether the RF supports guards.
Definition at line 519 of file RFArchitecture.cc.
References guardSupport_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), InterpolatingRFEstimator::createSearch(), operator==(), and HDBToHtml::rfArchToHtml().
| bool HDB::RFArchitecture::hasParameterizedSize | ( | ) | const |
Tells whether the RF has parameterized size.
Definition at line 282 of file RFArchitecture.cc.
References size_.
Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), BlockImplementationDialog::onHDBSelection(), operator==(), HDBToHtml::rfArchToHtml(), and size().
| bool HDB::RFArchitecture::hasParameterizedWidth | ( | ) | const |
Tells whether the RF has parameterized width.
Definition at line 271 of file RFArchitecture.cc.
References width_.
Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), BlockImplementationDialog::onHDBSelection(), operator==(), HDBToHtml::rfArchToHtml(), and width().
| int HDB::RFArchitecture::latency | ( | ) | const |
Returns the latency of the register file.
Definition at line 497 of file RFArchitecture.cc.
References latency_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), ImplementationTester::canTestRF(), ProGe::ProcessorGenerator::checkIULatencies(), InterpolatingRFEstimator::createSearch(), RFTestbenchGenerator::createStimulus(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), operator==(), RFArchitecture(), HDBToHtml::rfArchToHtml(), and setLatency().
| int HDB::RFArchitecture::maxReads | ( | ) | const |
Returns the maximum number of simultaneous reads.
Definition at line 447 of file RFArchitecture.cc.
References maxReads_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), RFTestbenchGenerator::createMachineState(), InterpolatingRFEstimator::createSearch(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), operator==(), RFArchitecture(), HDBToHtml::rfArchToHtml(), and setMaxReads().
| int HDB::RFArchitecture::maxWrites | ( | ) | const |
Returns the maximum number of simultaneous writes.
Definition at line 472 of file RFArchitecture.cc.
References maxWrites_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), RFTestbenchGenerator::createMachineState(), InterpolatingRFEstimator::createSearch(), AddRFFromHDBDialog::loadHDB(), AddRFFromHDBDialog::onAdd(), operator==(), RFArchitecture(), HDBToHtml::rfArchToHtml(), and setMaxWrites().
| bool HDB::RFArchitecture::operator== | ( | const RFArchitecture & | rightHand | ) | const |
Checks whether the given RF has a mathing architecture with the given RF architecture instance.
| rightHand | Right hand operand. |
Definition at line 564 of file RFArchitecture.cc.
References bidirPortCount(), guardLatency(), hasGuardSupport(), hasParameterizedSize(), hasParameterizedWidth(), latency(), maxReads(), maxWrites(), readPortCount(), size(), width(), and writePortCount().

| int HDB::RFArchitecture::readPortCount | ( | ) | const |
Returns the number of read ports.
Definition at line 372 of file RFArchitecture.cc.
References readPorts_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), ImplementationTester::canTestRF(), InterpolatingRFEstimator::createSearch(), RFTestbenchGenerator::createStimulus(), RFTestbenchGenerator::createTbCode(), RFTestbenchGenerator::createTbInstantiation(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), operator==(), and HDBToHtml::rfArchToHtml().
| void HDB::RFArchitecture::setBidirPortCount | ( | int | portCount | ) |
Sets the number of bidirectional ports.
| portCount | The number of bidirectional ports. |
| OutOfRange | If the given port count is negative. |
Definition at line 409 of file RFArchitecture.cc.
References __func__, and bidirPorts_.
Referenced by RFArchitectureDialog::onOK().
| void HDB::RFArchitecture::setGuardSupport | ( | bool | supported | ) |
Sets the guard support of the register file.
| supported | True if supported, otherwise false. |
Definition at line 508 of file RFArchitecture.cc.
References guardSupport_.
Referenced by RFArchitectureDialog::onOK().
| void HDB::RFArchitecture::setLatency | ( | int | latency | ) |
Sets the latency of the register file.
| latency | The new latency. |
| OutOfRange | If the given latency is smaller than 1. |
Definition at line 484 of file RFArchitecture.cc.
References __func__, latency(), and latency_.
Referenced by RFArchitectureDialog::onOK().

| void HDB::RFArchitecture::setMaxReads | ( | int | maxReads | ) |
Sets the maximum number of simultaneous reads.
| maxReads | The new value. |
| OutOfRange | If the given value is negative. |
Definition at line 434 of file RFArchitecture.cc.
References __func__, maxReads(), and maxReads_.
Referenced by RFArchitectureDialog::onOK().

| void HDB::RFArchitecture::setMaxWrites | ( | int | maxWrites | ) |
Sets the maximum number of simultaneous writes.
| maxWrites | The new value. |
| OutOfRange | If the given value is negative. |
Definition at line 459 of file RFArchitecture.cc.
References __func__, maxWrites(), and maxWrites_.
Referenced by RFArchitectureDialog::onOK().

| void HDB::RFArchitecture::setReadPortCount | ( | int | portCount | ) |
Sets the number of read ports.
| portCount | The number of read ports. |
| OutOfRange | If the given port count is negative. |
Definition at line 359 of file RFArchitecture.cc.
References __func__, and readPorts_.
Referenced by RFArchitectureDialog::onOK().
| void HDB::RFArchitecture::setSize | ( | int | size | ) |
Sets the size of the register file.
| size | The new size. |
| OutOfRange | If the size is less than 1. |
Definition at line 310 of file RFArchitecture.cc.
Referenced by RFTestbenchGenerator::createMachineState(), RFArchitectureDialog::onOK(), and HDB::HDBManager::rfArchitectureByID().

| void HDB::RFArchitecture::setWidth | ( | int | width | ) |
Sets the width of the register file.
| width | The new width. |
| OutOfRange | If the width is less than 1. |
Definition at line 294 of file RFArchitecture.cc.
References width(), and width_.
Referenced by RFTestbenchGenerator::createMachineState(), RFArchitectureDialog::onOK(), and HDB::HDBManager::rfArchitectureByID().

| void HDB::RFArchitecture::setWritePortCount | ( | int | portCount | ) |
Sets the number of write ports.
| portCount | The number of write ports. |
| OutOfRange | If the given port count is smaller than 1. |
Definition at line 384 of file RFArchitecture.cc.
References __func__, and writePorts_.
Referenced by RFArchitectureDialog::onOK().
| void HDB::RFArchitecture::setZeroRegister | ( | bool | zeroRegister | ) |
Sets the zero register flag of the register file
| zeroRegister | True if has a zero register, otherwise false |
Definition at line 530 of file RFArchitecture.cc.
References zeroRegister(), and zeroRegister_.
Referenced by RFArchitectureDialog::onOK().

| int HDB::RFArchitecture::size | ( | ) | const |
Returns the size of the register file.
| NotAvailable | If the size is parameterized. |
Definition at line 326 of file RFArchitecture.cc.
References hasParameterizedSize(), and size_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), RFTestbenchGenerator::createMachineState(), InterpolatingRFEstimator::createSearch(), RFTestbenchGenerator::createStimulus(), RFTestbenchGenerator::createTbInstantiation(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), RFTestbenchGenerator::opcodePortWidth(), operator==(), HDBToHtml::rfArchToHtml(), and setSize().

| int HDB::RFArchitecture::width | ( | ) | const |
Returns the width of the register file.
| NotAvailable | If the width of the register file is parameterized. |
Definition at line 343 of file RFArchitecture.cc.
References hasParameterizedWidth(), and width_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), RFTestbenchGenerator::createMachineState(), InterpolatingRFEstimator::createSearch(), RFTestbenchGenerator::createStimulus(), RFTestbenchGenerator::createStimulusArrays(), RFTestbenchGenerator::createTbInstantiation(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), operator==(), HDBToHtml::rfArchToHtml(), and setWidth().

| int HDB::RFArchitecture::writePortCount | ( | ) | const |
Returns the number of write ports.
Definition at line 397 of file RFArchitecture.cc.
References writePorts_.
Referenced by HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), ImplementationTester::canTestRF(), InterpolatingRFEstimator::createSearch(), RFTestbenchGenerator::createStimulus(), RFTestbenchGenerator::createTbCode(), RFTestbenchGenerator::createTbInstantiation(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddRFFromHDBDialog::onAdd(), operator==(), and HDBToHtml::rfArchToHtml().
| bool HDB::RFArchitecture::zeroRegister | ( | ) | const |
Tells whether the RF has a zero register
Definition at line 541 of file RFArchitecture.cc.
References zeroRegister_.
Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::onAdd(), HDBToHtml::rfArchToHtml(), and setZeroRegister().
|
private |
Number of bidir ports.
Definition at line 104 of file RFArchitecture.hh.
Referenced by bidirPortCount(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setBidirPortCount().
|
private |
Guard latency.
Definition at line 119 of file RFArchitecture.hh.
Referenced by guardLatency(), RFArchitecture(), RFArchitecture(), and RFArchitecture().
|
private |
The guard support.
Definition at line 113 of file RFArchitecture.hh.
Referenced by hasGuardSupport(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setGuardSupport().
|
private |
The latency.
Definition at line 111 of file RFArchitecture.hh.
Referenced by latency(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setLatency().
|
private |
Maximum number of simultaneous reads.
Definition at line 106 of file RFArchitecture.hh.
Referenced by maxReads(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setMaxReads().
|
private |
Maximum number of ports that can read a register in the same cycle in which another port writes the same register.
Definition at line 109 of file RFArchitecture.hh.
Referenced by maxWrites(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setMaxWrites().
|
private |
Number of read ports.
Definition at line 100 of file RFArchitecture.hh.
Referenced by readPortCount(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setReadPortCount().
|
private |
Size of the register file.
Definition at line 117 of file RFArchitecture.hh.
Referenced by hasParameterizedSize(), RFArchitecture(), RFArchitecture(), RFArchitecture(), setSize(), and size().
|
private |
Width of the register file.
Definition at line 115 of file RFArchitecture.hh.
Referenced by hasParameterizedWidth(), RFArchitecture(), RFArchitecture(), RFArchitecture(), setWidth(), and width().
|
private |
Number of write ports.
Definition at line 102 of file RFArchitecture.hh.
Referenced by RFArchitecture(), RFArchitecture(), RFArchitecture(), setWritePortCount(), and writePortCount().
|
private |
Zero register.
Definition at line 121 of file RFArchitecture.hh.
Referenced by setZeroRegister(), and zeroRegister().