|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dioscuri.module.AbstractModule dioscuri.module.ModuleMemory dioscuri.module.memory.DynamicAllocationMemory
public class DynamicAllocationMemory
An implementation of a hardware memory module.
Contains an array of 2^20 integers, offering 1MB of RAM.
Metadata module ********************************************
general.type : memory general.name : 1 Megabyte Random Access Memory
general.architecture : Von Neumann general.description : General
implementation of 1 MB of flat RAM. general.creator : Tessella Support
Services, Koninklijke Bibliotheek, Nationaal Archief of the Netherlands
general.version : 1.0 general.keywords : memory, RAM, 1MB, A20 address
line general.relations : cpu, mainboard general.yearOfIntroduction :
general.yearOfEnding : general.ancestor : general.successor :
memory.size : 1 MB
Notes: This memory implementation using dynamic allocation was designed
and coded by Tiago Leite, Tiago Taveira and Bruno Martins, students at
the Insituto Superior Tecnico, May 2009.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
---|
Module.Type |
Field Summary | |
---|---|
protected static long |
A20mask
|
Fields inherited from class dioscuri.module.AbstractModule |
---|
type |
Constructor Summary | |
---|---|
DynamicAllocationMemory(Emulator owner)
Class constructor |
Method Summary | |
---|---|
byte |
getByte(int address)
Return a byte from memory at a specific address |
java.lang.String |
getDump()
Return a dump of module status |
byte[] |
getWord(int address)
Returns the value of a word at a specific address Note: words in memory are stored in Little Endian order (LSB, MSB), but this method returns a word in Big Endian order (MSB, LSB) because this is the common way words are used by instructions. |
boolean |
reset()
Reset all parameters of module. |
void |
setA20AddressLine(boolean status)
Set A20 address line toggle |
void |
setByte(int address,
byte value)
Set a byte in memory at given address |
void |
setBytes(int address,
byte[] binaryStream)
Stores an array of bytes in memory starting at a specific address |
void |
setRamSizeInMB(int ramSizeMB)
Set RAM Size in megabytes |
void |
setWatchValueAndAddress(boolean isWatchOn,
int watchAddress)
Set watch toggle and address to trace in memory |
void |
setWord(int address,
byte[] value)
Stores the value of a word at a specific address Note: words in memory are stored in Little Endian order (LSB, MSB), but this method assumes that a word is given in Big Endian order (MSB, LSB) because this is the common way words are used by instructions. |
Methods inherited from class dioscuri.module.AbstractModule |
---|
getConnection, getConnections, getDebugMode, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static long A20mask
Constructor Detail |
---|
public DynamicAllocationMemory(Emulator owner)
owner
- Method Detail |
---|
public boolean reset()
reset
in interface Module
reset
in class AbstractModule
AbstractModule
public java.lang.String getDump()
getDump
in interface Module
getDump
in class AbstractModule
AbstractModule
public byte getByte(int address)
getByte
in class ModuleMemory
address
- Flat-address where data can be found
ModuleMemory
public void setByte(int address, byte value)
setByte
in class ModuleMemory
ModuleMemory
public byte[] getWord(int address)
getWord
in class ModuleMemory
address
- Flat-address where data can be found
ModuleMemory
public void setWord(int address, byte[] value)
setWord
in class ModuleMemory
ModuleMemory
public void setBytes(int address, byte[] binaryStream) throws ModuleException
setBytes
in class ModuleMemory
address
- Flat-address where data is stored
ModuleException
ModuleMemory
public void setA20AddressLine(boolean status)
setA20AddressLine
in class ModuleMemory
ModuleMemory
public void setWatchValueAndAddress(boolean isWatchOn, int watchAddress)
setWatchValueAndAddress
in class ModuleMemory
ModuleMemory
public void setRamSizeInMB(int ramSizeMB)
setRamSizeInMB
in class ModuleMemory
ModuleMemory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |