|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.platforms.util.readback.Xilinx.XilinxBitstreamParams
byucc.jhdl.platforms.util.readback.Xilinx.Virtex2.Virtex2BitstreamParams
This class is used to record the information about a specific
Virtex2 FPGA during the creation of an .rbentry
file as
well as provide a method for calculating the absolute offset of a
readback state bit from the offset provided by the Xilinx logical
allocation file (.ll) file. The information this class records
about a specific FPGA includes the PE type, the readback bitstream
header lengths, the bit ordering within each byte, the frame size,
the CLB frame count, and the bitmap length. Further, this class
defines constants for each supported Xilinx part type as well as
each part type's frame size and count. Further, constants for the
number of bits in a byte and the trailer or postamble length are
also defined. Several methods are defined to conveniently
calculate the length of the bitstream in bits and bytes as well as
provide the lengths of frames, the number of frames, and a
String
representing the Xilinx FPGA type.
Constructor Summary | |
Virtex2BitstreamParams()
Constructs an object setting the value of the PE type to XILINX_UNKNOWN, the CLB Header length in bits to 0, the Block RAM header bits to 0, and the byte ordering to byteMirrored = false (in other words, bit 0 is the MSB of the byte). |
|
Virtex2BitstreamParams(int idcode)
Constructs an object setting the value of the PE type, setting the CLB Header length in bits to 0, the BlockRam header bits to 0 and the byte ordering to byteMirrored = false (in other words, bit 0 is the MSB of the byte). |
|
Virtex2BitstreamParams(java.lang.String peTypeStr,
int newClbHeaderBits,
int newRamHeaderBits,
boolean newByteMirrored)
Constructs an object setting the value of the PE type, the CLB Header length, the Block RAM header bits, and the byte ordering according to the parameters given. |
Method Summary | |
int |
calculateBRAMOffset(int frame,
int frameOffset)
This method calculates the absolute offset of a readback state bit which is located in a Block RAM based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen". |
int |
calculateBRAMOffset(RBLocation rbl)
This method calculates the absolute offset of a readback state bit which is located in a Block RAM based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen". |
int |
calculateCLBOffset(int frame,
int frameOffset)
Calculates the absolute offset of a readback state bit which is located in the CLB frames (may be in a CLB or IOB) based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen". |
int |
calculateCLBOffset(RBLocation rbl)
Calculates the absolute offset of a readback state bit which is located in the CLB frames (may be in a CLB or IOB) based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen". |
int |
getBitmapLength()
Maps a PE type to a bitmap length based on the encodings for the part type defined in the constants above. |
int |
getBitstreamLength()
Returns the bitstream length in terms of bits based on the declared PE type and header lengths in bits. |
int |
getBlockRAMPacketHeader()
|
int |
getBlockRAMPacketHeader(java.lang.String part)
Deprecated. Replaced by getBlockRAMPacketHeader() , after
setting the part type with setPEType(String) or
setPEType(int) or setPETypeWithIdcode(int) . |
int |
getBlockRAMReadBackWordCount()
|
int |
getBlockRAMReadBackWordCount(java.lang.String part)
Deprecated. Replaced by getBlockRAMReadBackWordCount() , after
setting the part type with setPEType(String) or
setPEType(int) or setPETypeWithIdcode(int) .
Returns the word count for BlockRAM readback |
int |
getBRAMByteCount()
|
int |
getBytestreamLength()
Returns the bitstream length in terms of bytes based on the declared PE type and header lengths in bits. |
int |
getCLBByteCount()
|
int |
getCLBFrameCount()
Maps a PE type to a CLB readback frame count based on the encodings for the part type defined in the constants above. |
int |
getCLBHeaderBits()
Returns the current length of the CLB readback header, in bits. |
int |
getCLBPacketHeader()
|
int |
getCLBReadBackWordCount()
|
int |
getFrameSize()
Maps a PE type to a CLB readback frame size based on the encodings for the part type defined in the constants above. |
java.lang.String |
getPart(int idcode)
Returns a string defining the part, based on the IDCODE. |
int |
getPEType()
Returns the integer value representing the part type of the PE. |
int |
getRAMFrameCount()
|
int |
getRAMHeaderBits()
Returns the current length of the BlockRAM readback header, in bits. |
boolean |
isByteMirrored()
Returns the values of the byteMirrored property,
discussed above. |
static int |
peType(int idcode)
Returns the pe-type based on the idcode |
void |
setByteMirrored(boolean isByteMirrored)
Sets the byteMirrored field to the value of the
parameter. |
void |
setCLBHeaderBits(int newCLBHeaderBits)
Sets the length of the CLB readback header (in bits) to the value of the given parameter. |
void |
setPEType(int newPeType)
Sets the value of the PE type using the static final
int "constants" defined earlier. |
void |
setPEType(java.lang.String newPeType)
Sets the value of the PE type based on a String
parameter which contains "Vxxx" for a Virtex2 part and "2Sxxx"
for a Spartan3 part. |
void |
setPETypeWithIdcode(int idcode)
Sets the value of the PE type using the Xilinx defined idcodes. |
void |
setRAMHeaderBits(int newRAMHeaderBits)
Sets the length of the Block RAM readback header (in bits) to the value of the given parameter. |
java.lang.String |
toString()
Returns a String reflecting the Xilinx part type of
the PE represented by this object. |
static java.lang.String |
toString(int peType)
Returns a String reflecting the Xilinx part type of
the PE. |
static int |
whichPEType(java.lang.String peTypeStr)
Returns an integer reflecting the Xilinx part type of the PE based on the encodings given above. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int BYTE_SIZE
public static final int WORD_SIZE
public static final int PAD_WORD_SIZE
public static final int UNKNOWN
public static final int XILINX_UNKNOWN
public static final int XILINX_XC2V40
public static final int XILINX_XC2V80
public static final int XILINX_XC2V250
public static final int XILINX_XC2V500
public static final int XILINX_XC2V1000
public static final int XILINX_XC2V1500
public static final int XILINX_XC2V2000
public static final int XILINX_XC2V3000
public static final int XILINX_XC2V4000
public static final int XILINX_XC2V6000
public static final int XILINX_XC2V8000
public static final int XILINX_XC3S50
public static final int XILINX_XC3S200
public static final int XILINX_XC3S400
public static final int XILINX_XC3S1000
public static final int XILINX_XC3S1500
public static final int XILINX_XC3S2000
public static final int XILINX_XC3S4000
public static final int XILINX_XC3S5000
public static final int FRAME_SIZE_XC2V40
public static final int FRAME_SIZE_XC2V80
public static final int FRAME_SIZE_XC2V250
public static final int FRAME_SIZE_XC2V500
public static final int FRAME_SIZE_XC2V1000
public static final int FRAME_SIZE_XC2V1500
public static final int FRAME_SIZE_XC2V2000
public static final int FRAME_SIZE_XC2V3000
public static final int FRAME_SIZE_XC2V4000
public static final int FRAME_SIZE_XC2V6000
public static final int FRAME_SIZE_XC2V8000
public static final int FRAME_SIZE_XC3S50
public static final int FRAME_SIZE_XC3S200
public static final int FRAME_SIZE_XC3S400
public static final int FRAME_SIZE_XC3S1000
public static final int FRAME_SIZE_XC3S1500
public static final int FRAME_SIZE_XC3S2000
public static final int FRAME_SIZE_XC3S4000
public static final int FRAME_SIZE_XC3S5000
public static final int CONFIG_FRAME_COUNT_XC2V40
public static final int CONFIG_FRAME_COUNT_XC2V80
public static final int CONFIG_FRAME_COUNT_XC2V250
public static final int CONFIG_FRAME_COUNT_XC2V500
public static final int CONFIG_FRAME_COUNT_XC2V1000
public static final int CONFIG_FRAME_COUNT_XC2V1500
public static final int CONFIG_FRAME_COUNT_XC2V2000
public static final int CONFIG_FRAME_COUNT_XC2V3000
public static final int CONFIG_FRAME_COUNT_XC2V4000
public static final int CONFIG_FRAME_COUNT_XC2V6000
public static final int CONFIG_FRAME_COUNT_XC2V8000
public static final int CONFIG_FRAME_COUNT_XC3S50
public static final int CONFIG_FRAME_COUNT_XC3S200
public static final int CONFIG_FRAME_COUNT_XC3S400
public static final int CONFIG_FRAME_COUNT_XC3S1000
public static final int CONFIG_FRAME_COUNT_XC3S1500
public static final int CONFIG_FRAME_COUNT_XC3S2000
public static final int CONFIG_FRAME_COUNT_XC3S4000
public static final int CONFIG_FRAME_COUNT_XC3S5000
public static final int CLB_FRAME_COUNT_XC2V40
public static final int CLB_FRAME_COUNT_XC2V80
public static final int CLB_FRAME_COUNT_XC2V250
public static final int CLB_FRAME_COUNT_XC2V500
public static final int CLB_FRAME_COUNT_XC2V1000
public static final int CLB_FRAME_COUNT_XC2V1500
public static final int CLB_FRAME_COUNT_XC2V2000
public static final int CLB_FRAME_COUNT_XC2V3000
public static final int CLB_FRAME_COUNT_XC2V4000
public static final int CLB_FRAME_COUNT_XC2V6000
public static final int CLB_FRAME_COUNT_XC2V8000
public static final int CLB_FRAME_COUNT_XC3S50
public static final int CLB_FRAME_COUNT_XC3S200
public static final int CLB_FRAME_COUNT_XC3S400
public static final int CLB_FRAME_COUNT_XC3S1000
public static final int CLB_FRAME_COUNT_XC3S1500
public static final int CLB_FRAME_COUNT_XC3S2000
public static final int CLB_FRAME_COUNT_XC3S4000
public static final int CLB_FRAME_COUNT_XC3S5000
public static final int BITMAP_LENGTH_XC2V40
public static final int BITMAP_LENGTH_XC2V80
public static final int BITMAP_LENGTH_XC2V250
public static final int BITMAP_LENGTH_XC2V500
public static final int BITMAP_LENGTH_XC2V1000
public static final int BITMAP_LENGTH_XC2V1500
public static final int BITMAP_LENGTH_XC2V2000
public static final int BITMAP_LENGTH_XC2V3000
public static final int BITMAP_LENGTH_XC2V4000
public static final int BITMAP_LENGTH_XC2V6000
public static final int BITMAP_LENGTH_XC2V8000
public static final int BITMAP_LENGTH_XC3S50
public static final int BITMAP_LENGTH_XC3S200
public static final int BITMAP_LENGTH_XC3S400
public static final int BITMAP_LENGTH_XC3S1000
public static final int BITMAP_LENGTH_XC3S1500
public static final int BITMAP_LENGTH_XC3S2000
public static final int BITMAP_LENGTH_XC3S4000
public static final int BITMAP_LENGTH_XC3S5000
public static final int IDCODE_XC2V40
public static final int IDCODE_XC2V80
public static final int IDCODE_XC2V250
public static final int IDCODE_XC2V500
public static final int IDCODE_XC2V1000
public static final int IDCODE_XC2V1500
public static final int IDCODE_XC2V2000
public static final int IDCODE_XC2V3000
public static final int IDCODE_XC2V4000
public static final int IDCODE_XC2V6000
public static final int IDCODE_XC2V8000
public static final int IDCODE_XC3S50
public static final int IDCODE_XC3S200
public static final int IDCODE_XC3S400
public static final int IDCODE_XC3S1000
public static final int IDCODE_XC3S1500
public static final int IDCODE_XC3S2000
public static final int IDCODE_XC3S4000
public static final int IDCODE_XC3S5000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V40
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V80
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V250
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V500
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V1000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V1500
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V2000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V3000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V4000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V6000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC2V8000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S50
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S200
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S400
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S1000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S1500
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S2000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S4000
public static final int BLOCKRAM_TYPE2_PACKET_HEADER_XC3S5000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V40
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V80
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V250
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V500
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V1000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V1500
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V2000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V3000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V4000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V6000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC2V8000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S50
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S200
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S400
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S1000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S1500
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S2000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S4000
public static final int BLOCKRAM_READBACK_WORD_COUNT_XC3S5000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V40
public static final int CLB_TYPE2_PACKET_HEADER_XC2V80
public static final int CLB_TYPE2_PACKET_HEADER_XC2V250
public static final int CLB_TYPE2_PACKET_HEADER_XC2V500
public static final int CLB_TYPE2_PACKET_HEADER_XC2V1000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V1500
public static final int CLB_TYPE2_PACKET_HEADER_XC2V2000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V3000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V4000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V6000
public static final int CLB_TYPE2_PACKET_HEADER_XC2V8000
public static final int CLB_TYPE2_PACKET_HEADER_XC3S50
public static final int CLB_TYPE2_PACKET_HEADER_XC3S200
public static final int CLB_TYPE2_PACKET_HEADER_XC3S400
public static final int CLB_TYPE2_PACKET_HEADER_XC3S1000
public static final int CLB_TYPE2_PACKET_HEADER_XC3S1500
public static final int CLB_TYPE2_PACKET_HEADER_XC3S2000
public static final int CLB_TYPE2_PACKET_HEADER_XC3S4000
public static final int CLB_TYPE2_PACKET_HEADER_XC3S5000
public static final int CLB_READBACK_WORD_COUNT_XC2V40
public static final int CLB_READBACK_WORD_COUNT_XC2V80
public static final int CLB_READBACK_WORD_COUNT_XC2V250
public static final int CLB_READBACK_WORD_COUNT_XC2V500
public static final int CLB_READBACK_WORD_COUNT_XC2V1000
public static final int CLB_READBACK_WORD_COUNT_XC2V1500
public static final int CLB_READBACK_WORD_COUNT_XC2V2000
public static final int CLB_READBACK_WORD_COUNT_XC2V3000
public static final int CLB_READBACK_WORD_COUNT_XC2V4000
public static final int CLB_READBACK_WORD_COUNT_XC2V6000
public static final int CLB_READBACK_WORD_COUNT_XC2V8000
public static final int CLB_READBACK_WORD_COUNT_XC3S50
public static final int CLB_READBACK_WORD_COUNT_XC3S200
public static final int CLB_READBACK_WORD_COUNT_XC3S400
public static final int CLB_READBACK_WORD_COUNT_XC3S1000
public static final int CLB_READBACK_WORD_COUNT_XC3S1500
public static final int CLB_READBACK_WORD_COUNT_XC3S2000
public static final int CLB_READBACK_WORD_COUNT_XC3S4000
public static final int CLB_READBACK_WORD_COUNT_XC3S5000
public static final int RAM_FRAME_COUNT
Constructor Detail |
public Virtex2BitstreamParams()
public Virtex2BitstreamParams(int idcode)
idcode
- The int
representing the type of the Virtex2
or Spartan3 part.public Virtex2BitstreamParams(java.lang.String peTypeStr, int newClbHeaderBits, int newRamHeaderBits, boolean newByteMirrored)
peTypeStr
- The String
representing the type of
the Virtex2 or Spartan3 part. The String
should have "2Vxxxx" or "3Sxxx" in it, for example a
string such as "XILINX_XC2V1000" will be recognized as a
Virtex2 1000, and "XC3S15" will be recognized as a
Spartan3-15.newClbHeaderBits
- The number of additional header bits for
CLB readback for the platform; usually
the value is 0.newRamHeaderBits
- The number of additional header bits for
BlockRAM readback for the platform;
usually the value is 0.newByteMirrored
- true
if the LSB of a byte is
addressed as bit 0, false
if
the MSB of a byte is addressed as bit
0.Method Detail |
public void setByteMirrored(boolean isByteMirrored)
byteMirrored
field to the value of the
parameter. As mentioned above, a byte array of the readback
bitstream is considered byte mirrored (byteMirrored
= true) if the LSB of the byte is bit 0 and the MSB is bit 7 when
addressing bits in a byte. Otherwise, the bytes are not byte
mirrored (byteMirrored
= false), meaning bit 0 of
the bytes is the MSB and bit 7 is the LSB.
isByteMirrored
- The byteMirrored
property is
set to this parameter value.public boolean isByteMirrored()
byteMirrored
property,
discussed above.
byteMirrored
property.public void setPEType(int newPeType)
static final
int
"constants" defined earlier.
newPeType
- The integer parameter having a value of
XILINX_????? from the constants provided above.public void setPETypeWithIdcode(int idcode)
idcode
- The 32-bit idcode. The upper 4 bits are
ignored, since they vary between revisions
of the same part & so are not useful.public void setPEType(java.lang.String newPeType)
String
parameter which contains "Vxxx" for a Virtex2 part and "2Sxxx"
for a Spartan3 part. So, "XC2V1000" will be recognized as
a Virtex2 1000, and "xilinx_xc3s200" will be recognized as a Spartan
200.
newPeType
- The String
parameter describing
the part as indicated above.public int getPEType()
getPEType
in class XilinxBitstreamParams
public int getBitstreamLength()
getBitstreamLength
in class XilinxBitstreamParams
public int getBytestreamLength()
getBytestreamLength
in class XilinxBitstreamParams
public int getCLBByteCount()
getCLBByteCount
in class XilinxBitstreamParams
public int getBRAMByteCount()
getBRAMByteCount
in class XilinxBitstreamParams
public void setCLBHeaderBits(int newCLBHeaderBits)
newCLBHeaderBits
- The new length of the header in bits.public int getCLBHeaderBits()
getCLBHeaderBits
in class XilinxBitstreamParams
public void setRAMHeaderBits(int newRAMHeaderBits)
newRAMHeaderBits
- The new length of the BlockRAM header in
bits.public int getRAMHeaderBits()
getRAMHeaderBits
in class XilinxBitstreamParams
public int getRAMFrameCount()
getRAMFrameCount
in class XilinxBitstreamParams
public int getFrameSize()
getFrameSize
in class XilinxBitstreamParams
public int getCLBFrameCount()
getCLBFrameCount
in class XilinxBitstreamParams
public int getBitmapLength()
getBitmapLength
in class XilinxBitstreamParams
public java.lang.String getPart(int idcode)
idcode
- The int
should be an idcode as defined in
XAPP139 page 7 for Virtex2 or XAPP188 page 6 for Spartan 2
devices.
public int getBlockRAMReadBackWordCount(java.lang.String part)
getBlockRAMReadBackWordCount()
, after
setting the part type with setPEType(String)
or
setPEType(int)
or setPETypeWithIdcode(int)
.
Returns the word count for BlockRAM readback
part
- The String
should be the name of the part, ie
"XC2V800" or "XC2S15".
public int getBlockRAMReadBackWordCount()
getBlockRAMReadBackWordCount
in class XilinxBitstreamParams
public int getBlockRAMPacketHeader(java.lang.String part)
getBlockRAMPacketHeader()
, after
setting the part type with setPEType(String)
or
setPEType(int)
or setPETypeWithIdcode(int)
.
part
- The String
should be the name of the part, ie
"XC2V800" or "XC2S15".
public int getBlockRAMPacketHeader()
getBlockRAMPacketHeader
in class XilinxBitstreamParams
public int getCLBReadBackWordCount()
getCLBReadBackWordCount
in class XilinxBitstreamParams
public int getCLBPacketHeader()
getCLBPacketHeader
in class XilinxBitstreamParams
public java.lang.String toString()
String
reflecting the Xilinx part type of
the PE represented by this object. The string is in the format
"XC2V4000" for Virtex2 devices and "XC2S150" for Spartan2 devices.
toString
in class XilinxBitstreamParams
String
representing the part type based on
the part type encodings given above.public static java.lang.String toString(int peType)
String
reflecting the Xilinx part type of
the PE. Note that this is a static
method. The string
is in the format "XC2V4000" for Virtex2 devices and "XC2S150" for Spartan2
devices.
peType
- The integer representing the part type.
public static int peType(int idcode)
public static int whichPEType(java.lang.String peTypeStr)
String
should have
"Vxxxx" or "2Sxxx" in it, for example a string such as
"XILINX_XC2V4000" will be recognized as a Virtex2 800,
and "XC2S15" will be recognized as a Spartan2 15.
public int calculateCLBOffset(RBLocation rbl)
rbl
- The RBLocation
object holding the frame
and frame offset location information for a specific
state bit.
public int calculateBRAMOffset(RBLocation rbl)
rbl
- The RBLocation
object holding the frame
and frame offset location information for a specific
state bit.
public int calculateCLBOffset(int frame, int frameOffset)
frame
- The frame number for a specific state bit.frameOffset
- The frame Offset for a specific state bit.
public int calculateBRAMOffset(int frame, int frameOffset)
frame
- The frame number for a specific state bit.frameOffset
- The frame Offset for a specific state bit.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |