byucc.jhdl.apps.dtb
Class DynamicTestBench

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.dtb.DynamicTestBench
All Implemented Interfaces:
BooleanFlags, Clockable, byucc.jhdl.base.Propagateable, TestBench, TreeListable

public class DynamicTestBench
extends Logic
implements TestBench

The DynamicTestBench acts as a quick replacement for a full, formal TestBench written by the user. The DynamicTestBench is especially useful for quickly loading up small circuits into the JHDL simulator to perform basic circuit verification. Nevertheless, the DynamicTestBench can also perform more powerful TestBench operations by using a combination of the more powerful features of the @link byucc.jhdl.Stimulator.Stimulator Stimulator class and CLI scripts. The main limitation at this time is that Stimulator objects connected to the top-level inputs of the design all belong to the default clock; more specific, multi-clock control can only be done in user-written TestBenches.
The DynamicTestBench loads in the user's design with reflection. The first constructor found in the Java class file is assumed to be the target constructor. The order of the wires in this constructor must match the order of the ports listed in the cell_interface of the design. The constructor may also have non-port/wire parameters (of types INTEGER, BOOLEAN, STRING, or LONG). The constructor must have a parameter for the parent of type Node, Cell or Logic, which will be this DynamicTestBench.
The following table summarizes the requirements for the first constructor of the design:

Parameter Type Parameter Class Position In Constructor Required?
Parent Node byucc.jhdl.base.Node anywhere yes
Port Wire (IN|OUT|INOUT) byucc.jhdl.base.Wire Ordered according to order of cell_interface if in cell_interface
Cell INTEGER Parameter int anywhere no
Cell BOOLEAN Parameter boolean anywhere no
Cell STRING Parameter String anywhere no
Cell LONG Parameter long anywhere no

Each of the top-level input ports is connected to a Stimulator object to drive the inputs. The default value to drive is zero (or Z if it is an inout port), which can be modified through the put CLI command.
The DynamicTestBench can be started from a command line. Run java byucc.jhdl.apps.dtb.DynamicTestBench --help for information on command line arguments. The DynamicTestBench may also be used directly through its constructors and other methods to create a TestBench for your circuit.

Author:
Anthony L. Slade
See Also:
Stimulator class

Field Summary
static boolean DEFAULT_AUTO_BUILD_WHEN_PARAMS_SET
          The default setting for automatically building once all of the parameters have been set.
static java.lang.String DEFAULT_CLOCK_SCHEDULE
          The default clock schedule.
static int DEFAULT_CONSTRUCTOR_INDEX
          The default index into the list of constructors to use in building the design
static java.lang.String[] DEFAULT_TECHNOLOGIES
          List of default technologies supported by entering just to following short names without having to enter the fully qualified package and class name.
static java.lang.Class[] DEFAULT_TECHNOLOGIES_CLASSES
          These are the classes of the entries in DEFAULT_TECHNOLOGIES.
static java.lang.String OPTION_ADDITIONAL_ARGS_SEPARATOR
          Command line option to separate non-dtb arguments
static java.lang.String OPTION_AUTOBUILD
          Command line option to indicate autobuild policy
static java.lang.String OPTION_CLOCK_SCHEDULE
          Command line option to indicate default clock schedule
static java.lang.String OPTION_CONSTRUCTOR
          Command line option to select constructor
static java.lang.String OPTION_DESKTOP
          Command line option to indicate preference for cvtDesktop
static java.lang.String OPTION_SCRIPT
          Command line option to execute a CLI script
static java.lang.String OPTION_TABBED
          The flag used on the command line to specify that the tabbed pane will be used instead of the window for viewing schematics
static java.lang.String OPTION_TECHMAP
          Command line option to enable technology location mapping
static java.lang.String OPTION_TECHNOLOGY
          Command line option to select technology
static java.lang.String OPTION_VERSION
          Command line option to show JHDL version
static java.lang.String UNSET_SUFFIX
          The getPortSettings method puts an entry that ends with this string for every port that has not been set yet.
 
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
DynamicTestBench(Node parent, java.lang.Class childclass)
           
DynamicTestBench(Node parent, java.lang.Class childclass, boolean tabbed)
          Builds a DynamicTestBench from a HardwareSystem parent and a given class as a child.
DynamicTestBench(Node parent, java.lang.String childname)
           
DynamicTestBench(Node parent, java.lang.String childname, boolean tabbed)
          Builds a DynamicTestBench from a HardwareSystem parent and a given class name as a child.
 
Method Summary
static void addAutobuildListener(AutobuildListener al)
           
 void addBuildListener(BuildListener bl)
           
 void addClockScheduleListener(ClockScheduleListener csl)
           
 void addConstructorListener(ConstructorListener cl)
           
 void addConstructorParamListener(ConstructorParamListener cpl)
           
 void addParamListener(ParamListener pl)
           
 void addParamTypesListener(ParamTypesListener ptl)
           
 void addPortSettingsListener(PortSettingsListener psl)
           
 void buildCell()
          Once all of the necessary parameters have been set, this method is called to actually invoke the constructor to build the user's cell.
static java.lang.String[] getAdditionalArguments()
          This method is used to obtain the set of additional arguments passed on to the main method.
static boolean getAutoBuildWhenParamsSetSetting()
          Returns the setting of _autoBuildWhenParamsSet
static CLInterpreter getCLInterpreter()
           
static java.lang.String getClockSchedule()
           
 java.lang.Object[][] getConstructor()
          Returns the current constructor argument types and current settings
 int getConstructorIndex()
          Returns the index of the currently selected constructor
 java.lang.String getDesignClassName()
          Returns the class name of the design to build
static java.lang.String getDTBClassName()
          This method returns the name of the DynamicTestBench class or one of its subclasses if the subclass has set the value of _dtbClassName
static java.lang.String getHelpString()
          This string is displayed on the command line by invoking this class with a --help argument
 int getNumConstructors()
          Returns the number of constructors for the design class
 java.lang.Object[][] getParameters()
          Returns a list of the settings of the non-Wire and non-Node constructor parameters.
 java.lang.String[][] getPortParams()
          Returns a list of the parameters, if any, for ports of unbound width, along with their current settings.
 java.lang.Object[][] getPorts()
          Returns a list of the names of all of the ports, their widths (or their width parameter name), and their current wire association.
 boolean isCellBuilt()
          Way to tell if the cell has been built yet.
 boolean isTabbed()
          returns true if the tabbed pane will be used, false otherwise.
static void main(java.lang.String[] args)
          Execute this method with the argument --help for usage information
 void netlist(java.lang.String cellname, java.lang.String filename, boolean insertPads)
          Called by the CLI command Netlist to generate a netlist of the given cell
static void removeAutobuildListener(AutobuildListener al)
          removes the given AutobuildListener from the list of listeners
 void removeListener(DTBListener listener)
          Removes the given DTBListener from the all of the lists of listeners
static void setAutoBuildWhenParamsSet(boolean value)
          Determines whether or not DynamicTestBench will automatically build the user's design once all of the previously unset parameters have been specified.
 void setCLInterpreter(CLInterpreter interpreter)
          Creates CLICommand classes to interpret command lines to assist in manipulating the parameters of the DynamicTestBench
static void setClockSchedule(java.lang.String schedule)
          Used by the CLI interface and the main method to set up the clock schedule for this dtb
 void setInstanceConstructorIndex(int index)
          If the original constructor used to initialize the build of the design was not the value of index given to this method, then the build initialization process will restart with the given index for the constructor.
 void setParam(java.lang.String name)
          Sets the parameter of the given name.
 void setParam(java.lang.String name, java.lang.String value)
          Sets the parameter of the given name to the given value
 void setPortParam(java.lang.String paramName, int value)
          Sets the parameter of the given index to the given value
 void setSelectedCell(Cell selected)
          Sets the currently selected cell to the given value
static void setStaticConstructorIndex(int index)
          Sets the index of the constructor to use in building the design.
static void setTechMapper(java.lang.String mapper)
          Sets the current Technology Mapper (byucc.jhdl.Logic.TechMapper) for the design.
static void setTechMapper(java.lang.String mapper, boolean techMappingEnabled)
          Sets the current Technology Mapper (byucc.jhdl.Logic.TechMapper) for the design.
protected static void setThisClassName(java.lang.String name)
          Used by subclasses to set the name of this class.
 
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, clock, clockMethodIsDisabled, clockMethodIsDisabled, clockMethodIsEnabled, clockMethodIsEnabled, defaultSimulationModelIsBehavioral, hasBeenTraced, hasBeenTraced, hasBehaviorInClockMethod, hasBehaviorInPropagateMethod, isAsynchronouslyScheduled, isAsynchronouslyScheduled, isFallingEdgeTriggered, isReadyToBeAsynchronouslyScheduled, isRisingEdgeTriggered, needsToBeAsynchronouslyScheduled, needsToBeClocked, propagate, propagateMethodIsDisabled, propagateMethodIsDisabled, propagateMethodIsEnabled, propagateMethodIsEnabled, reset, 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
 

Field Detail

DEFAULT_CLOCK_SCHEDULE

public static final java.lang.String DEFAULT_CLOCK_SCHEDULE
The default clock schedule.

See Also:
Constant Field Values

DEFAULT_CONSTRUCTOR_INDEX

public static final int DEFAULT_CONSTRUCTOR_INDEX
The default index into the list of constructors to use in building the design

See Also:
Constant Field Values

DEFAULT_AUTO_BUILD_WHEN_PARAMS_SET

public static final boolean DEFAULT_AUTO_BUILD_WHEN_PARAMS_SET
The default setting for automatically building once all of the parameters have been set.

See Also:
Constant Field Values

DEFAULT_TECHNOLOGIES

public static final java.lang.String[] DEFAULT_TECHNOLOGIES
List of default technologies supported by entering just to following short names without having to enter the fully qualified package and class name.


DEFAULT_TECHNOLOGIES_CLASSES

public static final java.lang.Class[] DEFAULT_TECHNOLOGIES_CLASSES
These are the classes of the entries in DEFAULT_TECHNOLOGIES. Entries in this array correspond directly with entries in DEFAULT_TECHNOLOGIES.


OPTION_ADDITIONAL_ARGS_SEPARATOR

public static final java.lang.String OPTION_ADDITIONAL_ARGS_SEPARATOR
Command line option to separate non-dtb arguments

See Also:
Constant Field Values

OPTION_AUTOBUILD

public static final java.lang.String OPTION_AUTOBUILD
Command line option to indicate autobuild policy

See Also:
Constant Field Values

OPTION_CONSTRUCTOR

public static final java.lang.String OPTION_CONSTRUCTOR
Command line option to select constructor

See Also:
Constant Field Values

OPTION_CLOCK_SCHEDULE

public static final java.lang.String OPTION_CLOCK_SCHEDULE
Command line option to indicate default clock schedule

See Also:
Constant Field Values

OPTION_DESKTOP

public static final java.lang.String OPTION_DESKTOP
Command line option to indicate preference for cvtDesktop

See Also:
Constant Field Values

OPTION_SCRIPT

public static final java.lang.String OPTION_SCRIPT
Command line option to execute a CLI script

See Also:
Constant Field Values

OPTION_TECHNOLOGY

public static final java.lang.String OPTION_TECHNOLOGY
Command line option to select technology

See Also:
Constant Field Values

OPTION_TECHMAP

public static final java.lang.String OPTION_TECHMAP
Command line option to enable technology location mapping

See Also:
Constant Field Values

OPTION_VERSION

public static final java.lang.String OPTION_VERSION
Command line option to show JHDL version

See Also:
Constant Field Values

UNSET_SUFFIX

public static final java.lang.String UNSET_SUFFIX
The getPortSettings method puts an entry that ends with this string for every port that has not been set yet.

See Also:
Constant Field Values

OPTION_TABBED

public static final java.lang.String OPTION_TABBED
The flag used on the command line to specify that the tabbed pane will be used instead of the window for viewing schematics

See Also:
Constant Field Values
Constructor Detail

DynamicTestBench

public DynamicTestBench(Node parent,
                        java.lang.String childname,
                        boolean tabbed)
                 throws DTBException
Builds a DynamicTestBench from a HardwareSystem parent and a given class name as a child.

Parameters:
parent - the parent of the DynamicTestBench should be a HardwareSystem
childname - this is the user JHDL design to load
Throws:
BuildException - if the circuit class can't be found or if the constructor doesn't match the requirements of this class
DTBException

DynamicTestBench

public DynamicTestBench(Node parent,
                        java.lang.String childname)
                 throws DTBException

DynamicTestBench

public DynamicTestBench(Node parent,
                        java.lang.Class childclass,
                        boolean tabbed)
                 throws DTBException
Builds a DynamicTestBench from a HardwareSystem parent and a given class as a child.

Parameters:
parent - the parent of the DynamicTestBench should be a HardwareSystem
childclass - the user JHDL design to load

DynamicTestBench

public DynamicTestBench(Node parent,
                        java.lang.Class childclass)
                 throws DTBException
Method Detail

isTabbed

public boolean isTabbed()
returns true if the tabbed pane will be used, false otherwise.


main

public static void main(java.lang.String[] args)
Execute this method with the argument --help for usage information


getAdditionalArguments

public static java.lang.String[] getAdditionalArguments()
This method is used to obtain the set of additional arguments passed on to the main method. These arguments are found after the optional OPTION_ADDITIONAL_ARGS_SEPARATOR argument to separate DynamicTestBench arguments from arguments that the user wants to have access to

Returns:
an array of String containing the command line arguments

getHelpString

public static java.lang.String getHelpString()
This string is displayed on the command line by invoking this class with a --help argument


setStaticConstructorIndex

public static void setStaticConstructorIndex(int index)
Sets the index of the constructor to use in building the design. The default is the first constructor (index = 0). This method should be called before instantiating DynamicTestBench if a constructor other than the first is to be used. If the given index is less than zero, then the index will be set to zero instead.

Parameters:
index - the index of the constructor to be used. This value should correspond to the order of the constructors in the pre-compiled source code of the class

setThisClassName

protected static void setThisClassName(java.lang.String name)
Used by subclasses to set the name of this class. This is useful for updating the help string


addAutobuildListener

public static final void addAutobuildListener(AutobuildListener al)

addBuildListener

public final void addBuildListener(BuildListener bl)
Parameters:
bl - new BuildListener to be informed when the child design is built

addClockScheduleListener

public final void addClockScheduleListener(ClockScheduleListener csl)

addConstructorListener

public final void addConstructorListener(ConstructorListener cl)
Parameters:
cl - new ConstructorListener to get updates on the constructor selected

addConstructorParamListener

public final void addConstructorParamListener(ConstructorParamListener cpl)
Parameters:
cpl - new ConstructorParamListener to get updates on the constructor parameter values

addParamListener

public final void addParamListener(ParamListener pl)
Parameters:
pl - new ParamListener to get updates on changes to non-wire constructor parameters

addParamTypesListener

public final void addParamTypesListener(ParamTypesListener ptl)
Parameters:
ptl - new ParamTypesListener to get updates on changes to the non-wire parameter types such as what would happen when the constructor is changed.

addPortSettingsListener

public final void addPortSettingsListener(PortSettingsListener psl)
Parameters:
psl - new PortSettingsListener to get updates on the changes made to port parameters

buildCell

public final void buildCell()
                     throws DTBException
Once all of the necessary parameters have been set, this method is called to actually invoke the constructor to build the user's cell. This method could also be caled before all of the parameters are set, but that could cause problems

Throws:
DTBException

isCellBuilt

public final boolean isCellBuilt()
Way to tell if the cell has been built yet.

Returns:
true is the design cell is already built

getAutoBuildWhenParamsSetSetting

public static final boolean getAutoBuildWhenParamsSetSetting()
Returns the setting of _autoBuildWhenParamsSet


getCLInterpreter

public static CLInterpreter getCLInterpreter()
Returns:
the command line interpreter associated with this DynamicTestBench, or null if none has been set.

getClockSchedule

public static java.lang.String getClockSchedule()
Returns:
the current setting for the default clock schedule to be built when the DynamicTestBench builds the design cell.

getConstructor

public final java.lang.Object[][] getConstructor()
Returns the current constructor argument types and current settings

Returns:
the current constructor types and settings

getConstructorIndex

public final int getConstructorIndex()
Returns the index of the currently selected constructor

Returns:
the index of the currently selected constructor

getDesignClassName

public final java.lang.String getDesignClassName()
Returns the class name of the design to build

Returns:
the name of the _childClass class

getDTBClassName

public static java.lang.String getDTBClassName()
This method returns the name of the DynamicTestBench class or one of its subclasses if the subclass has set the value of _dtbClassName

Returns:
the name of this class

getNumConstructors

public final int getNumConstructors()
Returns the number of constructors for the design class

Returns:
the number of constructors for the design class

getParameters

public final java.lang.Object[][] getParameters()
Returns a list of the settings of the non-Wire and non-Node constructor parameters. Null values indicate that the parameter hasn't been set.

Returns:
a list of the parameters settings. For each entry in the array, the first item is the parameter name, the second item is the parameter setting itself.

getPorts

public final java.lang.Object[][] getPorts()
Returns a list of the names of all of the ports, their widths (or their width parameter name), and their current wire association. A null wire association indicates that the port hasn't been bound to a given width.

Returns:
a list of the port names in the order they are found in cell_interface, along with their widths and current wires

getPortParams

public final java.lang.String[][] getPortParams()
Returns a list of the parameters, if any, for ports of unbound width, along with their current settings. If a port paramter is unset, its setting will be null.

Returns:
a list of the port parameters and their current settings

netlist

public void netlist(java.lang.String cellname,
                    java.lang.String filename,
                    boolean insertPads)
             throws DTBException
Called by the CLI command Netlist to generate a netlist of the given cell

Parameters:
cellname - the name of the cell to netlist
filename - the name of the file to which to save the netlist
insertPads - if true the design will have pads inserted if relevant to the current techmapper
Throws:
DTBException

removeAutobuildListener

public static void removeAutobuildListener(AutobuildListener al)
removes the given AutobuildListener from the list of listeners


removeListener

public void removeListener(DTBListener listener)
Removes the given DTBListener from the all of the lists of listeners

Parameters:
listener - the DTBListener to remove

setAutoBuildWhenParamsSet

public static final void setAutoBuildWhenParamsSet(boolean value)
Determines whether or not DynamicTestBench will automatically build the user's design once all of the previously unset parameters have been specified.

Parameters:
value - if true, DynamicTestBench will build the design right after the last parameter is defined; otherwise, the buildCell method must be explicitly called

setCLInterpreter

public void setCLInterpreter(CLInterpreter interpreter)
Creates CLICommand classes to interpret command lines to assist in manipulating the parameters of the DynamicTestBench

Parameters:
interpreter - the new CLInterpreter to associate with this DynamicTestBench

setClockSchedule

public static final void setClockSchedule(java.lang.String schedule)
                                   throws DTBException
Used by the CLI interface and the main method to set up the clock schedule for this dtb

Parameters:
schedule - the schedule to set for the default clock
Throws:
DTBException

setInstanceConstructorIndex

public final void setInstanceConstructorIndex(int index)
                                       throws DTBException
If the original constructor used to initialize the build of the design was not the value of index given to this method, then the build initialization process will restart with the given index for the constructor. If the given index is greater than the index of the last constructor, then the last constructor will be used instead.

Parameters:
index - the new constructor index to target
Throws:
DTBException

setParam

public final void setParam(java.lang.String name)
                    throws DTBException
Sets the parameter of the given name. The parameter will be set by calling the constructor of the class for the parameter that does not take any arguments.

Parameters:
name - the name of the non-Wire or non-Node parameter to set. The name should coincide with one of the names returned by the getParameters method.
Throws:
DTBException - to indicate if a problem setting the parameter occured

setParam

public final void setParam(java.lang.String name,
                           java.lang.String value)
                    throws DTBException
Sets the parameter of the given name to the given value

Parameters:
name - the name of the parameter to set. The name should coincide with one of the entries returned by the getParameters method.
value - the value to which the parameter should be set
Throws:
DTBException - to indicate if a problem setting the parameter occured

setPortParam

public final void setPortParam(java.lang.String paramName,
                               int value)
                        throws DTBException
Sets the parameter of the given index to the given value

Parameters:
value - the value to which the parameter should be set
Throws:
DTBException - to indicate if a problem setting the parameter occured

setSelectedCell

public void setSelectedCell(Cell selected)
Sets the currently selected cell to the given value

Parameters:
selected - the new cell selection

setTechMapper

public static void setTechMapper(java.lang.String mapper)
                          throws DTBException
Sets the current Technology Mapper (byucc.jhdl.Logic.TechMapper) for the design. If the design has already been built, then it will be rebuilt, and any open simulation views will be invalid. This version of the setTechMapper method will use the TechMapper constructor that does not take any parameters.

Parameters:
mapper - the name of the TechMapper to use. It may be any of the defaults provided (@see DEFAULT_TECHNOLOGIES) or it may be the fully-qualified name of a user-defined TechMapper class
Throws:
DTBException

setTechMapper

public static void setTechMapper(java.lang.String mapper,
                                 boolean techMappingEnabled)
                          throws DTBException
Sets the current Technology Mapper (byucc.jhdl.Logic.TechMapper) for the design. If the design has already been built, then it will be rebuilt, and any open simulation views will be invalid

Parameters:
mapper - the name of the TechMapper to use. It may be any of the defaults provided (@see DEFAULT_TECHNOLOGIES) or it may be the fully-qualified name of a user-defined TechMapper class
techMappingEnabled - if true, then the TechMapper will be set to turn on techmapping hints such as RLOC, etc.
Throws:
DTBException


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