61 :
Unit(name), size_(size), width_(width) {
77 :
Unit(state), size_(0), width_(0) {
98 string procName =
"BaseRegisterFile::setNumberOfRegisters";
99 throw OutOfRange(__FILE__, __LINE__, procName);
114 string procName =
"BaseRegisterFile::setWidth";
115 throw OutOfRange(__FILE__, __LINE__, procName);
195 string procName =
"BaseRegisterFile::loadStateWithoutReferences";
#define assert(condition)
void setName(const std::string &name)
void setAttribute(const std::string &name, const std::string &value)
int intAttribute(const std::string &name) const
virtual void setNumberOfRegisters(int registers)
static const std::string OSKEY_SIZE
ObjectState attribute key for the number of registers.
virtual ObjectState * saveState() const
static const std::string OSKEY_WIDTH
ObjectState attribute key for bit width of the registers.
static const std::string OSNAME_BASE_REGISTER_FILE
ObjectState name for BaseRegisterFile.
virtual ~BaseRegisterFile()
void loadStateWithoutReferences(const ObjectState *state)
virtual int width() const
int width_
Bit width of the registers in the register file.
virtual void setWidth(int width)
int size_
Number of registers in the register file.
virtual RFPort * port(const std::string &name) const
virtual void loadState(const ObjectState *state)
BaseRegisterFile(const std::string &name, int size, int width)
virtual TCEString name() const
virtual Port * port(const std::string &name) const
virtual void loadState(const ObjectState *state)
virtual ObjectState * saveState() const