Go to the documentation of this file.
87 if (offset >=
data_.size()) {
94 data_[offset] = aByte;
133 for(
int i = 0; i < mauInBytes; i++) {
157 "The given value does not fit to the MAU of address space.");
189 return data_[offset];
201 data_.push_back(aByte);
227 while (
length() < aLength) {
255 static_cast<unsigned int>(-1) >>
261 for (
int i = numOfMAUs - 1; i >= 0; i--) {
266 if (shiftCount <
static_cast<int>(
sizeof(value)*
BYTE_BITWIDTH)) {
269 currentMAU = (value >> shiftCount) & mauMask;
275 for (
int j = mauInBytes-1; j >= 0; j--) {
276 Byte currentByte =
static_cast<Byte>(currentMAU);
277 setByte(byteOffset + j, currentByte);
310 static_cast<unsigned int>(-1) >>
316 for (
int i = numOfMAUs - 1; i >= 0; i--) {
322 if (shiftCount <
static_cast<int>(
sizeof(value)*
BYTE_BITWIDTH)) {
325 currentMAU = (value >> shiftCount) & mauMask;
330 for (
int j = mauInBytes-1; j >= 0; j--) {
331 Byte currentByte =
static_cast<Byte>(currentMAU);
332 setByte(byteOffset + j,currentByte);
static DataSection proto_
Prototype instance of section.
virtual Byte byte(const Chunk *chunk) const
ASpaceElement * aSpace() const
virtual MinimumAddressableUnit MAU(Word index) const
virtual void addMAU(MinimumAddressableUnit aMAU)
virtual Section * clone() const
virtual void setByte(Word offset, Byte aByte)
virtual Word MAUsToBytes(Word mauCount) const
virtual void addByte(Byte aByte)
static std::string toString(const T &source)
std::vector< Byte > data_
Contains the data of data section.
#define assert(condition)
#define abortWithError(message)
@ ST_DATA
Initialized data section.
Word MinimumAddressableUnit
Type for storing a MAU (must be unsigned type!). This limits the maximum size of the simulated minimu...
static void registerSection(const Section *section)
virtual SectionType type() const
SectionOffset offset() const
virtual void setDataLength(Word length)
find Finds info of the inner loops in the false
virtual Word length() const
virtual Chunk * chunk(SectionOffset offset) const
virtual void writeValue(Word index, Word numOfMAUs, unsigned long value)