|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectbyucc.jhdl.platforms.util.readback.ReadBackManager
This class provides a testbench (frequently, a board model) with
the functionality required to manage readback for a board of
contiguously numbered PEs starting with PE 0. This includes the
functionality to initialize the readback data structures of
specific PEs, enable or disable the readback of specific PEs, and
provide the testbench with a way of retrieving readback data for an
array of ExternallyUpdateable and LargeExternallyUpdateable Cells.
| Field Summary | |
protected java.util.Hashtable |
euCellHash
A Hashtable of all ExternallyUpdatable
Cells known and available from the initialized
ReadBackData objects. |
protected java.util.Hashtable |
leuCellHash
A Hashtable of all
LargeExternallyUpdatable Cells known
and available from the initialized ReadBackData
objects. |
protected int |
peCount
Stores the number of PEs used in the testbench. |
protected boolean[] |
peRBEnabled
An array of booleans used to record whether or not a PE is sampled, or readback, when a performReadBack() method
call is made. |
protected ReadBackData[] |
readBackData
The array of ReadBackData objects, one for each
PE. |
| Constructor Summary | |
|
ReadBackManager(NativeReadBackInterface newRBI,
int newPeCount)
The constructor allocates and initializes the data structures for managing readback for the testbench. |
protected |
ReadBackManager(NativeReadBackInterface newRBI,
int newPeCount,
boolean dummy)
This is only used by ReadWriteBackManager. |
| Method Summary | |
void |
addReadBack(java.lang.String fileName,
java.lang.String hierName,
int peNum)
Initializes the readback data structures for a specific PE. |
void |
disableReadBack(int peNum)
Disables readback for a specific PE on subsequent calls to performReadBack(). |
void |
enableReadBack(int peNum)
Enables readback for a specific PE on subsequent calls to performReadBack(). |
int[] |
getEUValues(ExternallyUpdateable[] eCells)
Provides an array of readback values corresponding to the given array of ExternallyUpdatable Cells. |
int[][] |
getLEUValues(LargeExternallyUpdateable[] leCells)
Provides an array of readback values corresponding to the given array of LargeExternallyUpdatable
Cells. |
void |
performReadBack()
Causes the state of all enabled PEs to be sampled. |
void |
removeReadBack(int peNum)
Reinitializes the readback data structures to a "clean" state. |
void |
setReadBackEnable(int peNum,
boolean enabled)
Sets the readback enable for the given PE to the provided value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ReadBackData[] readBackData
ReadBackData objects, one for each
PE.
protected java.util.Hashtable euCellHash
Hashtable of all ExternallyUpdatable
Cells known and available from the initialized
ReadBackData objects. This is used to look up the
readback values of ExternallyUpdateable objects. The
key for the Hashtable is a Cell
reference while the value is a LookUp object.
protected java.util.Hashtable leuCellHash
Hashtable of all
LargeExternallyUpdatable Cells known
and available from the initialized ReadBackData
objects. This is used to look up the readback values of
LargeExternallyUpdateable objects. The key for the
Hashtable is a Cell reference while the
value is a LookUp object.
protected boolean[] peRBEnabled
performReadBack() method
call is made.
protected int peCount
| Constructor Detail |
public ReadBackManager(NativeReadBackInterface newRBI,
int newPeCount)
NativeReadBackInterface reference is recorded.
newRBI - A reference to the
NativeReadBackInterface to be used by
the ReadBackData objects.newPeCount - The number of PEs for which this object will
manage readback. Note that PE numbering is
assumed to start at 0.
protected ReadBackManager(NativeReadBackInterface newRBI,
int newPeCount,
boolean dummy)
ReadWriteBackManager.
| Method Detail |
public void addReadBack(java.lang.String fileName,
java.lang.String hierName,
int peNum)
fileName - The base filename (i.e., without extension) for
the PE's design.hierName - The full hierarchical JHDL name for the PE (used
for generating full hierarchical names for JHDL
Cells).peNum - The number of the PE to initialize.
public void setReadBackEnable(int peNum,
boolean enabled)
peNum - The number of the PE whose readback enable is being
set.enabled - The value of the PE enable. A true
value causes the PE's state to be read back on
subsequent calls to
performReadBack(). A
false value will prevent the state
from being readback.public void enableReadBack(int peNum)
performReadBack(). It is usually used by
testbenches.
peNum - The number of the PE for which to enable readback.public void disableReadBack(int peNum)
peNum - The number of the PE for which to disable readback.public void performReadBack()
public void removeReadBack(int peNum)
peNum - The number of the PE for which the readback
structures should be reinitialized.public int[] getEUValues(ExternallyUpdateable[] eCells)
ExternallyUpdatable Cells. If
a Cell cannot be found in the
Hashtable, the value for the Cell is
set to 0; this would happen if the Cell has been optimized away
or if there are version inconsistencies between the class file
and the executed design. If a null list of
ExternallyUpdatable Cells is passed in,
a null int array reference is
returned. This would usually be used by the testbench in its
implementation of the HardwareInterface.getHardwareState(ExternallyUpdateable[],LargeExternallyUpdateable[],Checkpointable[]).
eCells - An array of ExternallyUpdatable
Cells for which the last known
readback values are needed. This is generally
provided by the ExternalUpdateManager.
eCells reference is null, then
returned int array reference will also be
null. Otherwise, the array provides the last
known readback value for the
ExternallyUpdateable Cells in
the array. For those Cells for which no
value is found, a zero (0) value is returned.public int[][] getLEUValues(LargeExternallyUpdateable[] leCells)
LargeExternallyUpdatable
Cells. If a Cell cannot be found in the
Hashtable, the values for the Cell are
set to 0; this would happen if the Cell has been
optimized away or if there are version inconsistencies between
the class file and the executed design. If a null
list of LargeExternallyUpdatable Cells
is passed in, a null int array
reference is returned. This would usually be used by the
testbench in its implementation of the HardwareInterface.getHardwareState(ExternallyUpdateable[],LargeExternallyUpdateable[],Checkpointable[]).
leCells - An array of LargeExternallyUpdatable
Cells for which the last known
readback values are needed. This is generally
provided by the ExternalUpdateManager.
leCells reference is
null, then returned int array
reference will also be null. Otherwise, the
array provides the last known readback value for the
LargeExternallyUpdateable Cells
in the array. For those Cells for which no
value is found, a null array is returned.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||