hades.models.pic
Class Pic16C84

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.pic.Pic16C84
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable, Wakeable
Direct Known Subclasses:
Pic16F84

public class Pic16C84
extends SimObject
implements Simulatable, java.io.Serializable, Wakeable

Handle all hades-events. This is the interface between hades and the Pic16C84-simulation.

See Also:
Serialized Form

Field Summary
(package private) static boolean[] _StdLogic1164ToBooleanTable
           
(package private)  int[] intValueA
           
(package private)  int[] intValueB
           
protected  int n_cycles
           
protected  PicExec pic
           
(package private)  Signal[] signalA
           
(package private)  Signal[] signalB
           
(package private)  Signal signalClkin
           
(package private)  Signal signalClkout
           
(package private)  Signal signalMclr
           
protected  double t_delay
           
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
Pic16C84()
           
 
Method Summary
 void configure()
          create and display a 'ConfigDialog' to set the parameters for a SimObject.
 boolean convertToBoolean(int value)
           
 boolean convertToBoolean(StdLogic1164 value)
           
 void createPicExec()
           
 void elaborate(java.lang.Object arg)
          initialize
 void evaluate(java.lang.Object arg)
          evaluate(): called by the simulation engine on all events that concern this object.
 java.lang.String[] getExternalResources()
          return a String[] array of length 1 with the program ROM init file.
 java.awt.Component getPropertySheet()
          return a reference to the 'property sheet' or configuration window for this SimObject.
 java.lang.String getToolTip(java.awt.Point position, long millis)
          construct a tool tip message (with the timing parameters)
 boolean initialize(java.lang.String s)
          initialize PicEprom from a String.
 boolean needsExternalResources()
          we use one external resource: the program ROM initialization file.
 java.lang.String toString()
          toString: generate a text description for this SimObject.
 void wakeup(java.lang.Object arg)
          Wdt-period is over
 void write(java.io.PrintWriter ps)
           
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, copy, getBindkey, getClassLoader, getDebug, getEditor, getFullName, getName, getParent, getPort, getPorts, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, 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

pic

protected PicExec pic

signalClkin

Signal signalClkin

signalClkout

Signal signalClkout

signalMclr

Signal signalMclr

signalA

Signal[] signalA

signalB

Signal[] signalB

intValueA

int[] intValueA

intValueB

int[] intValueB

n_cycles

protected int n_cycles

t_delay

protected double t_delay

_StdLogic1164ToBooleanTable

static boolean[] _StdLogic1164ToBooleanTable
Constructor Detail

Pic16C84

public Pic16C84()
Method Detail

createPicExec

public void createPicExec()

needsExternalResources

public boolean needsExternalResources()
we use one external resource: the program ROM initialization file.

Overrides:
needsExternalResources in class SimObject

getExternalResources

public java.lang.String[] getExternalResources()
return a String[] array of length 1 with the program ROM init file.

Overrides:
getExternalResources in class SimObject

toString

public java.lang.String toString()
Description copied from class: SimObject
toString: generate a text description for this SimObject. This method currently combines the class name for the SimObject (or subclass) and its full name in the current Hades Design, e.g. "hades.models.gates.And2: /uut/adder16/adder1/i3".

Overrides:
toString in class SimObject

getToolTip

public java.lang.String getToolTip(java.awt.Point position,
                                   long millis)
construct a tool tip message (with the timing parameters)

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

initialize

public boolean initialize(java.lang.String s)
initialize PicEprom from a String. Currently, the String should contain the following things: the Pic16C84-versionId, and the filename of the RAM datafile to parse, e.g.
       1001 /home/rink/hades/models/pic/echo232.rom
    

Overrides:
initialize in class SimObject

write

public void write(java.io.PrintWriter ps)
Overrides:
write in class SimObject

elaborate

public void elaborate(java.lang.Object arg)
initialize

Specified by:
elaborate in interface Simulatable
Overrides:
elaborate in class SimObject

wakeup

public void wakeup(java.lang.Object arg)
Wdt-period is over

Specified by:
wakeup in interface Wakeable
Parameters:
arg - unused argument

evaluate

public void evaluate(java.lang.Object arg)
Description copied from interface: Simulatable
evaluate(): called by the simulation engine on all events that concern this object. The object is responsible for updating its internal state and for scheduling all pending output events.

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

getPropertySheet

public java.awt.Component getPropertySheet()
Description copied from class: SimObject
return a reference to the 'property sheet' or configuration window for this SimObject. We cast the return value to an AWT Component, but typically you can expect either a hades.gui.PropertySheet or an java.awt.Window (Dialog or Frame).

Overrides:
getPropertySheet in class SimObject

configure

public void configure()
Description copied from class: SimObject
create and display a 'ConfigDialog' to set the parameters for a SimObject. The default ConfigDialog for the base class (SimObject) itself is empty except for the 'instance name' of the SimObject.

Overrides:
configure in class SimObject

convertToBoolean

public boolean convertToBoolean(int value)

convertToBoolean

public boolean convertToBoolean(StdLogic1164 value)