|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectbyucc.jhdl.base.Nameable
byucc.jhdl.base.Node
byucc.jhdl.base.Cell
byucc.jhdl.base.Structural
byucc.jhdl.Logic.LogicGates
byucc.jhdl.Logic.LogicStatic
byucc.jhdl.Logic.Logic
byucc.jhdl.apps.dtb.DynamicTestBench
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 |
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.
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 |
| 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. |