hades.models.rtlib.memory
Class AddressDecoder4

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.rtlib.logic.GenericOnebitLogicObject
          extended byhades.models.rtlib.memory.AddressDecoder4
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable, Wakeable

public class AddressDecoder4
extends GenericOnebitLogicObject

AddressDecoder4 - user-configurable address decoder with four outputs. For each low-active output, the user can specify the lower and upper address range.

See Also:
Serialized Form

Field Summary
protected  int _0
           
protected  int _1
           
protected  StdLogic1164 _nCS0
           
protected  StdLogic1164 _nCS1
           
protected  StdLogic1164 _nCS2
           
protected  StdLogic1164 _nCS3
           
protected  int _X
           
protected  int base0
           
protected  int base1
           
protected  int base2
           
protected  int base3
           
protected  int limit0
           
protected  int limit1
           
protected  int limit2
           
protected  int limit3
           
protected  PortStdLogicVector port_A
           
protected  PortStdLogic1164 port_nCS0
           
protected  PortStdLogic1164 port_nCS1
           
protected  PortStdLogic1164 port_nCS2
           
protected  PortStdLogic1164 port_nCS3
           
protected  StdLogicVector value_A
           
 
Fields inherited from class hades.models.rtlib.logic.GenericOnebitLogicObject
defaultdelay, delay, n_bits, value, value_0, value_1, value_U, value_X, value_Z, valueLabel, vector, vector_000, vector_111, vector_UUU, vector_XXX, vector_ZZZ
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
AddressDecoder4()
           
 
Method Summary
 void configure()
          construct a hades.gui.PropertySheet with fields for name, n_bits, delay, and the four (base/limit) address pairs.
 void constructPorts()
           
 void evaluate(java.lang.Object arg)
          called whenever the address bus input changes.
 java.lang.String format(int addr)
          return an unsigned hex formatted String representation of addr.
 java.lang.String getFormattedBase0()
           
 java.lang.String getFormattedBase1()
           
 java.lang.String getFormattedBase2()
           
 java.lang.String getFormattedBase3()
           
 java.lang.String getFormattedLimit0()
           
 java.lang.String getFormattedLimit1()
           
 java.lang.String getFormattedLimit2()
           
 java.lang.String getFormattedLimit3()
           
 java.lang.String getToolTip(java.awt.Point position, long millis)
          construct a (short) tool tip message.
 boolean initialize(java.lang.String s)
          initialize the AddressDecoder object from a String, which contains the integer version id, the width of this vector, the gate delay, and four pairs of base | limit addresses for the four chip select outputs, e.g.
 int parse(java.lang.String s)
          called from the PropertySheet to specify new address ranges.
 void setFormattedBase0(java.lang.String s)
           
 void setFormattedBase1(java.lang.String s)
           
 void setFormattedBase2(java.lang.String s)
           
 void setFormattedBase3(java.lang.String s)
           
 void setFormattedLimit0(java.lang.String s)
           
 void setFormattedLimit1(java.lang.String s)
           
 void setFormattedLimit2(java.lang.String s)
           
 void setFormattedLimit3(java.lang.String s)
           
 void setOutput(Port port, StdLogic1164 value, double time)
           
 void write(java.io.PrintWriter ps)
          write versionID, n_bits, gate delay and the four (base/limit) address pairs to ps.
 
Methods inherited from class hades.models.rtlib.logic.GenericOnebitLogicObject
constructStandardValues, copy, elaborate, getDelay, getValue, getWidth, initValueLabel, isConnected, setDelay, setDelay, setValue, setValue, setWidth, setWidth, toString, updateSymbol, wakeup
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, setVersionId, setVisible, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hades.simulator.Simulatable
message
 

Field Detail

port_A

protected PortStdLogicVector port_A

port_nCS0

protected PortStdLogic1164 port_nCS0

port_nCS1

protected PortStdLogic1164 port_nCS1

port_nCS2

protected PortStdLogic1164 port_nCS2

port_nCS3

protected PortStdLogic1164 port_nCS3

value_A

protected StdLogicVector value_A

_0

protected int _0

_1

protected int _1

_X

protected int _X

_nCS0

protected StdLogic1164 _nCS0

_nCS1

protected StdLogic1164 _nCS1

_nCS2

protected StdLogic1164 _nCS2

_nCS3

protected StdLogic1164 _nCS3

base0

protected int base0

limit0

protected int limit0

base1

protected int base1

limit1

protected int limit1

base2

protected int base2

limit2

protected int limit2

base3

protected int base3

limit3

protected int limit3
Constructor Detail

AddressDecoder4

public AddressDecoder4()
Method Detail

constructPorts

public void constructPorts()
Overrides:
constructPorts in class GenericOnebitLogicObject

getFormattedBase0

public java.lang.String getFormattedBase0()

getFormattedBase1

public java.lang.String getFormattedBase1()

getFormattedBase2

public java.lang.String getFormattedBase2()

getFormattedBase3

public java.lang.String getFormattedBase3()

setFormattedBase0

public void setFormattedBase0(java.lang.String s)

setFormattedBase1

public void setFormattedBase1(java.lang.String s)

setFormattedBase2

public void setFormattedBase2(java.lang.String s)

setFormattedBase3

public void setFormattedBase3(java.lang.String s)

getFormattedLimit0

public java.lang.String getFormattedLimit0()

getFormattedLimit1

public java.lang.String getFormattedLimit1()

getFormattedLimit2

public java.lang.String getFormattedLimit2()

getFormattedLimit3

public java.lang.String getFormattedLimit3()

setFormattedLimit0

public void setFormattedLimit0(java.lang.String s)

setFormattedLimit1

public void setFormattedLimit1(java.lang.String s)

setFormattedLimit2

public void setFormattedLimit2(java.lang.String s)

setFormattedLimit3

public void setFormattedLimit3(java.lang.String s)

parse

public int parse(java.lang.String s)
called from the PropertySheet to specify new address ranges. Try to parse an address (integer) from String s. This method dispatches to StdLogicVector.parse() and will recognize decimal, binary, and hex formats.


format

public java.lang.String format(int addr)
return an unsigned hex formatted String representation of addr.


write

public void write(java.io.PrintWriter ps)
write versionID, n_bits, gate delay and the four (base/limit) address pairs to ps.

Overrides:
write in class GenericOnebitLogicObject

initialize

public boolean initialize(java.lang.String s)
initialize the AddressDecoder object from a String, which contains the integer version id, the width of this vector, the gate delay, and four pairs of base | limit addresses for the four chip select outputs, e.g. 1001 16 1.0E-8 0 0 1 15 16 32767 32768 65535

Overrides:
initialize in class GenericOnebitLogicObject

evaluate

public void evaluate(java.lang.Object arg)
called whenever the address bus input changes. If the input value is undefined, the chip select outputs are set to StdLogic1164.X values. If the input value is a valid address, the four outputs signals are activated (0) or deactivated (1) depending on the address value. In each case, the assignments are delayed for t_delay.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class SimObject
Parameters:
arg - an arbitrary object argument

setOutput

public void setOutput(Port port,
                      StdLogic1164 value,
                      double time)

configure

public void configure()
construct a hades.gui.PropertySheet with fields for name, n_bits, delay, and the four (base/limit) address pairs.

Overrides:
configure in class GenericOnebitLogicObject

getToolTip

public java.lang.String getToolTip(java.awt.Point position,
                                   long millis)
construct a (short) tool tip message.

Specified by:
getToolTip in interface ContextToolTip
Overrides:
getToolTip in class SimObject