OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
HDB::RFArchitecture Class Reference

#include <RFArchitecture.hh>

Inheritance diagram for HDB::RFArchitecture:
Inheritance graph
Collaboration diagram for HDB::RFArchitecture:
Collaboration graph

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 ()
 

Detailed Description

Represents the architecture of an RF in HDB.

Definition at line 50 of file RFArchitecture.hh.

Constructor & Destructor Documentation

◆ RFArchitecture() [1/4]

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.

Parameters
readPortsThe number of read ports.
writePortsThe number of write ports.
bidirPortsThe number of bidirectional ports.
maxReadsThe maximum number of simultaneous reads.
maxWritesThe maximum number of simultaneous writes.
latencyLatency of the register file.
guardSupportTells whether the RF architecture supports guards.
guardLatencyLatency between writing a register and updating the value of guard port.
zeroRegisterTells whether RF architecture has a zero register.
Exceptions
OutOfRangeIf some of the arguments is out of range.

Definition at line 63 of file RFArchitecture.cc.

67 : readPorts_(readPorts),
68 writePorts_(writePorts),
69 bidirPorts_(bidirPorts),
73 guardSupport_(guardSupport),
74 width_(0),
75 size_(0),
78 if (readPorts < 0 || writePorts < 0 || bidirPorts < 0 || maxReads < 0 ||
79 maxWrites < 0 || latency < 0 || guardLatency < 0) {
80 const string procName = "RFArchitecture::RFArchitecture";
81 throw OutOfRange(__FILE__, __LINE__, procName);
82 }
83}
int bidirPorts_
Number of bidir ports.
int maxWrites_
Maximum number of ports that can read a register in the same cycle in which another port writes the s...
int writePorts_
Number of write ports.
bool zeroRegister() const
int size_
Size of the register file.
int width_
Width of the register file.
int guardLatency_
Guard latency.
bool guardSupport_
The guard support.
int readPorts_
Number of read ports.
bool zeroRegister_
Zero register.
int maxReads_
Maximum number of simultaneous reads.
int latency_
The latency.

References guardLatency(), latency(), maxReads(), and maxWrites().

Here is the call graph for this function:

◆ RFArchitecture() [2/4]

HDB::RFArchitecture::RFArchitecture ( const TTAMachine::RegisterFile rf)

Builds RFArchitecture from RegisterFile*.

Parameters
rfRegisterFile*.

Definition at line 90 of file RFArchitecture.cc.

90 {
91
92 int readPorts = 0;
93 int writePorts = 0;
94 int bidirPorts = 0;
95 for (int i = 0; i < rf->portCount(); i++) {
96 TTAMachine::Socket* input = rf->port(i)->inputSocket();
97 TTAMachine::Socket* output = rf->port(i)->outputSocket();
98 if (input != NULL && output != NULL) {
99 bidirPorts++;
100 } else if (input != NULL) {
101 readPorts++;
102 } else if (output != NULL) {
103 writePorts++;
104 }
105 }
106
107 bool guardSupport = false;
108 if (rf->isRegistered()) {
110 rf->machine()->busNavigator();
111 for (int i = 0; i < navigator.count(); i++) {
112 TTAMachine::Bus* bus = navigator.item(i);
113 for (int n = 0; n < bus->guardCount(); n++) {
114 TTAMachine::Guard* guard = bus->guard(n);
115 TTAMachine::RegisterGuard* registerGuard =
116 dynamic_cast<TTAMachine::RegisterGuard*>(guard);
117 if (registerGuard != NULL) {
118 if (registerGuard->registerFile() == rf) {
119 guardSupport = true;
120 }
121 }
122 }
123 }
124 }
125 readPorts_ = readPorts;
126 writePorts_ = writePorts;
127 bidirPorts_ = bidirPorts;
128 maxReads_ = rf->maxReads();
129 maxWrites_ = rf->maxWrites();
130 latency_ = 1;
131 guardSupport_ = guardSupport;
132 width_ = rf->width();
133 size_ = rf->numberOfRegisters();
135}
virtual int numberOfRegisters() const
virtual int width() const
virtual RFPort * port(const std::string &name) const
Guard * guard(int index) const
Definition Bus.cc:456
int guardCount() const
Definition Bus.cc:441
virtual Machine * machine() const
virtual bool isRegistered() const
ComponentType * item(int index) const
virtual BusNavigator busNavigator() const
Definition Machine.cc:356
virtual Socket * outputSocket() const
Definition Port.cc:281
virtual Socket * inputSocket() const
Definition Port.cc:261
virtual int maxReads() const
virtual int guardLatency() const
virtual int maxWrites() const
const RegisterFile * registerFile() const
virtual int portCount() const
Definition Unit.cc:135

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_.

Here is the call graph for this function:

◆ RFArchitecture() [3/4]

HDB::RFArchitecture::RFArchitecture ( const TTAMachine::BaseRegisterFile baseRF)

Builds RFArchitecture from BaseRegisterFile*.

Parameters
baseRFBaseRegisterfile*.

Definition at line 177 of file RFArchitecture.cc.

177 {
178
179 const TTAMachine::ImmediateUnit* imm =
180 dynamic_cast<const TTAMachine::ImmediateUnit*>(baseRF);
181 const TTAMachine::RegisterFile* rf =
182 dynamic_cast<const TTAMachine::RegisterFile*>(baseRF);
183 if (imm != NULL) {
184 int readPorts = 0;
185 int writePorts = 0;
186 int bidirPorts = 0;
187 for (int i = 0; i < imm->portCount(); i++) {
188 TTAMachine::Socket* input = imm->port(i)->inputSocket();
189 TTAMachine::Socket* output = imm->port(i)->outputSocket();
190 if (input != NULL && output != NULL) {
191 bidirPorts++;
192 } else if (input != NULL) {
193 readPorts++;
194 } else if (output != NULL) {
195 writePorts++;
196 }
197 }
198
199 // immediate unit has no MaxReadWrite, no MaxReads and no guard support
200 readPorts_ = readPorts;
201 writePorts_ = writePorts;
202 bidirPorts_ = bidirPorts;
203 maxReads_ = 0;
204 maxWrites_ = 0;
205 latency_ = 1;
206 guardSupport_ = false;
207 width_ = imm->width();
208 size_ = imm->numberOfRegisters();
209 guardLatency_ = 0;
210 }
211 if (rf != NULL) {
212 int readPorts = 0;
213 int writePorts = 0;
214 int bidirPorts = 0;
215 for (int i = 0; i < rf->portCount(); i++) {
216 TTAMachine::Socket* input = rf->port(i)->inputSocket();
217 TTAMachine::Socket* output = rf->port(i)->outputSocket();
218 if (input != NULL && output != NULL) {
219 bidirPorts++;
220 } else if (input != NULL) {
221 readPorts++;
222 } else if (output != NULL) {
223 writePorts++;
224 }
225 }
226
227 bool guardSupport = false;
228 if (rf->isRegistered()) {
230 rf->machine()->busNavigator();
231 for (int i = 0; i < navigator.count(); i++) {
232 TTAMachine::Bus* bus = navigator.item(i);
233 for (int n = 0; n < bus->guardCount(); n++) {
234 TTAMachine::Guard* guard = bus->guard(n);
235 TTAMachine::RegisterGuard* registerGuard =
236 dynamic_cast<TTAMachine::RegisterGuard*>(guard);
237 if (registerGuard != NULL) {
238 if (registerGuard->registerFile() == rf) {
239 guardSupport = true;
240 }
241 }
242 }
243 }
244 }
245 readPorts_ = readPorts;
246 writePorts_ = writePorts;
247 bidirPorts_ = bidirPorts;
248 maxReads_ = rf->maxReads();
249 maxWrites_ = rf->maxWrites();
250 latency_ = 1;
251 guardSupport_ = guardSupport;
252 width_ = rf->width();
253 size_ = rf->numberOfRegisters();
255 }
256}

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_.

Here is the call graph for this function:

◆ RFArchitecture() [4/4]

HDB::RFArchitecture::RFArchitecture ( const TTAMachine::ImmediateUnit imm)

Builds RFArchitecture from ImmediateUnit*.

Parameters
immImmediateUnit*.

Definition at line 142 of file RFArchitecture.cc.

142 {
143
144 int readPorts = 0;
145 int writePorts = 0;
146 int bidirPorts = 0;
147 for (int i = 0; i < imm->portCount(); i++) {
148 TTAMachine::Socket* input = imm->port(i)->inputSocket();
149 TTAMachine::Socket* output = imm->port(i)->outputSocket();
150 if (input != NULL && output != NULL) {
151 bidirPorts++;
152 } else if (input != NULL) {
153 readPorts++;
154 } else if (output != NULL) {
155 writePorts++;
156 }
157 }
158
159 // immediate unit has no MaxReadWrite, no MaxReads and no guard support
160 readPorts_ = readPorts;
161 writePorts_ = writePorts;
162 bidirPorts_ = bidirPorts;
163 maxReads_ = 0;
164 maxWrites_ = 0;
165 latency_ = 1;
166 guardSupport_ = false;
167 width_ = imm->width();
168 size_ = imm->numberOfRegisters();
169 guardLatency_ = 0;
170}

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_.

Here is the call graph for this function:

◆ ~RFArchitecture()

HDB::RFArchitecture::~RFArchitecture ( )
virtual

The destructor.

Definition at line 261 of file RFArchitecture.cc.

261 {
262}

Member Function Documentation

◆ bidirPortCount()

int HDB::RFArchitecture::bidirPortCount ( ) const

◆ guardLatency()

int HDB::RFArchitecture::guardLatency ( ) const

◆ hasGuardSupport()

bool HDB::RFArchitecture::hasGuardSupport ( ) const

Tells whether the RF supports guards.

Returns
True if the RF supports guards, otherwise false.

Definition at line 519 of file RFArchitecture.cc.

519 {
520 return guardSupport_;
521}

References guardSupport_.

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFArchitecture(), CostDatabase::buildRegisterFiles(), InterpolatingRFEstimator::createSearch(), operator==(), and HDBToHtml::rfArchToHtml().

◆ hasParameterizedSize()

bool HDB::RFArchitecture::hasParameterizedSize ( ) const

Tells whether the RF has parameterized size.

Returns
True if the RF has parameterized size, otherwise false.

Definition at line 282 of file RFArchitecture.cc.

282 {
283 return size_ == 0;
284}

References size_.

Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), BlockImplementationDialog::onHDBSelection(), operator==(), HDBToHtml::rfArchToHtml(), and size().

◆ hasParameterizedWidth()

bool HDB::RFArchitecture::hasParameterizedWidth ( ) const

Tells whether the RF has parameterized width.

Returns
True if the RF has parameterized width, otherwise false.

Definition at line 271 of file RFArchitecture.cc.

271 {
272 return width_ == 0;
273}

References width_.

Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), AddIUFromHDBDialog::onAdd(), AddRFFromHDBDialog::onAdd(), BlockImplementationDialog::onHDBSelection(), operator==(), HDBToHtml::rfArchToHtml(), and width().

◆ latency()

int HDB::RFArchitecture::latency ( ) const

◆ maxReads()

int HDB::RFArchitecture::maxReads ( ) const

◆ maxWrites()

int HDB::RFArchitecture::maxWrites ( ) const

◆ operator==()

bool HDB::RFArchitecture::operator== ( const RFArchitecture rightHand) const

Checks whether the given RF has a mathing architecture with the given RF architecture instance.

Parameters
rightHandRight hand operand.
Returns
True if the architectures match, otherwise false.

Definition at line 564 of file RFArchitecture.cc.

564 {
565
566 if (rightHand.readPortCount() != readPortCount()) {
567 return false;
568 }
569 if (rightHand.writePortCount() != writePortCount()) {
570 return false;
571 }
572 if (rightHand.bidirPortCount() != bidirPortCount()) {
573 return false;
574 }
575 if (rightHand.maxReads() != maxReads()) {
576 return false;
577 }
578 if (rightHand.maxWrites() != maxWrites()) {
579 return false;
580 }
581 if (rightHand.latency() != latency()) {
582 return false;
583 }
584 if (rightHand.hasGuardSupport() != hasGuardSupport()) {
585 return false;
586 }
587 if (rightHand.guardLatency() != guardLatency()) {
588 return false;
589 }
590 if (rightHand.hasParameterizedSize() != hasParameterizedSize()) {
591 return false;
592 }
593 if (!hasParameterizedSize()) {
594 if (rightHand.size() != size()) {
595 return false;
596 }
597 }
598 if (rightHand.hasParameterizedWidth() != hasParameterizedWidth()) {
599 return false;
600 }
601 if (!hasParameterizedWidth()) {
602 if (rightHand.width() != width()) {
603 return false;
604 }
605 }
606 return true;
607}
bool hasGuardSupport() const
bool hasParameterizedWidth() const
bool hasParameterizedSize() const

References bidirPortCount(), guardLatency(), hasGuardSupport(), hasParameterizedSize(), hasParameterizedWidth(), latency(), maxReads(), maxWrites(), readPortCount(), size(), width(), and writePortCount().

Here is the call graph for this function:

◆ readPortCount()

int HDB::RFArchitecture::readPortCount ( ) const

◆ setBidirPortCount()

void HDB::RFArchitecture::setBidirPortCount ( int  portCount)

Sets the number of bidirectional ports.

Parameters
portCountThe number of bidirectional ports.
Exceptions
OutOfRangeIf the given port count is negative.

Definition at line 409 of file RFArchitecture.cc.

409 {
410 if (portCount < 0) {
411 throw OutOfRange(__FILE__, __LINE__, __func__);
412 }
413 bidirPorts_ = portCount;
414}
#define __func__

References __func__, and bidirPorts_.

Referenced by RFArchitectureDialog::onOK().

◆ setGuardSupport()

void HDB::RFArchitecture::setGuardSupport ( bool  supported)

Sets the guard support of the register file.

Parameters
supportedTrue if supported, otherwise false.

Definition at line 508 of file RFArchitecture.cc.

508 {
509 guardSupport_ = supported;
510}

References guardSupport_.

Referenced by RFArchitectureDialog::onOK().

◆ setLatency()

void HDB::RFArchitecture::setLatency ( int  latency)

Sets the latency of the register file.

Parameters
latencyThe new latency.
Exceptions
OutOfRangeIf the given latency is smaller than 1.

Definition at line 484 of file RFArchitecture.cc.

484 {
485 if (latency < 1) {
486 throw OutOfRange(__FILE__, __LINE__, __func__);
487 }
489}

References __func__, latency(), and latency_.

Referenced by RFArchitectureDialog::onOK().

Here is the call graph for this function:

◆ setMaxReads()

void HDB::RFArchitecture::setMaxReads ( int  maxReads)

Sets the maximum number of simultaneous reads.

Parameters
maxReadsThe new value.
Exceptions
OutOfRangeIf the given value is negative.

Definition at line 434 of file RFArchitecture.cc.

434 {
435 if (maxReads < 0) {
436 throw OutOfRange(__FILE__, __LINE__, __func__);
437 }
439}

References __func__, maxReads(), and maxReads_.

Referenced by RFArchitectureDialog::onOK().

Here is the call graph for this function:

◆ setMaxWrites()

void HDB::RFArchitecture::setMaxWrites ( int  maxWrites)

Sets the maximum number of simultaneous writes.

Parameters
maxWritesThe new value.
Exceptions
OutOfRangeIf the given value is negative.

Definition at line 459 of file RFArchitecture.cc.

459 {
460 if (maxWrites < 0) {
461 throw OutOfRange(__FILE__, __LINE__, __func__);
462 }
464}

References __func__, maxWrites(), and maxWrites_.

Referenced by RFArchitectureDialog::onOK().

Here is the call graph for this function:

◆ setReadPortCount()

void HDB::RFArchitecture::setReadPortCount ( int  portCount)

Sets the number of read ports.

Parameters
portCountThe number of read ports.
Exceptions
OutOfRangeIf the given port count is negative.

Definition at line 359 of file RFArchitecture.cc.

359 {
360 if (portCount < 0) {
361 throw OutOfRange(__FILE__, __LINE__, __func__);
362 }
363 readPorts_ = portCount;
364}

References __func__, and readPorts_.

Referenced by RFArchitectureDialog::onOK().

◆ setSize()

void HDB::RFArchitecture::setSize ( int  size)

Sets the size of the register file.

Parameters
sizeThe new size.
Exceptions
OutOfRangeIf the size is less than 1.

Definition at line 310 of file RFArchitecture.cc.

310 {
311 if (size < 1) {
312 const string procName = "RFArchitecture::setSize";
313 throw OutOfRange(__FILE__, __LINE__, procName);
314 } else {
315 size_ = size;
316 }
317}

References size(), and size_.

Referenced by RFTestbenchGenerator::createMachineState(), RFArchitectureDialog::onOK(), and HDB::HDBManager::rfArchitectureByID().

Here is the call graph for this function:

◆ setWidth()

void HDB::RFArchitecture::setWidth ( int  width)

Sets the width of the register file.

Parameters
widthThe new width.
Exceptions
OutOfRangeIf the width is less than 1.

Definition at line 294 of file RFArchitecture.cc.

294 {
295 if (width < 1) {
296 const string procName = "RFArchitecture::setWidth";
297 throw OutOfRange(__FILE__, __LINE__, procName);
298 } else {
299 width_ = width;
300 }
301}

References width(), and width_.

Referenced by RFTestbenchGenerator::createMachineState(), RFArchitectureDialog::onOK(), and HDB::HDBManager::rfArchitectureByID().

Here is the call graph for this function:

◆ setWritePortCount()

void HDB::RFArchitecture::setWritePortCount ( int  portCount)

Sets the number of write ports.

Parameters
portCountThe number of write ports.
Exceptions
OutOfRangeIf the given port count is smaller than 1.

Definition at line 384 of file RFArchitecture.cc.

384 {
385 if (portCount < 0) {
386 throw OutOfRange(__FILE__, __LINE__, __func__);
387 }
388 writePorts_ = portCount;
389}

References __func__, and writePorts_.

Referenced by RFArchitectureDialog::onOK().

◆ setZeroRegister()

void HDB::RFArchitecture::setZeroRegister ( bool  zeroRegister)

Sets the zero register flag of the register file

Parameters
zeroRegisterTrue if has a zero register, otherwise false

Definition at line 530 of file RFArchitecture.cc.

530 {
532}

References zeroRegister(), and zeroRegister_.

Referenced by RFArchitectureDialog::onOK().

Here is the call graph for this function:

◆ size()

int HDB::RFArchitecture::size ( ) const

Returns the size of the register file.

Returns
The size of the register file.
Exceptions
NotAvailableIf the size is parameterized.

Definition at line 326 of file RFArchitecture.cc.

326 {
327 if (hasParameterizedSize()) {
328 const string procName = "RFArchitecture::size";
329 throw NotAvailable(__FILE__, __LINE__, procName);
330 } else {
331 return size_;
332 }
333}

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().

Here is the call graph for this function:

◆ width()

int HDB::RFArchitecture::width ( ) const

Returns the width of the register file.

Returns
The width of the register file.
Exceptions
NotAvailableIf the width of the register file is parameterized.

Definition at line 343 of file RFArchitecture.cc.

343 {
344 if (hasParameterizedWidth()) {
345 const string procName = "RFArchitecture::width";
346 throw NotAvailable(__FILE__, __LINE__, procName);
347 } else {
348 return width_;
349 }
350}

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().

Here is the call graph for this function:

◆ writePortCount()

int HDB::RFArchitecture::writePortCount ( ) const

◆ zeroRegister()

bool HDB::RFArchitecture::zeroRegister ( ) const

Tells whether the RF has a zero register

Returns
True if RF has a zero register

Definition at line 541 of file RFArchitecture.cc.

541 {
542 return zeroRegister_;
543}

References zeroRegister_.

Referenced by HDB::HDBManager::addRFArchitecture(), RFTestbenchGenerator::createMachineState(), AddRFFromHDBDialog::onAdd(), HDBToHtml::rfArchToHtml(), and setZeroRegister().

Member Data Documentation

◆ bidirPorts_

int HDB::RFArchitecture::bidirPorts_
private

Number of bidir ports.

Definition at line 104 of file RFArchitecture.hh.

Referenced by bidirPortCount(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setBidirPortCount().

◆ guardLatency_

int HDB::RFArchitecture::guardLatency_
private

Guard latency.

Definition at line 119 of file RFArchitecture.hh.

Referenced by guardLatency(), RFArchitecture(), RFArchitecture(), and RFArchitecture().

◆ guardSupport_

bool HDB::RFArchitecture::guardSupport_
private

The guard support.

Definition at line 113 of file RFArchitecture.hh.

Referenced by hasGuardSupport(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setGuardSupport().

◆ latency_

int HDB::RFArchitecture::latency_
private

The latency.

Definition at line 111 of file RFArchitecture.hh.

Referenced by latency(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setLatency().

◆ maxReads_

int HDB::RFArchitecture::maxReads_
private

Maximum number of simultaneous reads.

Definition at line 106 of file RFArchitecture.hh.

Referenced by maxReads(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setMaxReads().

◆ maxWrites_

int HDB::RFArchitecture::maxWrites_
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().

◆ readPorts_

int HDB::RFArchitecture::readPorts_
private

Number of read ports.

Definition at line 100 of file RFArchitecture.hh.

Referenced by readPortCount(), RFArchitecture(), RFArchitecture(), RFArchitecture(), and setReadPortCount().

◆ size_

int HDB::RFArchitecture::size_
private

Size of the register file.

Definition at line 117 of file RFArchitecture.hh.

Referenced by hasParameterizedSize(), RFArchitecture(), RFArchitecture(), RFArchitecture(), setSize(), and size().

◆ width_

int HDB::RFArchitecture::width_
private

Width of the register file.

Definition at line 115 of file RFArchitecture.hh.

Referenced by hasParameterizedWidth(), RFArchitecture(), RFArchitecture(), RFArchitecture(), setWidth(), and width().

◆ writePorts_

int HDB::RFArchitecture::writePorts_
private

Number of write ports.

Definition at line 102 of file RFArchitecture.hh.

Referenced by RFArchitecture(), RFArchitecture(), RFArchitecture(), setWritePortCount(), and writePortCount().

◆ zeroRegister_

bool HDB::RFArchitecture::zeroRegister_
private

Zero register.

Definition at line 121 of file RFArchitecture.hh.

Referenced by setZeroRegister(), and zeroRegister().


The documentation for this class was generated from the following files: