byucc.jhdl.platforms.util.readback.Xilinx.Virtex2
Class Block

java.lang.Object
  extended bybyucc.jhdl.platforms.util.readback.Xilinx.Virtex2.Block

public class Block
extends java.lang.Object

This class records all of the relevant state information for physical IOBs, slices, and BlockRAMs in Virtex2, including information about flip-flops, RAMs, and RAM address signals. This information is taken from an XDL file.

Author:
Paul Graham

Field Summary
 java.util.Vector bitstreamLocations
          Vector holds the arrays of readback bitstream offsets (RBLocation objects) for the state element.
static int BLOCKRAM
          Indicates that BlockRAM in the block.
static int BLOCKRAMA
          Indicates port A of the BlockRAM is used.
static int BLOCKRAMAB
          Indicates port A and B of the BlockRAM are used.
static int BLOCKRAMB
          Indicates port B of the BlockRAM is used.
 java.lang.String blockRAMPortA
          The configuration of the port A of the BlockRAM (256X16, 512X8, *etc.)
 java.lang.String blockRAMPortB
          The configuration of the port B of the BlockRAM (256X16, 512X8, *etc.)
 java.util.Vector inputs
          Vector of Input objects which indicate which signals are connected to which block inputs.
 java.lang.String location
          The location of the block on the FPGA, for example, CLB_R25C9.S1, AT10 ,and RAMB4_R9C0.
 java.util.Vector logicalNames
          Vector holding the instance names for the state elements derived from the logical names found in the design's (EDIF) netlist.
static int LUTRAMF
          Indicates an F LUT is used for a RAM.
static int LUTRAMFG
          Indicates an F and a G LUT are used for RAM.
static int LUTRAMG
          Indicates a G LUT is used for a RAM.
 java.lang.String name
          The instance name for the IOB or SLICE from the XDL.
static int NORAM
          Indicates that no RAM resources are being used.
 java.util.Vector physicalNames
          Vector holding the IOB/SLICE/BLOCKRAM resource names for the state elements.
static int RAM16X1D
          Indicates that a ram16x1d is located in the slice.
static int RAM16X1F
          Indicates that a ram16x1s/srl16(e) is located in the F LUT.
static int RAM16X1G
          Indicates that a ram16x1s/srl16(e) is located in the G LUT.
static int RAM32X1
          Indicates that a ram32x1s is located in the slice.
 int RAMLoc
          Indicates what RAM resources are used in the block.
 int RAMType
          Indicates what types RAMs are implemented by the block.
 int srl16Loc
          Indicates the locations of srl16 primitives in the block.
 java.lang.String type
          The type of the block: SLICE, IOB, BLOCKRAM
 
Constructor Summary
Block(Block oldBlock)
          The constructor creates a new object from an existing object by copying the values of the existing object (the references are copied).
Block(java.lang.String newName, java.lang.String newType)
          The constructor initializes the name and type fields of the object while initializing all other fields to an "empty" or unused state.
 
Method Summary
 void addConfig(java.lang.String newPhysicalName, java.lang.String newLogicalName)
          Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for flip-flops.
 void addConfigBlockRAM(java.lang.String newPhysicalName, java.lang.String newLogicalName)
          Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for BlockRAMs and sets the RAMLoc, RAMType based on the BlockRAM port name.
 void addConfigRAM(java.lang.String newPhysicalName, java.lang.String newLogicalName, java.lang.String className)
          Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for LUT RAMs and sets the RAMLoc, RAMType, and srl16Loc fields based on the position of the resources and class of the logical JHDL component.
 void addInput(java.lang.String netName, java.lang.String inputName)
          Adds an Input object to the inputs Vector to record LUT RAM inputs.
 int configSize()
          Returns the number of state elements in the IOB/SLICE/BLOCKRAM.
 java.util.Vector getBitstreamLocations()
          Returns the bitstreamLocations Vector for the block.
 java.util.Vector getBitstreamLocationsClone()
          Returns a copy of the bitstreamLocations Vector for the block.
 java.lang.String getBlockRAMPortA()
          Returns the width parameter for BlockRAM port A.
 java.lang.String getBlockRAMPortB()
          Returns the width parameter for BlockRAM port B.
 int getInputCount()
          Returns the number of LUT RAM input signals that have been stored.
 java.util.Vector getInputs()
          Returns the inputs Vector for the block.
 java.util.Vector getInputsClone()
          Returns a copy of the inputs Vector for the block.
 java.lang.String getLocation()
          Returns the block's physical FPGA location.
 java.util.Vector getLogicalNames()
          Returns the logicalNames Vector for the block.
 java.util.Vector getLogicalNamesClone()
          Returns a copy of the logicalNames Vector for the block.
 java.lang.String getName()
          Returns the instance name of the block.
 java.util.Vector getPhysicalNames()
          Returns the physicalNames Vector for the block.
 java.util.Vector getPhysicalNamesClone()
          Returns a copy of the physicalNames Vector for the block.
 java.lang.String getType()
          Returns the block's type (IOB, SLICE, BLOCKRAM).
 boolean hasBlockRAM()
          Indicates whether the block has a BlockRAM.
 boolean hasDualPortedBlockRAM()
          Indicates whether the block has a dual-ported BlockRAM.
 boolean hasDualSRL16s()
          Indicates when two srl16 memories are placed in the same slice.
 boolean hasRAM()
          Indicates whether the block has RAM resources or not.
 boolean hasRAM16x1D()
          Indicates whether the block has a ram16x1d.
 boolean hasRAM16x1F()
          Indicates whether the block has a ram16x1s or srl16 in the F LUT.
 boolean hasRAM16x1G()
          Indicates whether the block has a ram16x1s or srl16 in the G LUT.
 boolean hasRAM32x1()
          Indicates whether the block has a ram32x1s.
 boolean hasRAMF()
          Indicates whether the block has RAM resources using the F LUT.
 boolean hasRAMFG()
          Indicates whether the block has RAM resources using both the F and G LUTs.
 boolean hasRAMG()
          Indicates whether the block has RAM resources using the G LUT.
 void init()
          Initializes the object by removing all elements from the Vector fields and "clearing" the values of the other fields.
 java.lang.String lookUpPhysicalName(java.lang.String logicalName)
          Looks up a physical resource name based on a logical JHDL instance name for a state element within the block.
 void setBlockRAMPortA(java.lang.String cfgVal)
          Sets the width parameter for BlockRAM port A (usually from the XDL information for the design).
 void setBlockRAMPortB(java.lang.String cfgVal)
          Sets the width parameter for BlockRAM port B (usually from the XDL information for the design).
 void setLocation(java.lang.String newLocation)
          Sets the block's physical FPGA location.
 void setName(java.lang.String newName)
          Sets the instance name of the block.
 void setType(java.lang.String newType)
          Sets the block's type (IOB, SLICE, BLOCKRAM).
 java.lang.String toString()
          Returns a String summarizing the object's contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The instance name for the IOB or SLICE from the XDL.


type

public java.lang.String type
The type of the block: SLICE, IOB, BLOCKRAM


location

public java.lang.String location
The location of the block on the FPGA, for example, CLB_R25C9.S1, AT10 ,and RAMB4_R9C0.


physicalNames

public java.util.Vector physicalNames
Vector holding the IOB/SLICE/BLOCKRAM resource names for the state elements. This is a parallel Vector with logicalNames and bitstreamLocations, in other words, the information about a specific state element is stored at the same index in all three Vectors.


logicalNames

public java.util.Vector logicalNames
Vector holding the instance names for the state elements derived from the logical names found in the design's (EDIF) netlist. This is a parallel Vector with physicalNames and bitstreamLocations, in other words, the information about a specific state element is stored at the same index in all three Vectors.


bitstreamLocations

public java.util.Vector bitstreamLocations
Vector holds the arrays of readback bitstream offsets (RBLocation objects) for the state element. This is a parallel Vector with physicalNames and logicalNames, in other words, the information about a specific state element is stored at the same index in all three Vectors.


inputs

public java.util.Vector inputs
Vector of Input objects which indicate which signals are connected to which block inputs.


RAMLoc

public int RAMLoc
Indicates what RAM resources are used in the block.


RAMType

public int RAMType
Indicates what types RAMs are implemented by the block.


srl16Loc

public int srl16Loc
Indicates the locations of srl16 primitives in the block.


blockRAMPortA

public java.lang.String blockRAMPortA
The configuration of the port A of the BlockRAM (256X16, 512X8, *etc.)


blockRAMPortB

public java.lang.String blockRAMPortB
The configuration of the port B of the BlockRAM (256X16, 512X8, *etc.)


NORAM

public static final int NORAM
Indicates that no RAM resources are being used. Used for both RAM locations and RAM types.

See Also:
Constant Field Values

LUTRAMF

public static final int LUTRAMF
Indicates an F LUT is used for a RAM.

See Also:
Constant Field Values

LUTRAMG

public static final int LUTRAMG
Indicates a G LUT is used for a RAM.

See Also:
Constant Field Values

LUTRAMFG

public static final int LUTRAMFG
Indicates an F and a G LUT are used for RAM.

See Also:
Constant Field Values

BLOCKRAMA

public static final int BLOCKRAMA
Indicates port A of the BlockRAM is used.

See Also:
Constant Field Values

BLOCKRAMB

public static final int BLOCKRAMB
Indicates port B of the BlockRAM is used.

See Also:
Constant Field Values

BLOCKRAMAB

public static final int BLOCKRAMAB
Indicates port A and B of the BlockRAM are used.

See Also:
Constant Field Values

RAM16X1F

public static final int RAM16X1F
Indicates that a ram16x1s/srl16(e) is located in the F LUT.

See Also:
Constant Field Values

RAM16X1G

public static final int RAM16X1G
Indicates that a ram16x1s/srl16(e) is located in the G LUT.

See Also:
Constant Field Values

RAM16X1D

public static final int RAM16X1D
Indicates that a ram16x1d is located in the slice.

See Also:
Constant Field Values

RAM32X1

public static final int RAM32X1
Indicates that a ram32x1s is located in the slice.

See Also:
Constant Field Values

BLOCKRAM

public static final int BLOCKRAM
Indicates that BlockRAM in the block.

See Also:
Constant Field Values
Constructor Detail

Block

public Block(java.lang.String newName,
             java.lang.String newType)
The constructor initializes the name and type fields of the object while initializing all other fields to an "empty" or unused state.

Parameters:
newName - The instance name of the block.
newType - The block type (SLICE, IOB, BLOCKRAM)

Block

public Block(Block oldBlock)
The constructor creates a new object from an existing object by copying the values of the existing object (the references are copied).

Parameters:
oldBlock - The existing Block object.
Method Detail

init

public void init()
Initializes the object by removing all elements from the Vector fields and "clearing" the values of the other fields. This is useful if the object is to be re-used to represent the information for some other IOB/SLICE/BLOCKRAM element.


addConfig

public void addConfig(java.lang.String newPhysicalName,
                      java.lang.String newLogicalName)
Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for flip-flops. Currently, the names are not added if either are null and no warning message is printed in this case.

Parameters:
newPhysicalName - The physical IOB/SLICE resource name for the state element.
newLogicalName - The logical instance name for the RAM resource.

addConfigRAM

public void addConfigRAM(java.lang.String newPhysicalName,
                         java.lang.String newLogicalName,
                         java.lang.String className)
Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for LUT RAMs and sets the RAMLoc, RAMType, and srl16Loc fields based on the position of the resources and class of the logical JHDL component. Currently, the names are not added if either are null and no warning message is printed in this case. This

Parameters:
newPhysicalName - The physical SLICE resource name for the state element.
newLogicalName - The logical instance name for the RAM resource.
className - The class name of the logical JHDL state element corresponding to the physical FPGA state resource.

addConfigBlockRAM

public void addConfigBlockRAM(java.lang.String newPhysicalName,
                              java.lang.String newLogicalName)
Adds a new physical-logical name pair to the physicalNames and logicalNames Vectors, respectively, for BlockRAMs and sets the RAMLoc, RAMType based on the BlockRAM port name. Currently, the names are not added if either are null and no warning message is printed in this case. This

Parameters:
newPhysicalName - The physical BLOCKRAM resource name for the state element.
newLogicalName - The logical instance name for the RAM resource.

setBlockRAMPortA

public void setBlockRAMPortA(java.lang.String cfgVal)
Sets the width parameter for BlockRAM port A (usually from the XDL information for the design).

Parameters:
cfgVal - The width of BlockRAM port A.

getBlockRAMPortA

public java.lang.String getBlockRAMPortA()
Returns the width parameter for BlockRAM port A.

Returns:
String representing the width of BlockRAM port A.

setBlockRAMPortB

public void setBlockRAMPortB(java.lang.String cfgVal)
Sets the width parameter for BlockRAM port B (usually from the XDL information for the design).

Parameters:
cfgVal - The width of BlockRAM port B.

getBlockRAMPortB

public java.lang.String getBlockRAMPortB()
Returns the width parameter for BlockRAM port B.

Returns:
String representing the width of BlockRAM port B.

addInput

public void addInput(java.lang.String netName,
                     java.lang.String inputName)
Adds an Input object to the inputs Vector to record LUT RAM inputs.

Parameters:
netName - The physical signal name.
inputName - The SLICE input to which the signal is attached.

configSize

public int configSize()
Returns the number of state elements in the IOB/SLICE/BLOCKRAM.

Returns:
The number of state elements in the IOB/SLICE/BLOCKRAM.

getInputCount

public int getInputCount()
Returns the number of LUT RAM input signals that have been stored.

Returns:
The number of LUT RAM input signals.

getName

public java.lang.String getName()
Returns the instance name of the block.

Returns:
The block's instance name.

setName

public void setName(java.lang.String newName)
Sets the instance name of the block.

Parameters:
newName - The new instance name for the block.

getType

public java.lang.String getType()
Returns the block's type (IOB, SLICE, BLOCKRAM).

Returns:
The block's type.

setType

public void setType(java.lang.String newType)
Sets the block's type (IOB, SLICE, BLOCKRAM).

Parameters:
newType - The block's new type.

getLocation

public java.lang.String getLocation()
Returns the block's physical FPGA location.

Returns:
The block's physical FPGA location.

setLocation

public void setLocation(java.lang.String newLocation)
Sets the block's physical FPGA location.

Parameters:
newLocation - The block's new physical FPGA location.

getPhysicalNames

public java.util.Vector getPhysicalNames()
Returns the physicalNames Vector for the block.

Returns:
The block's physicalNames Vector.

getPhysicalNamesClone

public java.util.Vector getPhysicalNamesClone()
Returns a copy of the physicalNames Vector for the block.

Returns:
A copy of the block's physicalNames Vector.

getLogicalNames

public java.util.Vector getLogicalNames()
Returns the logicalNames Vector for the block.

Returns:
The block's logicalNames Vector.

getLogicalNamesClone

public java.util.Vector getLogicalNamesClone()
Returns a copy of the logicalNames Vector for the block.

Returns:
A copy of the block's logicalNames Vector.

getBitstreamLocations

public java.util.Vector getBitstreamLocations()
Returns the bitstreamLocations Vector for the block.

Returns:
The block's bitstreamLocations Vector.

getBitstreamLocationsClone

public java.util.Vector getBitstreamLocationsClone()
Returns a copy of the bitstreamLocations Vector for the block.

Returns:
A copy of the block's bitstreamsLocations Vector.

getInputs

public java.util.Vector getInputs()
Returns the inputs Vector for the block.

Returns:
The block's inputs Vector.

getInputsClone

public java.util.Vector getInputsClone()
Returns a copy of the inputs Vector for the block.

Returns:
A copy of the block's inputs Vector.

hasRAM

public boolean hasRAM()
Indicates whether the block has RAM resources or not.

Returns:
Returns true if the block contains RAM, otherwise, it returns false.

hasRAMF

public boolean hasRAMF()
Indicates whether the block has RAM resources using the F LUT.

Returns:
Returns true if the block has RAM using the F LUT, otherwise, it returns false.

hasRAMG

public boolean hasRAMG()
Indicates whether the block has RAM resources using the G LUT.

Returns:
Returns true if the block has RAM using the G LUT, otherwise, it returns false.

hasRAMFG

public boolean hasRAMFG()
Indicates whether the block has RAM resources using both the F and G LUTs.

Returns:
Returns true if the block has RAM using both the F and G LUTs, otherwise, it returns false.

hasDualSRL16s

public boolean hasDualSRL16s()
Indicates when two srl16 memories are placed in the same slice. If two are in the same slice, the LL file reports the bitstream information using an "M" type rather than an "F" and a "G".

Returns:
Returns true if the block uas srl16 memories in both the F and G LUTs, otherwise, it returns false.

hasRAM16x1F

public boolean hasRAM16x1F()
Indicates whether the block has a ram16x1s or srl16 in the F LUT.

Returns:
Returns true if the block has a ram16x1s or srl16 in the F LUT, otherwise, it returns false.

hasRAM16x1G

public boolean hasRAM16x1G()
Indicates whether the block has a ram16x1s or srl16 in the G LUT.

Returns:
Returns true if the block has a ram16x1s or srl16 in the G LUT, otherwise, it returns false.

hasRAM16x1D

public boolean hasRAM16x1D()
Indicates whether the block has a ram16x1d.

Returns:
Returns true if the block has a ram16x1d, otherwise, it returns false.

hasRAM32x1

public boolean hasRAM32x1()
Indicates whether the block has a ram32x1s.

Returns:
Returns true if the block has a ram32x1s, otherwise, it returns false.

hasBlockRAM

public boolean hasBlockRAM()
Indicates whether the block has a BlockRAM.

Returns:
Returns true if the block has a BlockRAM, otherwise, it returns false.

hasDualPortedBlockRAM

public boolean hasDualPortedBlockRAM()
Indicates whether the block has a dual-ported BlockRAM.

Returns:
Returns true if the block has a dual-ported BlockRAM, otherwise, it returns false.

lookUpPhysicalName

public java.lang.String lookUpPhysicalName(java.lang.String logicalName)
Looks up a physical resource name based on a logical JHDL instance name for a state element within the block.

Parameters:
logicalName - The logical JHDL instance name for the state element.
Returns:
Returns the physical resource name in the block which corresponds to the JHDL logical state component.

toString

public java.lang.String toString()
Returns a String summarizing the object's contents.

Returns:
A String summarizing the object's contents.


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