|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthades.simulator.SimObject
hades.models.rtl.IDT6116
IDT6116 - static CMOS RAM of 2Kx8 bits. We use the IDT name instead of the original Hitachi (HC6116), because IDT seems to be the only company left that provides a datasheet...
The RAM has separate low-active nCS chip select, nOE output enable, and nWE asynchronous write enable control inputs. Data lines are bidirectional.
The RAM outputs are tri-stated and the input disabled as long as nCS is high. When nCS is low and nOE is low, the data from the currently addressed RAM cell is outputted at the data lines after t_access. If nCS is low and nWE low, the addressed RAM cell is written (continuously) with the current data inputs.
Clicking 'edit' on the RAM model will open a graphical editor for the RAM data, that also allows to specify the (optional) RAM initialization data file.
| Field Summary | |
protected java.util.Hashtable |
_listenerTable
|
protected int |
address
|
protected long[] |
data
|
protected int |
index_A0
|
protected int |
index_D0
|
protected MemoryEditorFrame |
MEF
|
protected int |
N_ADDRESS_INPUTS
|
static int |
N_BITS_PER_WORD
|
static int |
N_DATA_INPUTS
|
protected int |
n_words
|
protected StdLogic1164 |
output_0
|
protected StdLogic1164 |
output_1
|
protected StdLogic1164 |
output_X
|
protected StdLogic1164 |
output_Z
|
protected PortStdLogic1164 |
port_nCS
|
protected PortStdLogic1164 |
port_nOE
|
protected PortStdLogic1164 |
port_nWE
|
protected java.lang.String |
resourcename
|
protected double |
t_access
|
protected double |
t_tristate
|
protected double |
t_undefined
|
static int |
TRISTATED
|
static int |
UNDEFINED
|
| Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
| Constructor Summary | |
IDT6116()
IDT6116 constructor |
|
| Method Summary | |
void |
addMemoryListener(MemoryListener ML)
|
boolean |
canChangeSize()
|
void |
configure()
create and display a 'ConfigDialog' to set the parameters for a SimObject. |
void |
dbg(java.lang.String msg)
|
void |
elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object. |
void |
evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. |
int |
getAddrOffset()
utility method to support systems with different memory components mapped into a single address space at different offsets. |
protected void |
getAdress()
|
int |
getBitsPerWord()
return the number of bits per word in this memory. |
PropertySheet |
getConfigDialog()
|
long[] |
getDataArray()
|
long |
getDataAt(int address)
|
java.lang.String[] |
getExternalResources()
return a String[] array of length 1 with our RAM contents file. |
protected java.lang.String |
getHexString(long value,
int n_chars)
|
int |
getNumberOfAddressInputs()
|
java.awt.Component |
getPropertySheet()
return a reference to the 'property sheet' or configuration window for this SimObject. |
java.lang.String |
getResourcename()
|
int |
getSize()
get the number of words in this memory. |
boolean |
initialize(java.lang.String s)
initialize a IDT6116 from a String. |
void |
initRAM()
|
boolean |
merge(java.io.BufferedReader reader)
|
boolean |
needsExternalResources()
we use one external resource: the data file to initialize the RAM contents. |
boolean |
parse(java.io.BufferedReader br)
parse RAM data from a file specified via its Java 1.1 resourcename. |
void |
parseRAM(java.lang.String resourcename)
|
void |
printSramContent()
|
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 s)
|
void |
setSize(int n_words)
|
java.lang.String |
toString()
toString() - the usual info method |
void |
write(java.io.PrintWriter ps)
|
| Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, copy, getClassLoader, getDebug, getEditor, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, isVisible, message, mousePressed, needsDynamicSymbol, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int N_DATA_INPUTS
public static final int N_BITS_PER_WORD
public static final int TRISTATED
public static final int UNDEFINED
protected StdLogic1164 output_0
protected StdLogic1164 output_1
protected StdLogic1164 output_X
protected StdLogic1164 output_Z
protected PortStdLogic1164 port_nCS
protected PortStdLogic1164 port_nOE
protected PortStdLogic1164 port_nWE
protected int index_A0
protected int index_D0
protected int N_ADDRESS_INPUTS
protected int n_words
protected int address
protected long[] data
protected java.util.Hashtable _listenerTable
protected double t_access
protected double t_tristate
protected double t_undefined
protected java.lang.String resourcename
protected MemoryEditorFrame MEF
| Constructor Detail |
public IDT6116()
| Method Detail |
public int getNumberOfAddressInputs()
public boolean needsExternalResources()
needsExternalResources in class SimObjectpublic java.lang.String[] getExternalResources()
getExternalResources in class SimObjectpublic void initRAM()
public void printSramContent()
public java.lang.String getResourcename()
getResourcename in interface Memorypublic void setResourcename(java.lang.String s)
setResourcename in interface Memorypublic boolean initialize(java.lang.String s)
1002 /hades/examples/b-tutorial/ampel-43.rom
initialize in class SimObjectpublic void write(java.io.PrintWriter ps)
write in class SimObjectpublic void parseRAM(java.lang.String resourcename)
public boolean parse(java.io.BufferedReader br)
Each line of the RAM data file should contain the address and the corresponding data in hex format, seperated by a colon, e.g. '0001:D3' or '03FF:20'.
The alternative DigLOG compact format, e.g. '0000:000102030405060708090A0B0C0D0E0F' is also accepted.
The RAM model will issue a warning message, if the same location is written multiple times.
parse in interface Memory
public void setDataAt(int address,
long value)
setDataAt in interface Memorypublic long getDataAt(int address)
getDataAt in interface Memorypublic int getAddrOffset()
MemoryFor 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.
getAddrOffset in interface Memorypublic int getBitsPerWord()
Memory
getBitsPerWord in interface Memory
public void setBitsPerWord(int n_bits)
throws java.lang.Exception
setBitsPerWord in interface Memoryjava.lang.Exceptionpublic int getSize()
Memory
getSize in interface Memory
public void setSize(int n_words)
throws java.lang.Exception
setSize in interface Memoryjava.lang.Exception
public boolean resize(int n_words,
int n_bits_per_word)
throws java.lang.Exception
resize in interface Memoryjava.lang.Exceptionpublic boolean canChangeSize()
canChangeSize in interface Memorypublic long[] getDataArray()
getDataArray in interface Memorypublic void setDataArray(long[] data)
setDataArray in interface Memorypublic boolean merge(java.io.BufferedReader reader)
merge in interface Memorypublic void addMemoryListener(MemoryListener ML)
addMemoryListener in interface Memorypublic void removeMemoryListener(MemoryListener ML)
removeMemoryListener in interface Memory
protected java.lang.String getHexString(long value,
int n_chars)
public boolean save(java.io.PrintWriter PW)
save in interface Memorypublic void configure()
SimObject
configure in class SimObjectpublic java.awt.Component getPropertySheet()
SimObject
getPropertySheet in class SimObjectpublic PropertySheet getConfigDialog()
getConfigDialog in interface Memorypublic void elaborate(java.lang.Object arg)
elaborate in interface Simulatableelaborate in class SimObjectpublic void evaluate(java.lang.Object arg)
evaluate in interface Simulatableevaluate in class SimObjectarg - an arbitrary object argumentprotected void getAdress()
public void dbg(java.lang.String msg)
public java.lang.String toString()
toString in class SimObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||