|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Memory - The base interface model for HADES memories, with several access and utility functions. All memory SimObjects should implement this interface, in order to be used with hades.gui.MemoryEditorFrame and similar utility classes.
For performance reasons, we assume that the memory array is realized as an array of long values, with optional parallel arrays for additional information like 'X' or 'U' values, access statistics, ...
Method Summary | |
void |
addMemoryListener(MemoryListener ML)
|
boolean |
canChangeSize()
|
int |
getAddrOffset()
utility method to support systems with different memory components mapped into a single address space at different offsets. |
int |
getBitsPerWord()
return the number of bits per word in this memory. |
PropertySheet |
getConfigDialog()
|
long[] |
getDataArray()
|
long |
getDataAt(int address)
|
java.lang.String |
getResourcename()
|
int |
getSize()
get the number of words in this memory. |
boolean |
merge(java.io.BufferedReader reader)
|
boolean |
parse(java.io.BufferedReader reader)
|
void |
removeMemoryListener(MemoryListener ML)
|
boolean |
resize(int n_words,
int n_bits_per_word)
|
boolean |
save(java.io.PrintWriter PW)
|
void |
setBitsPerWord(int n_bits)
|
void |
setDataArray(long[] data)
|
void |
setDataAt(int address,
long value)
|
void |
setResourcename(java.lang.String name)
|
void |
setSize(int n_words)
|
Method Detail |
public int getAddrOffset()
For example, the D*CORE processor used in our T3 practical course uses one ROM mapped to addresses 0x000..0x6FFF with address offset 0, a RAM mapped to addresses 0x8000..0xFFFF with address offset 0x8000, and IO components mapped to 0x7000..0x7FFF. Standard memory components will usually return 0 here.
public int getSize()
public void setSize(int n_words) throws java.lang.Exception
java.lang.Exception
public int getBitsPerWord()
public void setBitsPerWord(int n_bits) throws java.lang.Exception
java.lang.Exception
public boolean canChangeSize()
public boolean resize(int n_words, int n_bits_per_word) throws java.lang.Exception
java.lang.Exception
public long getDataAt(int address)
public void setDataAt(int address, long value)
public long[] getDataArray()
public void setDataArray(long[] data)
public boolean parse(java.io.BufferedReader reader) throws java.lang.Exception
java.lang.Exception
public boolean merge(java.io.BufferedReader reader) throws java.lang.Exception
java.lang.Exception
public boolean save(java.io.PrintWriter PW) throws java.lang.Exception
java.lang.Exception
public java.lang.String getResourcename()
public void setResourcename(java.lang.String name)
public PropertySheet getConfigDialog()
public void addMemoryListener(MemoryListener ML)
public void removeMemoryListener(MemoryListener ML)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |