All Packages Class Hierarchy This Package Previous Next Index
Class byucc.jhdl.Xilinx.XC4000.LibrarySelfTester
java.lang.Object
|
+----byucc.jhdl.base.Nameable
|
+----byucc.jhdl.base.Node
|
+----byucc.jhdl.base.Cell
|
+----byucc.jhdl.base.Structural
|
+----byucc.jhdl.Logic.Logic
|
+----byucc.jhdl.Xilinx.XC4000.LibrarySelfTester
- public final class LibrarySelfTester
- extends Logic
- implements TestBench
This class is the self-test controller for the XC4000 library.
When this class is invoked at the command line, it tests all the
cells in the library with their built-in test vectors, and reports
the number of cells that passed the tests.
-
testOK
- Global flag that indicates whether or not the previously run
test passed.
-
LibrarySelfTester(HWSystem)
- Creates a new LibrarySelfTester with the given HWSystem as the
default simulator.
-
clock()
- Performs the clock-by-clock test behavior of the library test.
-
getHWSystem()
- Returns the HWSystem of this instance of LibrarySelfTester.
-
getTester()
- Returns a new LibrarySelfTester, with a new HWSystem as its
simulator.
-
main(String[])
- Runs the full library test.
-
reset()
- Performs the reset cycle test behavior of the library test.
-
setCell(Cell)
- Initializes the test vectors for the given cell.
-
setVector(String, int[], Wire)
- Sets the contents of the test vector for the port identified by
the
String parameter.
-
setVector(String, int[][], Wire)
- Sets the contents of the test vector for the port identified by
the
String parameter.
-
setVector(String, long[], Wire)
- Sets the contents of the test vector for the port identified by
the
String parameter.
-
test()
- Runs the test specified by the vectors given with the
setVector calls, using the cell given in the
setCell initialization.
-
verboseMode(boolean)
- Sets the verbosity mode of the tester.
testOK
public static boolean testOK
- Global flag that indicates whether or not the previously run
test passed.
LibrarySelfTester
public LibrarySelfTester(HWSystem hw)
- Creates a new LibrarySelfTester with the given HWSystem as the
default simulator.
- Parameters:
- hw - The HWSystem to be used with this LibrarySelfTester
for simulation.
getTester
public static LibrarySelfTester getTester()
- Returns a new LibrarySelfTester, with a new HWSystem as its
simulator.
- Returns:
- A new LibrarySelfTester with a new HWSystem as the
simulator.
getHWSystem
public HWSystem getHWSystem()
- Returns the HWSystem of this instance of LibrarySelfTester.
- Returns:
- The HWSystem of this LibrarySelfTester.
verboseMode
public void verboseMode(boolean b)
- Sets the verbosity mode of the tester. If the
boolean parameter is true, the test will print
verbose cycle-by-cycle results.
- Parameters:
- b -
True to put the LibrarySelfTester in
verbose mode, false to put it in quiet mode.
setCell
public void setCell(Cell c)
- Initializes the test vectors for the given cell.
- Parameters:
- c - The cell to be used in the next simulation run.
setVector
public void setVector(String name,
int arr[],
Wire wire)
- Sets the contents of the test vector for the port identified by
the
String parameter. The port name must
correspond to one of the ports of the cell given in the
setCell() initialization. This version of
setVector can only be used for ports with 32 bits or less.
- Parameters:
- name - The name of the port to be associated with this
vector of data.
- arr - The array of ints to be used to drive the port.
setVector
public void setVector(String name,
long arr[],
Wire wire)
- Sets the contents of the test vector for the port identified by
the
String parameter. The port name must
correspond to one of the ports of the cell given in the
setCell() initialization. This version of
setVector can only be used for ports with 64 bits or less.
- Parameters:
- name - The name of the port to be associated with this
vector of data.
- arr - The array of longs to be used to drive the port.
setVector
public void setVector(String name,
int arr[][],
Wire wire)
- Sets the contents of the test vector for the port identified by
the
String parameter. The port name must
correspond to one of the ports of the cell given in the
setCell() initialization. This version of
setVector can be used for ports with any width port.
- Parameters:
- name - The name of the port to be associated with this
vector of data.
- arr - The 2-D array of ints to be used to drive the port.
test
public void test()
- Runs the test specified by the vectors given with the
setVector calls, using the cell given in the
setCell initialization.
clock
public void clock()
- Performs the clock-by-clock test behavior of the library test.
- Overrides:
- clock in class Structural
reset
public void reset()
- Performs the reset cycle test behavior of the library test.
- Overrides:
- reset in class Structural
main
public static void main(String argv[])
- Runs the full library test. The list of cells to test is
maintained in a private String array. After each cell test, the
testOK flag is checked to see if the test passed. Each test is
run twice, once with Logic.techMappingEnabled = true, once with
Logic.techMappingEnabled false, to validate both the structure
and the behavioral model of the cell, if any.
All Packages Class Hierarchy This Package Previous Next Index