byucc.jhdl.apps.Tbone
Class Tbone

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.Tbone.Tbone
All Implemented Interfaces:
BooleanFlags, Checkpointable, CLICommandListener, Clockable, HardwareInterface, byucc.jhdl.base.Propagateable, TestBench, TreeListable

public class Tbone
extends Logic
implements TestBench, HardwareInterface, CLICommandListener, Checkpointable

Tbone is a generic test bench used to simulate a circuit.

Tbone will create a test bench environment in which the user can put values on the in ports and watch the simmulation of the circuit.

In order to use Tbone on a design that design must have a cell interface that has the same number of ports in the cell interface as wires in the first constructer. These ports and wires must be in the same order so Tbone can match the ports and wires.


Field Summary
 
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.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
Tbone(Node parent)
           
Tbone(Node parent, java.lang.String[] argv)
           
 
Method Summary
 void buildCommands()
           
 void CLICommandEventFired(CLICommandEvent e)
           
 void clock()
          Users define synchronous behavior in this method using standard JHDL constructs.
 boolean compareBehav()
           
 int convertBaseToDecimal(java.lang.String st)
           
 long convertLongBaseToDecimal(java.lang.String st)
           
 java.lang.Object execute()
           
 int getClockCycles()
           
 int getClockSteps()
           
 int getCycles()
           
 java.io.Serializable getData()
          Called by the checkpointing code to get all of the data that should be checkpointed.
 StateObject getHardwareState(ExternallyUpdateable[] eCells, LargeExternallyUpdateable[] leCells, Checkpointable[] cCells)
          Returns the hardware state
 HWSystem getHWSystem()
           
 java.lang.String[] getInNames()
           
 boolean getInsertPads()
          Returns the current setting of insertPads.
 java.lang.String getModuleName()
          Returns the hardware module name
 int getNumInoutPorts()
           
 int getNumInPorts()
           
 int getNumOutPorts()
           
 java.lang.String[] getParamNames()
           
 java.lang.String[] getPortNames()
           
 java.lang.String[] getTargetNames()
           
 boolean hasNoMoreLines()
           
 void holdTb()
           
 boolean isBuilt()
           
 boolean isHeld()
           
 boolean isMultiClockMode()
           
 boolean isReady()
           
 boolean isSimulateOnly()
           
 boolean isTestSuccessful()
           
 boolean isVecHasOutput()
           
 boolean isVerifyOnly()
           
 boolean isWithFileOutput()
           
 void loadNewClass()
           
static void main(java.lang.String[] argv)
           
 void netlist(java.lang.String cellname, java.lang.String filename, boolean insertPads)
           
 void printFileEndln()
           
 void printlnOut(java.lang.String fileMessage)
           
 void printOut(java.lang.String fileMessage)
           
 void releaseTb()
           
 void reset()
          If you define a behavior, you must also define a reset method for resetting the synchonous part of your model.
 void setBrowserCore(BrowserCore bCore)
           
 void setConsole(CLInterpreter cli)
           
 void setData(java.io.Serializable data)
          This is called on a checkpoint restore, and the object checkpointed out is passed back in.
 void setNumInoutPorts(int val)
           
 void setNumInPorts(int val)
           
 void setNumOutPorts(int val)
           
 void setTestSuccessful(boolean val)
           
 void stepHardwareClock(int clock_count)
          Steps the hardware clock
 void targetMapper(java.lang.String mapper, java.lang.String name)
           
 void targetMapper(java.lang.String mapper, java.lang.String name, boolean techMappingEnabled)
           
 void useVectorFile(int size, boolean withOutput)
           
 
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, isFallingEdgeTriggered, isReadyToBeAsynchronouslyScheduled, isRisingEdgeTriggered, 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, subClassDelete, 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
 

Constructor Detail

Tbone

public Tbone(Node parent)

Tbone

public Tbone(Node parent,
             java.lang.String[] argv)
Method Detail

main

public static void main(java.lang.String[] argv)

reset

public void reset()
Description copied from class: Structural
If you define a behavior, you must also define a reset method for resetting the synchonous part of your model. If the user forgets to implement this, he will be reminded at simulation time.

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

clock

public void clock()
Description copied from class: Structural
Users define synchronous behavior in this method using standard JHDL constructs. The simulator detects whether clock() has been implemented by calling this function directly and checking for an exception.

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

loadNewClass

public void loadNewClass()

useVectorFile

public void useVectorFile(int size,
                          boolean withOutput)

holdTb

public void holdTb()

releaseTb

public void releaseTb()

isReady

public boolean isReady()

convertBaseToDecimal

public int convertBaseToDecimal(java.lang.String st)
                         throws java.lang.StringIndexOutOfBoundsException,
                                java.lang.NumberFormatException
Throws:
java.lang.StringIndexOutOfBoundsException
java.lang.NumberFormatException

convertLongBaseToDecimal

public long convertLongBaseToDecimal(java.lang.String st)
                              throws java.lang.StringIndexOutOfBoundsException,
                                     java.lang.NumberFormatException
Throws:
java.lang.StringIndexOutOfBoundsException
java.lang.NumberFormatException

printOut

public void printOut(java.lang.String fileMessage)

printlnOut

public void printlnOut(java.lang.String fileMessage)

printFileEndln

public void printFileEndln()

isMultiClockMode

public boolean isMultiClockMode()

isSimulateOnly

public boolean isSimulateOnly()

isVerifyOnly

public boolean isVerifyOnly()

isWithFileOutput

public boolean isWithFileOutput()

hasNoMoreLines

public boolean hasNoMoreLines()

compareBehav

public boolean compareBehav()

setTestSuccessful

public void setTestSuccessful(boolean val)

isTestSuccessful

public boolean isTestSuccessful()

isVecHasOutput

public boolean isVecHasOutput()

isHeld

public boolean isHeld()

isBuilt

public boolean isBuilt()

getClockCycles

public int getClockCycles()

getClockSteps

public int getClockSteps()

getCycles

public int getCycles()

setNumInPorts

public void setNumInPorts(int val)

setNumOutPorts

public void setNumOutPorts(int val)

setNumInoutPorts

public void setNumInoutPorts(int val)

getNumInPorts

public int getNumInPorts()

getNumOutPorts

public int getNumOutPorts()

getNumInoutPorts

public int getNumInoutPorts()

setConsole

public void setConsole(CLInterpreter cli)

setBrowserCore

public void setBrowserCore(BrowserCore bCore)

buildCommands

public void buildCommands()

netlist

public void netlist(java.lang.String cellname,
                    java.lang.String filename,
                    boolean insertPads)

getInsertPads

public boolean getInsertPads()
Returns the current setting of insertPads.

Returns:
returns true if the Techmapper is set to insert pads, otherwise returns false.

targetMapper

public void targetMapper(java.lang.String mapper,
                         java.lang.String name)

targetMapper

public void targetMapper(java.lang.String mapper,
                         java.lang.String name,
                         boolean techMappingEnabled)

getModuleName

public java.lang.String getModuleName()
Description copied from interface: HardwareInterface
Returns the hardware module name

Specified by:
getModuleName in interface HardwareInterface
Returns:
the name of the hardware

stepHardwareClock

public void stepHardwareClock(int clock_count)
Description copied from interface: HardwareInterface
Steps the hardware clock

Specified by:
stepHardwareClock in interface HardwareInterface
Parameters:
clock_count - How many cycles to clock

getHWSystem

public HWSystem getHWSystem()

getHardwareState

public StateObject getHardwareState(ExternallyUpdateable[] eCells,
                                    LargeExternallyUpdateable[] leCells,
                                    Checkpointable[] cCells)
Description copied from interface: HardwareInterface
Returns the hardware state

Specified by:
getHardwareState in interface HardwareInterface
Parameters:
eCells - the ExternallyUpdateable cells to look at
leCells - the LargeExternallyUpdateable cells to look at
cCells - the Checkpointable cells to look at
Returns:
the hardware state

CLICommandEventFired

public void CLICommandEventFired(CLICommandEvent e)
Specified by:
CLICommandEventFired in interface CLICommandListener

execute

public java.lang.Object execute()

getParamNames

public java.lang.String[] getParamNames()

getPortNames

public java.lang.String[] getPortNames()

getInNames

public java.lang.String[] getInNames()

getTargetNames

public java.lang.String[] getTargetNames()

getData

public java.io.Serializable getData()
Description copied from interface: Checkpointable
Called by the checkpointing code to get all of the data that should be checkpointed. The data in the object returned should include all literal values last "put" onto all output wires, and any internal state that must be saved

Specified by:
getData in interface Checkpointable
Returns:
all state to be saved

setData

public void setData(java.io.Serializable data)
Description copied from interface: Checkpointable
This is called on a checkpoint restore, and the object checkpointed out is passed back in. In this function it is the responsibility of the circuit to do "put"s on all output wires using the *literal* (non-calculated) values checkpointed.

Specified by:
setData in interface Checkpointable
Parameters:
data - the state that was saved earlier


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