public final class AddressObject
extends java.lang.Object
AddressObject
represents test data for an individual MemoryAccess
.
Test data include addresses (virtual and physical ones), auxiliary attributes (cache policy, control bits, etc.), sequences of addresses to be accessed to prepare hit/miss situations and sets of entries to be written into the buffers.
Constructor and Description |
---|
AddressObject(MemoryAccess access)
Constructs uninitialized test data for the given access of the given memory subsystem.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(MmuBuffer buffer,
EntryObject entry)
Adds the entry to the set of entries to be written to the given buffer.
|
void |
clearAttrs() |
long |
getAddress(MmuAddressInstance addressType)
Returns the address of the given type.
|
java.util.Map<MmuAddressInstance,java.lang.Long> |
getAddresses()
Returns the address map, which maps address types to address values.
|
java.lang.Long |
getAttrValue(IntegerVariable variable)
Returns the value of the given attribute.
|
java.util.Map<MmuBuffer,java.util.Map<java.lang.Long,EntryObject>> |
getEntries() |
java.util.Map<java.lang.Long,EntryObject> |
getEntries(MmuBuffer buffer)
Returns the entries to be written to the given buffer.
|
MemoryAccessPath |
getPath() |
long |
getPhysicalAddress() |
MemoryAccessType |
getType() |
long |
getVirtualAddress() |
void |
setAddress(MmuAddressInstance addressType,
long value)
Sets the address of the given type.
|
void |
setAttrValue(IntegerVariable variable,
long value)
Sets the value of the given attribute.
|
void |
setEntries(MmuBuffer buffer,
java.util.Map<java.lang.Long,EntryObject> entries)
Sets the entries to be written to the given buffer.
|
void |
setPath(MemoryAccessPath path) |
void |
setPhysicalAddress(long value) |
void |
setVirtualAddress(long value) |
java.lang.String |
toString() |
public AddressObject(MemoryAccess access)
memory
- the MMU specification.access
- the memory access.java.lang.IllegalArgumentException
- if some parameters are null.public MemoryAccessType getType()
public MemoryAccessPath getPath()
public void setPath(MemoryAccessPath path)
public java.lang.Long getAttrValue(IntegerVariable variable)
variable
- the attribute (variable).java.lang.IllegalArgumentException
- if variable
is null.public void setAttrValue(IntegerVariable variable, long value)
variable
- the attribute (variable).value
- the value to be set.java.lang.IllegalArgumentException
- if variable
is null.public void clearAttrs()
public long getAddress(MmuAddressInstance addressType)
addressType
- the address type.java.lang.IllegalArgumentException
- if addressType
is null.public long getVirtualAddress()
public long getPhysicalAddress()
public java.util.Map<MmuAddressInstance,java.lang.Long> getAddresses()
public void setAddress(MmuAddressInstance addressType, long value)
addressType
- the address type.value
- the address value.java.lang.IllegalArgumentException
- if addressType
is null.public void setVirtualAddress(long value)
public void setPhysicalAddress(long value)
public java.util.Map<MmuBuffer,java.util.Map<java.lang.Long,EntryObject>> getEntries()
public java.util.Map<java.lang.Long,EntryObject> getEntries(MmuBuffer buffer)
buffer
- the buffer to be prepared.java.lang.IllegalArgumentException
- if buffer
is null.public void setEntries(MmuBuffer buffer, java.util.Map<java.lang.Long,EntryObject> entries)
buffer
- the buffer to be prepared.entries
- the entries to be written.java.lang.IllegalArgumentException
- if some parameters are null.public void addEntry(MmuBuffer buffer, EntryObject entry)
buffer
- the buffer to be prepared.entryId
- the internal address of the entry.entry
- the entry to be added.java.lang.IllegalArgumentException
- if some parameters are null.public java.lang.String toString()
toString
in class java.lang.Object