byucc.jhdl.apps.Stimulator
Class Stimulator

java.lang.Object
  extended bybyucc.jhdl.base.Nameable
      extended bybyucc.jhdl.base.Node
          extended bybyucc.jhdl.base.Cell
              extended bybyucc.jhdl.base.Structural
                  extended bybyucc.jhdl.Logic.LogicGates
                      extended bybyucc.jhdl.Logic.LogicStatic
                          extended bybyucc.jhdl.Logic.Logic
                              extended bybyucc.jhdl.apps.Stimulator.Stimulator
All Implemented Interfaces:
BooleanFlags, Browser, Clockable, byucc.jhdl.base.Propagateable, StimulatorConstants, TreeListable
Direct Known Subclasses:
TriStateStimulator

public class Stimulator
extends Logic
implements StimulatorConstants, Browser

An interactive stimulator. Used to put values to wires. The values to put may be determined interactively through the CLI user interface. They may also be determined by files that contain the schedule of values to put. The Stimulator extends Logic so that it is scheduled with the simulator. The clock method of this Stimulator is called according to the default clock set before construction of this object.

Author:
Anthony L. Slade

Field Summary
protected  byucc.jhdl.apps.Stimulator.ValueForcer[] _forcers
          Holds the ValueForcers associated with this Stimulator.
protected  boolean _risingEdgeTriggered
          Indicates if this Stimulator is rising-edge triggered or falling-edge triggered; true means this Stimulator will be clocked on the rising edge.
protected  Wire clockWire
          To remember the clock wire driving this TriStateStimulator
 
Fields inherited from class byucc.jhdl.Logic.Logic
ABOVE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_LSB, ALIGN_MSB, ALIGN_RIGHT, ALIGN_TOP, BELOW, DOWN, EAST_OF, LEFT_OF, MAX_PACK, NORTH_OF, ON, ONTOP, ONTOP_OF, RIGHT_OF, SOUTH_OF, TOLEFT, TORIGHT, UNCONSTRAINED, UP, WEST_OF
 
Fields inherited from class byucc.jhdl.Logic.LogicGates
tech_mapper
 
Fields inherited from class byucc.jhdl.base.Cell
BOOLEAN, CELL_NAME_DECLARATION, CellInterfaceDeterminesUniqueNetlistStructure, DETERMINE_FROM_STRING, GENERICS_DECLARATION, implicit_interface, IMPLICIT_INTERFACE_DECLARATION, INTEGER, INTERFACE_DECLARATION, LONG, PORT_IOS_DECLARATION, PORT_NAMES_DECLARATION, PORT_NET_NAMES_DECLARATION, PORT_PROPERTIES, PORT_WIDTHS_DECLARATION, SIGN_EXT, STRING, ZERO_PAD
 
Fields inherited from interface byucc.jhdl.apps.Stimulator.StimulatorConstants
CLITYPE, COMMAND_PUT, COMMAND_PUTLIST, DEFAULT_WIRE_SCHEDULE, HIGH_IMPEDANCE, JHDLOUTPUT_NAME
 
Fields inherited from interface byucc.jhdl.base.BooleanFlags
ANTECEDANT_IS_BEHAVIORALLY_MODELED, ASYNC_PORT, ASYNCHRONOUS_RESOLVED, ATOMICALLY_PLACEABLE, ATOMICALLY_UNMAPPABLE, BEHAVIORALLY_MODELED_BRANCH, CLK_PORT, CLOCK_METHOD_IMPLEMENTED_BY_USER, CLOCK_METHOD_IS_DISABLED, CLOCKABLE_IS_SCHEDULED, DANGLING_IS_OK, DELETE_MARK, FATAL_BUILD_ERROR_OCCURED, HAS_BEEN_TRACED, HAS_USER_SPECIFIED_NAME, HWUPDATE, IMPLICIT_PORT, IN_CLK_PORT, IN_PORT, INOUT_PORT, IO_TYPE_FLAGS, IS_BEHAVIORALLY_MODELED, IS_ON_BUILD_STACK, IS_ON_PROP_LIST, IS_PLACED, METHODS_IMPLEMENTED_BY_USER, NETLISTABLE, ORIG_WIRE_IS_ATOMIC, OUT_PORT, PLACEMENT_IS_LOCKED, PROPAGATE_METHOD_IMPLEMENTED_BY_USER, PROPAGATE_METHOD_IS_DISABLED, RECURSION_FLAG, RESET_METHOD_IMPLEMENTED_BY_USER, SIMULATEABLE, SOURCELESS_IS_OK, SYNC_PORT, VISIBLE
 
Constructor Summary
Stimulator(Node parent)
          Associates a new Stimulator with the given parent Node.
Stimulator(Node parent, java.util.Collection wires)
           
Stimulator(Node parent, java.util.Collection wires, java.io.File schedulesFile)
           
Stimulator(Node parent, java.util.Collection wires, java.io.InputStream schedulesStream)
           
Stimulator(Node parent, java.util.Collection wires, java.util.Properties schedules)
           
Stimulator(Node parent, java.util.Collection wires, java.lang.String schedulesFileName)
           
Stimulator(Node parent, Wire[] wires)
           
Stimulator(Node parent, Wire[] wires, java.io.File schedulesFile)
           
Stimulator(Node parent, Wire[] wires, java.io.InputStream schedulesStream)
           
Stimulator(Node parent, Wire[] wires, java.util.Properties schedules)
           
Stimulator(Node parent, Wire[] wires, java.lang.String schedulesFileName)
           
 
Method Summary
 void addWire(Wire wire)
          Add the given wire to the list of wires to stimulate.
 void addWire(Wire wire, java.lang.String schedule)
          Add the given wire to the list of wires to stimulate with the given schedule.
protected  void addWireAndForcer(Wire wire, java.lang.String schedule)
          Used to add the wire to this Stimulator and create a new ValueForcer for it
 void clock()
          The simulator will invoke this method to cause the next values to be put on the registered wires.
static java.lang.String get(java.lang.String wireName)
          Used to get the current value of a wire registered with a Stimulator.
static java.lang.String get(java.lang.String wireName, java.lang.String format)
          Used to get the current value of a wire registered with a Stimulator.
 Wire getClockWire()
          Allows acces to the clock wire by which this Stimulator is clocked.
static java.lang.String[] getRegisteredWireNames()
           
 boolean isFallingEdgeTriggered()
          Tells the simulator that if this is a falling-edge triggered cell.
 boolean isRisingEdgeTriggered()
          Tells the simulator that if this is a rising-edge triggered cell.
static void put(java.io.File scheduleFile)
          Opens the given Properties file and attempts to call put on each of the properties.
static void put(java.io.InputStream schedulesStream)
          Opens the given Properties input stream and attempts to call put on each of the properties.
static void put(java.util.Properties scheduleProperties)
          Opens the given Properties and attempts to call put on each of the properties.
static void put(java.lang.String scheduleFileName)
          Opens the given Properties file and attempts to call put on each of the properties.
static void put(java.lang.String wireName, java.lang.String schedule)
          Puts the new value or schedule on the wire of the given name
static void put(java.lang.String wireName, java.lang.String[] schedule)
          Puts the new value or schedule on the wire of the given name
static void put(Wire wire, java.lang.String schedule)
          Puts the new value or schedule on the given wire
static void put(Wire wire, java.lang.String[] schedule)
          Puts the new value or schedule on the given wire
static void registerCLICommands(CLInterpreter interp)
          Creates a set of CLI commands for the Stimulator.
 void removeWire(java.lang.String wireName)
          Removes the wire of the given name from the wires stimulated by this Stimulator
static void removeWireFromAllStimulators(java.lang.String wireName)
          If the named wire is currently added to any existing Stimulator, then it is removed.
 void reset()
          Resets all of the registered wires according to the reset method of the ValueForcers for each wire
protected  void subClassDelete()
          Makes sure that all of the wires are removed from this Stimulator before the Stimulator itself is deleted.
 
Methods inherited from class byucc.jhdl.Logic.Logic
clockDriver, clockDriver, connect_implicit_ports, connectImplicitPorts, constructSubCell, constructSubCellNoImplicitPorts, enableNewPlacement, enableNewPlacement, extend, extend, getDefaultClock, getDefaultTechMapper, getGlobalClock, getSinkCell, getSourceCell, getSourceCell, getSourceLeaf, getSourcePlaceable, getSourcePlaceableLeaf, getSubCellClass, getTechMapHint, getTechMapHint, getTechMapper, growAndShiftl, lockChildPlacement, lsb, lsb, map, map, map, map, map, map, map, map, map, map, map, map, map, map, map, map, map, map, map, msb, msb, msbIndx, netlist, netlist, netlist, netlist, netlist, netlist, netlist, netlist, padClock_o, padClock_o, padClock_o, padClock, padClock, padClock, padIn_o, padIn_o, padIn_o, padIn, padIn, padIn, padInout_o, padInout_o, padInout_o, padInout, padInout, padInout, padOut_o, padOut_o, padOut_o, padOut, padOut, padOut, padOutT_o, padOutT_o, padOutT_o, padOutT, padOutT, padOutT, place, place, place, place, place, place, place, place, place, place, place, place, place, place, place, place, place, printTechMapHints, range, rotate, rotate, scale, scale, setBBox, setDefaultTechMapper, setFloorPlannerIsMaster, setTechMappingEnabled, setWandH, signExtend_o, signExtend, signExtend, sink, source, takeBot_o, takeBot, takeBot, takeBotSigned_o, takeBotSigned, takeTop_o, takeTop, takeTop, techmap, techMappingEnabled, translate, translate, zeroExtend_o, zeroExtend, zeroExtend, zeroExtendRight_o, zeroExtendRight
 
Methods inherited from class byucc.jhdl.Logic.LogicStatic
add_o, add_o, and_o, and_o, and, and, buf_o, buf_o, buf, buf, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant, constant, constant, constant, constant, constant, constant, constant, constant, constant, gnd_o, gnd_o, gnd, gnd, gnd, gnd, mux_o, mux, nc, nc, nc, nc, nc, nc, not_o, not_o, not, not, or_o, or_o, or, or, reg_o, reg, vcc_o, vcc_o, vcc, vcc, vcc, vcc, wire, wire, wire, wire, xnor_o, xnor_o, xnor, xor_o, xor
 
Methods inherited from class byucc.jhdl.Logic.LogicGates
add_o, add_o, add_o, add_o, add_o, add_o, add, add, add, add, addsub_o, addsub_o, addsub_o, addsub_o, addsub_o, addsub_o, addsub, addsub, addsub, addsub, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and_o, and, and, and, and, and, and, and, and, and, and, and, and, and, and, and, and, and, and, ashiftr_o, ashiftr, ashiftr, buf_o, buf_o, buf, buf, checkValueRepresentableInWidth, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat_o, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant_o, constant, constant, constant, constant, constant, constant, constant, constant, constant, constant, gnd_o, gnd_o, gnd, gnd, gnd, gnd, mux_o, mux_o, mux_o, mux_o, mux_o, mux_o, mux, mux, mux, mux, mux, mux, name, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand_o, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nand, nc, nc, nc, nc, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor_o, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, nor, not_o, not_o, not, not, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or_o, or, or, or, or, or, or, or, or, or, or, or, or, or, or, or, or, or, or, pulldown, pulldown, pullup, pullup, reg_o, reg_o, reg_o, reg_o, reg, reg, reg, reg, regc_o, regc_o, regc_o, regc_o, regc, regc, regc, regc, regce_o, regce_o, regce_o, regce_o, regce, regce, regce, regce, regp_o, regp_o, regp_o, regp_o, regp, regp, regp, regp, regpe_o, regpe_o, regpe_o, regpe_o, regpe, regpe, regpe, regpe, regr_o, regr_o, regr_o, regr_o, regr, regr, regr, regr, regre_o, regre_o, regre_o, regre_o, regre, regre, regre, regre, regs_o, regs_o, regs_o, regs_o, regs, regs, regs, regs, regse_o, regse_o, regse_o, regse_o, regse, regse, regse, regse, shiftl_o, shiftl, shiftl, shiftr_o, shiftr, shiftr, sub_o, sub_o, sub_o, sub_o, sub_o, sub_o, sub, sub, sub, sub, tbuf_o, tbuf_o, tbuf, tbuf, vcc_o, vcc_o, vcc, vcc, vcc, vcc, wire, wire, wire, wire, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor_o, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xnor, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor_o, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor, xor
 
Methods inherited from class byucc.jhdl.base.Structural
behavioralModelIsAvailable, clockMethodIsDisabled, clockMethodIsDisabled, clockMethodIsEnabled, clockMethodIsEnabled, defaultSimulationModelIsBehavioral, hasBeenTraced, hasBeenTraced, hasBehaviorInClockMethod, hasBehaviorInPropagateMethod, isAsynchronouslyScheduled, isAsynchronouslyScheduled, isReadyToBeAsynchronouslyScheduled, needsToBeAsynchronouslyScheduled, needsToBeClocked, propagate, propagateMethodIsDisabled, propagateMethodIsDisabled, propagateMethodIsEnabled, propagateMethodIsEnabled, willUseHWUpdate, willUseHWUpdate
 
Methods inherited from class byucc.jhdl.base.Cell
addPort, addPorts, addProperties, addProperties, addProperty, addProperty, addProperty, addProperty, antecedantIsBehaviorallyModeled, antecedantIsBehaviorallyModeled, bind, bind, bind, bind, cellInterfaceDeterminesUniqueNetlistStructure, clk, connect, connectAllWires, connectOptional, disableAllBehavioralModels, disableBehavioralModel, enableBehavioralModel, getArgument, getAttachedPort, getAttachedWire, getAttachedWireNoException, getCellName, getCellNetlist, getCellNetList, getCellNetlist, getCellNetlist, getDescendents, getFlatNetlist, getFlatNetlistableChildren, getGeneric, getHeight, getNetlistableChildren, getPlacementInfo, getPortProperties, getPortRecord, getPortRecords, getProperties, getProperty, getPropertyValue, getSinkWires, getSourceWires, getUniqueCellName, getWidth, getX, getY, hasPort, hasPorts, in, in, inout, inout, isAsynchronousSourceSinkResolved, isBehaviorallyModeled, isBehaviorallyModeledBranch, isInput, isLeafCell, isNetlistable, isNetlistable, isNetlistablePort, isNetlistLeaf, isNotNetlistable, isNotNetlistablePort, isNotVisible, isOutput, isPlaceable, isPlaceable, isPlaced, isPlaced, isPlacementLocked, isRoot, isSimulateable, isSimulateable, isSink, isSource, isVisible, isVisible, join, lockPlacement, nc, out, out, param, popHierarchy, port, port, port, postorderCheck, preorderCheck, pushHierarchy, pushHierarchy, pushHierarchy, pushHierarchy, pushHierarchyNoImplicitPorts, pushHierarchyNoImplicitPorts, removeAllUnconnectedPorts, removePort, removeProperty, replaceProperty, replaceProperty, resetBehavioralModelsToDefaults, setAsynchronousSourceSinkResolved, setGeneric, setHeight, setNotNetlistable, setNotNetlistable, setNotVisible, setNotVisible, setPlacementInfo, setPortNotNetlistable, setPortNotNetlistable, setProperty, setWidth, toString, uniquifyCell, userDefinedClockCount, verifyAndCleanup
 
Methods inherited from class byucc.jhdl.base.Node
addObservable, addSimulatorCallback, checkAll, delete, getBuildingFlag, getChildren, getChildrenEnumeration, getInstanceName, getParent, getParentCell, getRelatives, getSystem, getWires, optimize, orphanAllowed, printAllChildren, printTree, removeSimulatorCallback, setDefaultClock
 
Methods inherited from class byucc.jhdl.base.Nameable
caseSensitivity, caseSensitivity, disableNameClashChecking, getFullName, getFullNameNoTestBench, getHierNameNoTestBench, getInstanceNo, getInstanceNumber, getLeafName, getLeafName, getRelativeName, getUserName, getUserName, hasUserSpecifiedName, isDescendantOf, setInstanceNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_forcers

protected byucc.jhdl.apps.Stimulator.ValueForcer[] _forcers
Holds the ValueForcers associated with this Stimulator.


_risingEdgeTriggered

protected boolean _risingEdgeTriggered
Indicates if this Stimulator is rising-edge triggered or falling-edge triggered; true means this Stimulator will be clocked on the rising edge. Functionality for changing this value is not yet implemented, but can be if people scream for it enough.


clockWire

protected Wire clockWire
To remember the clock wire driving this TriStateStimulator

Constructor Detail

Stimulator

public Stimulator(Node parent)
Associates a new Stimulator with the given parent Node. Wires may be added using the @see addWire(Wire) and @see addWire(Wire,String) methods.

Parameters:
parent - the owner/parent of the wires.

Stimulator

public Stimulator(Node parent,
                  java.util.Collection wires)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The collection could be a Vector, ArrayList, HashSet, etc. The wires must be connected to the input ports of the given cell.

Stimulator

public Stimulator(Node parent,
                  Wire[] wires)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The wires must be connected to the input ports of the given cell.

Stimulator

public Stimulator(Node parent,
                  java.util.Collection wires,
                  java.lang.String schedulesFileName)
           throws java.io.FileNotFoundException
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The collection could be a Vector, ArrayList, HashSet, etc. The wires must be connected to the input ports of the given cell.
schedulesFileName - the name of a file containing schedules of values to put on the wires listed in that file. The format of the file must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  java.util.Collection wires,
                  java.io.File schedulesFile)
           throws java.io.FileNotFoundException
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The collection could be a Vector, ArrayList, HashSet, etc. The wires must be connected to the input ports of the given cell.
schedulesFile - the file containing schedules of values to put on the wires listed in that file. The format of the file must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  java.util.Collection wires,
                  java.io.InputStream schedulesStream)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The collection could be a Vector, ArrayList, HashSet, etc. The wires must be connected to the input ports of the given cell.
schedulesStream - an InputStream containing schedules of values to put on the wires listed in that file. The format of the stream must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  java.util.Collection wires,
                  java.util.Properties schedules)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The collection could be a Vector, ArrayList, HashSet, etc. The wires must be connected to the input ports of the given cell.
schedules - the properties of this parameter should contain values to put on the wires listed as keys in the object, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  Wire[] wires,
                  java.lang.String schedulesFileName)
           throws java.io.FileNotFoundException
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The wires must be connected to the input ports of the given cell.
schedulesFileName - the name of a file containing schedules of values to put on the wires listed in that file. The format of the file must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  Wire[] wires,
                  java.io.File schedulesFile)
           throws java.io.FileNotFoundException
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The wires must be connected to the input ports of the given cell.
schedulesFile - the file containing schedules of values to put on the wires listed in that file. The format of the file must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  Wire[] wires,
                  java.io.InputStream schedulesStream)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The wires must be connected to the input ports of the given cell.
schedulesStream - an InputStream containing schedules of values to put on the wires listed in that file. The format of the stream must be as described in the API for the load method of the class java.util.Properties, with the values being separated by spaces or commas.

Stimulator

public Stimulator(Node parent,
                  Wire[] wires,
                  java.util.Properties schedules)
Parameters:
parent - the owner/parent of the given wires.
wires - the wires to stimulate. The wires must be connected to the input ports of the given cell.
schedules - the properties of this parameter should contain values to put on the wires listed as keys in the object, with the values being separated by spaces or commas.
Method Detail

addWire

public void addWire(Wire wire)
Add the given wire to the list of wires to stimulate. The DEFAULT_WIRE_SCHEDULE is applied to the wire

Parameters:
wire - wire to add to the set of wire stimulated by this Stimulator

addWire

public void addWire(Wire wire,
                    java.lang.String schedule)
Add the given wire to the list of wires to stimulate with the given schedule.

Parameters:
wire - wire to add to the set of wire stimulated by this Stimulator. If wire is null, this method does nothing.
schedule - the value(s) to put on the wire

clock

public void clock()
The simulator will invoke this method to cause the next values to be put on the registered wires.

Specified by:
clock in interface Clockable
Overrides:
clock in class Structural

subClassDelete

protected void subClassDelete()
Makes sure that all of the wires are removed from this Stimulator before the Stimulator itself is deleted. This method is called when delete() is called

Overrides:
subClassDelete in class Cell

get

public static java.lang.String get(java.lang.String wireName)
                            throws StimulatorException
Used to get the current value of a wire registered with a Stimulator. The format of the value string is the default from the byucc.jhdl.base.BV class.

Parameters:
wireName - the name of the wire to get the value of
Returns:
the current value on the given wire
Throws:
StimulatorException - if the Wire doesn't exist or has a WireValueException associated with it

get

public static java.lang.String get(java.lang.String wireName,
                                   java.lang.String format)
                            throws StimulatorException
Used to get the current value of a wire registered with a Stimulator. The format of the value string is customized by the given format string.

Parameters:
wireName - the name of the wire to get the value of
format - the custom formatting for the value. The syntax for this format string is defined in byucc.jhdl.util.BVFormat.BVFormat.
Returns:
the current value on the given wire with a custom format
Throws:
StimulatorException - if the Wire doesn't exist or has a WireValueException associated with it

getClockWire

public Wire getClockWire()
Allows acces to the clock wire by which this Stimulator is clocked. This is useful for getting the clock for this Stimulator even after the build stack has gone away. Custom ValueProviders may want to use this get information about the clock

Returns:
the clock wire for this stimulator

getRegisteredWireNames

public static java.lang.String[] getRegisteredWireNames()
Returns:
the leaf names of all of the wires registered with any Stimulator

isFallingEdgeTriggered

public boolean isFallingEdgeTriggered()
Tells the simulator that if this is a falling-edge triggered cell. Overrides the method in Structural.

Specified by:
isFallingEdgeTriggered in interface Clockable
Overrides:
isFallingEdgeTriggered in class Structural
Returns:
true if falling-edge triggered

isRisingEdgeTriggered

public boolean isRisingEdgeTriggered()
Tells the simulator that if this is a rising-edge triggered cell. Overrides the method in Structural.

Specified by:
isRisingEdgeTriggered in interface Clockable
Overrides:
isRisingEdgeTriggered in class Structural
Returns:
true if rising-edge triggered

put

public static void put(java.lang.String wireName,
                       java.lang.String schedule)
                throws StimulatorException
Puts the new value or schedule on the wire of the given name

Parameters:
wireName - the name of the wire to which to put
schedule - the value(s) to put; a space- and/or comma-separated list of values.
Throws:
StimulatorException

put

public static void put(java.lang.String wireName,
                       java.lang.String[] schedule)
                throws StimulatorException
Puts the new value or schedule on the wire of the given name

Parameters:
wireName - the name of the wire to which to put
schedule - the value(s) to put.
Throws:
StimulatorException

put

public static void put(Wire wire,
                       java.lang.String schedule)
                throws StimulatorException
Puts the new value or schedule on the given wire

Parameters:
wire - the wire to which to put
schedule - the value(s) to put; a space- and/or comma-separated list of values.
Throws:
StimulatorException

put

public static void put(Wire wire,
                       java.lang.String[] schedule)
                throws StimulatorException
Puts the new value or schedule on the given wire

Parameters:
wire - the wire to which to put
schedule - the value(s) to put.
Throws:
StimulatorException

put

public static void put(java.lang.String scheduleFileName)
                throws StimulatorException
Opens the given Properties file and attempts to call put on each of the properties. The property keys should be wire names and the values should be wire value schedules.

Parameters:
scheduleFileName - Name of the file that contains the wire schedule properties
Throws:
StimulatorException

put

public static void put(java.io.File scheduleFile)
                throws StimulatorException
Opens the given Properties file and attempts to call put on each of the properties. The property keys should be wire names and the values should be wire value schedules.

Parameters:
scheduleFile - Name of the file that contains the wire schedule properties
Throws:
StimulatorException

put

public static void put(java.io.InputStream schedulesStream)
                throws StimulatorException
Opens the given Properties input stream and attempts to call put on each of the properties. The property keys should be wire names and the values should be wire value schedules.

Parameters:
schedulesStream - Name of the file that contains the wire schedule properties
Throws:
StimulatorException

put

public static void put(java.util.Properties scheduleProperties)
                throws StimulatorException
Opens the given Properties and attempts to call put on each of the properties. The property keys should be wire names and the values should be wire value schedules.

Parameters:
scheduleProperties - Name of the file that contains the wire schedule properties
Throws:
StimulatorException

registerCLICommands

public static void registerCLICommands(CLInterpreter interp)
Creates a set of CLI commands for the Stimulator. The commands can be used to do puts

Parameters:
interp - the CLInterpreter for the commands

reset

public void reset()
Resets all of the registered wires according to the reset method of the ValueForcers for each wire

Specified by:
reset in interface Clockable
Overrides:
reset in class Structural

removeWire

public void removeWire(java.lang.String wireName)
Removes the wire of the given name from the wires stimulated by this Stimulator

Parameters:
wireName - the name of the wire to remove

removeWireFromAllStimulators

public static void removeWireFromAllStimulators(java.lang.String wireName)
If the named wire is currently added to any existing Stimulator, then it is removed. A wire should only be associated with one Stimulator at a time.

Parameters:
wireName - the name of the wire to remove

addWireAndForcer

protected void addWireAndForcer(Wire wire,
                                java.lang.String schedule)
Used to add the wire to this Stimulator and create a new ValueForcer for it

Parameters:
wire - the wire to add
schedule - the schedule for the wire


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.