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.


Variable Index

 o testOK
Global flag that indicates whether or not the previously run test passed.

Constructor Index

 o LibrarySelfTester(HWSystem)
Creates a new LibrarySelfTester with the given HWSystem as the default simulator.

Method Index

 o clock()
Performs the clock-by-clock test behavior of the library test.
 o getHWSystem()
Returns the HWSystem of this instance of LibrarySelfTester.
 o getTester()
Returns a new LibrarySelfTester, with a new HWSystem as its simulator.
 o main(String[])
Runs the full library test.
 o reset()
Performs the reset cycle test behavior of the library test.
 o setCell(Cell)
Initializes the test vectors for the given cell.
 o setVector(String, int[], Wire)
Sets the contents of the test vector for the port identified by the String parameter.
 o setVector(String, int[][], Wire)
Sets the contents of the test vector for the port identified by the String parameter.
 o setVector(String, long[], Wire)
Sets the contents of the test vector for the port identified by the String parameter.
 o test()
Runs the test specified by the vectors given with the setVector calls, using the cell given in the setCell initialization.
 o verboseMode(boolean)
Sets the verbosity mode of the tester.

Variables

 o testOK
 public static boolean testOK
Global flag that indicates whether or not the previously run test passed.

Constructors

 o 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.

Methods

 o 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.
 o getHWSystem
 public HWSystem getHWSystem()
Returns the HWSystem of this instance of LibrarySelfTester.

Returns:
The HWSystem of this LibrarySelfTester.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o test
 public void test()
Runs the test specified by the vectors given with the setVector calls, using the cell given in the setCell initialization.

 o clock
 public void clock()
Performs the clock-by-clock test behavior of the library test.

Overrides:
clock in class Structural
 o reset
 public void reset()
Performs the reset cycle test behavior of the library test.

Overrides:
reset in class Structural
 o 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