64 int readPorts,
int writePorts,
int bidirPorts,
int maxReads,
65 int maxWrites,
int latency,
bool guardSupport,
int guardLatency,
67 : readPorts_(readPorts),
68 writePorts_(writePorts),
69 bidirPorts_(bidirPorts),
71 maxWrites_(maxWrites),
73 guardSupport_(guardSupport),
76 guardLatency_(guardLatency),
77 zeroRegister_(zeroRegister) {
78 if (readPorts < 0 || writePorts < 0 || bidirPorts < 0 ||
maxReads < 0 ||
80 const string procName =
"RFArchitecture::RFArchitecture";
81 throw OutOfRange(__FILE__, __LINE__, procName);
95 for (
int i = 0; i < rf->
portCount(); i++) {
98 if (input != NULL && output != NULL) {
100 }
else if (input != NULL) {
102 }
else if (output != NULL) {
107 bool guardSupport =
false;
111 for (
int i = 0; i < navigator.
count(); i++) {
117 if (registerGuard != NULL) {
147 for (
int i = 0; i < imm->
portCount(); i++) {
150 if (input != NULL && output != NULL) {
152 }
else if (input != NULL) {
154 }
else if (output != NULL) {
187 for (
int i = 0; i < imm->
portCount(); i++) {
190 if (input != NULL && output != NULL) {
192 }
else if (input != NULL) {
194 }
else if (output != NULL) {
215 for (
int i = 0; i < rf->
portCount(); i++) {
218 if (input != NULL && output != NULL) {
220 }
else if (input != NULL) {
222 }
else if (output != NULL) {
227 bool guardSupport =
false;
231 for (
int i = 0; i < navigator.
count(); i++) {
237 if (registerGuard != NULL) {
296 const string procName =
"RFArchitecture::setWidth";
297 throw OutOfRange(__FILE__, __LINE__, procName);
312 const string procName =
"RFArchitecture::setSize";
313 throw OutOfRange(__FILE__, __LINE__, procName);
328 const string procName =
"RFArchitecture::size";
345 const string procName =
"RFArchitecture::width";
void setGuardSupport(bool supported)
void setZeroRegister(bool zeroRegister)
int readPortCount() const
bool hasGuardSupport() const
int bidirPorts_
Number of bidir ports.
bool hasParameterizedWidth() const
int maxWrites_
Maximum number of ports that can read a register in the same cycle in which another port writes the s...
void setWritePortCount(int portCount)
RFArchitecture(int readPorts, int writePorts, int bidirPorts, int maxReads, int maxWrites, int latency, bool guardSupport, int guardLatency=0, bool zeroRegister=false)
int writePorts_
Number of write ports.
int writePortCount() const
bool operator==(const RFArchitecture &rightHand) const
int bidirPortCount() const
void setBidirPortCount(int portCount)
bool zeroRegister() const
int size_
Size of the register file.
int width_
Width of the register file.
void setReadPortCount(int portCount)
virtual ~RFArchitecture()
int guardLatency_
Guard latency.
void setMaxWrites(int maxWrites)
void setMaxReads(int maxReads)
bool guardSupport_
The guard support.
void setLatency(int latency)
bool hasParameterizedSize() const
int readPorts_
Number of read ports.
bool zeroRegister_
Zero register.
int maxReads_
Maximum number of simultaneous reads.
virtual int numberOfRegisters() const
virtual int width() const
virtual RFPort * port(const std::string &name) const
Guard * guard(int index) const
virtual Machine * machine() const
virtual bool isRegistered() const
ComponentType * item(int index) const
virtual BusNavigator busNavigator() const
virtual Socket * outputSocket() const
virtual Socket * inputSocket() const
virtual int maxReads() const
virtual int guardLatency() const
virtual int maxWrites() const
const RegisterFile * registerFile() const
virtual int portCount() const