Go to the documentation of this file.
75 const string& name,
int width,
ULongWord minAddress,
78 if (width <= 0 || minAddress >= maxAddress) {
79 string procName =
"AddressSpace::AddressSpace";
80 throw OutOfRange(__FILE__, __LINE__, procName);
115 for (
int asi = 0; asi < nav.
count(); ++asi) {
121 "Address space '%s' has the same numerical "
123 otherAS.
name() %
id %
name()).str());
133 TXT_AS_EXISTS_BY_NAME);
135 string procName =
"AddressSpace::AddressSpace";
197 if (
machine()->addressSpaceNavigator().hasItem(
name)) {
198 string procName =
"AddressSpace::setName";
217 string procName =
"AddressSpace::setWidth";
218 throw OutOfRange(__FILE__, __LINE__, procName);
234 string procName =
"AddressSpace::setAddressBounds";
235 throw OutOfRange(__FILE__, __LINE__, procName);
268 int units = fuNav.
count();
269 for (
int i = 0; i < units; i++) {
335 const string procName =
"AddressSpace::loadState";
356 for (
int i = 0; i < state->
childCount(); i++) {
412 for (
int i = 0; i < asNavigator.
count(); i++) {
418 for (IDSet::iterator
id = ids.begin();
id != ids.end(); ++
id) {
437 && this->shared_ == other.
shared_);
void internalUnsetMachine()
bool hasAttribute(const std::string &name) const
virtual void setName(const std::string &name)
virtual void unsetMachine()
virtual TCEString name() const
virtual void addNumericalId(unsigned id)
virtual bool isRegistered() const
std::set< unsigned > numericalIds() const
virtual bool hasNumericalId(unsigned id) const
ULongWord uLongAttribute(const std::string &name) const
int width_
Bit width of the minimum addressable word.
static const std::string OSKEY_NUMERICAL_ID
bool operator!=(const AddressSpace &other) const
virtual AddressSpace * addressSpace() const
virtual boost::format text(int textId)
void internalSetMachine(Machine &machine)
virtual void setShared(bool shared)
static const std::string OSNAME_ADDRESS_SPACE
ObjectState name for AddressSpace.
static const std::string OSKEY_MAX_ADDRESS
ObjectState attribute key for maximum address.
virtual void deleteAddressSpace(AddressSpace &as)
#define assert(condition)
virtual void setWidth(int width)
static const std::string OSKEY_WIDTH
ObjectState attribute key for the bit width.
AddressSpace(const std::string &name, int width, ULongWord minAddress, ULongWord maxAddress, Machine &owner)
virtual void setAddressBounds(ULongWord start, ULongWord end)
virtual ControlUnit * controlUnit() const
virtual void loadState(const ObjectState *state)
virtual FunctionUnitNavigator functionUnitNavigator() const
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the component.
ObjectState * child(int index) const
static const std::string OSKEY_SHARED_MEMORY
virtual ObjectState * saveState() const
virtual void addAddressSpace(AddressSpace &as)
virtual void setAddressSpace(AddressSpace *as)
virtual AddressSpaceNavigator addressSpaceNavigator() const
std::string errorMessage() const
bool setNumericalIds(const std::set< unsigned > &ids)
virtual int width() const
std::set< unsigned > IDSet
static const std::string OSKEY_MIN_ADDRESS
ObjectState attribute key for minimum address.
virtual void setMachine(Machine &mach)
virtual Machine * machine() const
bool boolAttribute(const std::string &name) const
virtual void loadState(const ObjectState *state)
int intAttribute(const std::string &name) const
ComponentType * item(int index) const
bool operator==(const AddressSpace &other) const
bool shared_
True in case this address space maps to a memory that is shared across all the cores in the multicore...
ULongWord minAddress_
Lowest address in the address space.
IDSet numericalIds_
The numerical ids mapped to this address space.
virtual ULongWord start() const
virtual ULongWord end() const
ULongWord maxAddress_
Highest address in the address space.
void setValue(const std::string &value)
virtual void setName(const std::string &name)
void setAttribute(const std::string &name, const std::string &value)