byucc.jhdl.platforms.util.readback.Xilinx.XC4000
Class XC4KBitstreamParams

java.lang.Object
  extended bybyucc.jhdl.platforms.util.readback.Xilinx.XC4000.XC4KBitstreamParams

public class XC4KBitstreamParams
extends java.lang.Object

This class is used to record the information about a specific XC4000 FPGA during the creation of a .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 (.ll) file. The information this class records about a specific FPGA includes the PE type, the readback bitstream header length, the bit ordering within each byte, and the frame size. Further, this class defines constants for each supported Xilinx XC4000 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.

Author:
Paul Graham

Field Summary
static int BYTE_SIZE
          The length of a byte in bits.
static int FRAME_COUNT_4006E
          The frame count for an XC4006E part type
static int FRAME_COUNT_4010EX
          The frame count for an XC4010EX/XL part type
static int FRAME_COUNT_40110XV
          The frame count for an XC40110XV part type
static int FRAME_COUNT_4013E
          The frame count for an XC4013E part type
static int FRAME_COUNT_4013EX
          The frame count for an XC4013EX/XL part type
static int FRAME_COUNT_4013XLA
          The frame count for an XC4013XLA part type
static int FRAME_COUNT_40150XV
          The frame count for an XC40150XV part type
static int FRAME_COUNT_40200XV
          The frame count for an XC40200XV part type
static int FRAME_COUNT_4020E
          The frame count for an XC4020E part type
static int FRAME_COUNT_4020EX
          The frame count for an XC4020EX/XL part type
static int FRAME_COUNT_4020XLA
          The frame count for an XC4020XLA part type
static int FRAME_COUNT_4025
          The frame count for an XC4025 part type
static int FRAME_COUNT_40250XV
          The frame count for an XC40250XV part type
static int FRAME_COUNT_4025E
          The frame count for an XC4025E part type
static int FRAME_COUNT_4028EX
          The frame count for an XC4028EX/XL part type
static int FRAME_COUNT_4028XLA
          The frame count for an XC4028XLA part type
static int FRAME_COUNT_4036EX
          The frame count for an XC4036EX/XL part type
static int FRAME_COUNT_4036XLA
          The frame count for an XC4036XLA part type
static int FRAME_COUNT_4044EX
          The frame count for an XC4044EX/XL part type
static int FRAME_COUNT_4044XLA
          The frame count for an XC4044XLA part type
static int FRAME_COUNT_4052EX
          The frame count for an XC4052EX/XL part type
static int FRAME_COUNT_4052XLA
          The frame count for an XC4052XLA part type
static int FRAME_COUNT_4062EX
          The frame count for an XC4062EX/XL part type
static int FRAME_COUNT_4062XLA
          The frame count for an XC4062XLA part type
static int FRAME_COUNT_4085EX
          The frame count for an XC4085EX/XL part type
static int FRAME_COUNT_4085XLA
          The frame count for an XC4085XLA part type
static int FRAME_COUNT_UNKNOWN
          The frame count for an unknown XC4K part type
static int FRAME_SIZE_4006E
          The frame size for an XC4006E part type
static int FRAME_SIZE_4010EX
          The frame size for an XC4010EX/XL part type
static int FRAME_SIZE_40110XV
          The frame size for an XC40110XV part type
static int FRAME_SIZE_4013E
          The frame size for an XC4013E part type
static int FRAME_SIZE_4013EX
          The frame size for an XC4013EX/XL part type
static int FRAME_SIZE_4013XLA
          The frame size for an XC4013XLA part type
static int FRAME_SIZE_40150XV
          The frame size for an XC40150XV part type
static int FRAME_SIZE_40200XV
          The frame size for an XC40200XV part type
static int FRAME_SIZE_4020E
          The frame size for an XC4020E part type
static int FRAME_SIZE_4020EX
          The frame size for an XC4020EX/XL part type
static int FRAME_SIZE_4020XLA
          The frame size for an XC4020XLA part type
static int FRAME_SIZE_4025
          The frame size for an XC4025 part type
static int FRAME_SIZE_40250XV
          The frame size for an XC40250XV part type
static int FRAME_SIZE_4025E
          The frame size for an XC4025E part type
static int FRAME_SIZE_4028EX
          The frame size for an XC4028EX/XL part type
static int FRAME_SIZE_4028XLA
          The frame size for an XC4028XLA part type
static int FRAME_SIZE_4036EX
          The frame size for an XC4036EX/XL part type
static int FRAME_SIZE_4036XLA
          The frame size for an XC4036XLA part type
static int FRAME_SIZE_4044EX
          The frame size for an XC4044EX/XL part type
static int FRAME_SIZE_4044XLA
          The frame size for an XC4044XLA part type
static int FRAME_SIZE_4052EX
          The frame size for an XC4052EX/XL part type
static int FRAME_SIZE_4052XLA
          The frame size for an XC4052XLA part type
static int FRAME_SIZE_4062EX
          The frame size for an XC4062EX/XL part type
static int FRAME_SIZE_4062XLA
          The frame size for an XC4062XLA part type
static int FRAME_SIZE_4085EX
          The frame size for an XC4085EX/XL part type
static int FRAME_SIZE_4085XLA
          The frame size for an XC4085XLA part type
static int FRAME_SIZE_UNKNOWN
          The frame size for an unknown XC4K part type
static int FRAME_START_BITS
          The number of start bits per frame.
static int FRAME_STOP_BITS
          The number of stop bits per frame.
static int RB_POSTAMBLE_SIZE
          The size of one start bit and 11 CRC bits
static int XILINX_4006E
          Defines the encoding for an XC4006E part type
static int XILINX_4010EX
          Defines the encoding for an XC4010EX/XL part type
static int XILINX_40110XV
          Defines the encoding for an XC40110XV part type
static int XILINX_4013E
          Defines the encoding for an XC4013E part type
static int XILINX_4013EX
          Defines the encoding for an XC4013EX/XL part type
static int XILINX_4013XLA
          Defines the encoding for an XC4013XLA part type
static int XILINX_40150XV
          Defines the encoding for an XC40150XV part type
static int XILINX_40200XV
          Defines the encoding for an XC40200XV part type
static int XILINX_4020E
          Defines the encoding for an XC4020E part type
static int XILINX_4020EX
          Defines the encoding for an XC4020EX/XL part type
static int XILINX_4020XLA
          Defines the encoding for an XC4020XLA part type
static int XILINX_4025
          Defines the encoding for an XC4025 part type
static int XILINX_40250XV
          Defines the encoding for an XC40250XV part type
static int XILINX_4025E
          Defines the encoding for an XC4025E part type
static int XILINX_4028EX
          Defines the encoding for an XC4028EX/XL part type
static int XILINX_4028XLA
          Defines the encoding for an XC4028XLA part type
static int XILINX_4036EX
          Defines the encoding for an XC4036EX/XL part type
static int XILINX_4036XLA
          Defines the encoding for an XC4036XLA part type
static int XILINX_4044EX
          Defines the encoding for an XC4044EX/XL part type
static int XILINX_4044XLA
          Defines the encoding for an XC4044XLA part type
static int XILINX_4052EX
          Defines the encoding for an XC4052EX/XL part type
static int XILINX_4052XLA
          Defines the encoding for an XC4052XLA part type
static int XILINX_4062EX
          Defines the encoding for an XC4062EX/XL part type
static int XILINX_4062XLA
          Defines the encoding for an XC4062XLA part type
static int XILINX_4085EX
          Defines the encoding for an XC4085EX/XL part type
static int XILINX_4085XLA
          Defines the encoding for an XC4085XLA part type
static int XILINX_UNKNOWN
          Defines the encoding for an unknown XC4K part type
 
Constructor Summary
XC4KBitstreamParams()
          Constructs an object, setting the value of the PE type to XILINX_UNKNOWN, the header length in bits to 5 (the standard readback bitstream header length for XC4000), and the byte ordering to byteMirrored false (in other words, bit 0 is the MSB of the byte).
XC4KBitstreamParams(java.lang.String peTypeStr, int newHeaderBits, boolean newByteMirrored)
          Constructs an object setting the value of the PE type, the header length, byte ordering according to the parameters given.
 
Method Summary
 int calculateRBOffset(int llOffset)
          Calculates the absolute offset of a readback state bit based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen".
 int getBitstreamLength()
          Returns the bitstream length in terms of bits based on the declared PE type and header length in bits.
 int getBytestreamLength()
          Returns the bitstream length in terms of bytes based on the declared PE type and header lengths in bits.
 int getFrameCount()
          Maps a PE type to a bitstream frame count based on the encodings for the part type defined in the constants above.
 int getFrameSize()
          Maps a PE type to a frame size based on the encodings for the part type defined in the constants above.
 int getHeaderBits()
          Returns the current length of the header, in bits.
 int getPEType()
          Returns the integer value representing the part type of the PE.
 boolean isByteMirrored()
          Returns the values of the byteMirrored property, discussed above.
 void setByteMirrored(boolean isByteMirrored)
          Sets the byteMirrored field to the value of the parameter.
 void setHeaderBits(int newHeaderBits)
          Sets the length of the header (in bits) to the parameter of the method.
 void setPEType(int newPeType)
          Sets the value of the PE type using the static final int "constants" defined earlier.
 java.lang.String toString()
          Returns a String reflecting the Xilinx part type of the PE.
static java.lang.String validPartTypes()
          Returns a String reflecting the Xilinx part type of the PE.
static int whichPEType(java.lang.String peTypeStr)
          Returns an int reflecting the Xilinx part type of the PE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XILINX_UNKNOWN

public static final int XILINX_UNKNOWN
Defines the encoding for an unknown XC4K part type

See Also:
Constant Field Values

XILINX_4025

public static final int XILINX_4025
Defines the encoding for an XC4025 part type

See Also:
Constant Field Values

XILINX_4025E

public static final int XILINX_4025E
Defines the encoding for an XC4025E part type

See Also:
Constant Field Values

XILINX_4020E

public static final int XILINX_4020E
Defines the encoding for an XC4020E part type

See Also:
Constant Field Values

XILINX_4013E

public static final int XILINX_4013E
Defines the encoding for an XC4013E part type

See Also:
Constant Field Values

XILINX_4006E

public static final int XILINX_4006E
Defines the encoding for an XC4006E part type

See Also:
Constant Field Values

XILINX_4028EX

public static final int XILINX_4028EX
Defines the encoding for an XC4028EX/XL part type

See Also:
Constant Field Values

XILINX_4036EX

public static final int XILINX_4036EX
Defines the encoding for an XC4036EX/XL part type

See Also:
Constant Field Values

XILINX_4044EX

public static final int XILINX_4044EX
Defines the encoding for an XC4044EX/XL part type

See Also:
Constant Field Values

XILINX_4052EX

public static final int XILINX_4052EX
Defines the encoding for an XC4052EX/XL part type

See Also:
Constant Field Values

XILINX_4062EX

public static final int XILINX_4062EX
Defines the encoding for an XC4062EX/XL part type

See Also:
Constant Field Values

XILINX_4010EX

public static final int XILINX_4010EX
Defines the encoding for an XC4010EX/XL part type

See Also:
Constant Field Values

XILINX_4085EX

public static final int XILINX_4085EX
Defines the encoding for an XC4085EX/XL part type

See Also:
Constant Field Values

XILINX_4013EX

public static final int XILINX_4013EX
Defines the encoding for an XC4013EX/XL part type

See Also:
Constant Field Values

XILINX_4020EX

public static final int XILINX_4020EX
Defines the encoding for an XC4020EX/XL part type

See Also:
Constant Field Values

XILINX_4013XLA

public static final int XILINX_4013XLA
Defines the encoding for an XC4013XLA part type

See Also:
Constant Field Values

XILINX_4020XLA

public static final int XILINX_4020XLA
Defines the encoding for an XC4020XLA part type

See Also:
Constant Field Values

XILINX_4028XLA

public static final int XILINX_4028XLA
Defines the encoding for an XC4028XLA part type

See Also:
Constant Field Values

XILINX_4036XLA

public static final int XILINX_4036XLA
Defines the encoding for an XC4036XLA part type

See Also:
Constant Field Values

XILINX_4044XLA

public static final int XILINX_4044XLA
Defines the encoding for an XC4044XLA part type

See Also:
Constant Field Values

XILINX_4052XLA

public static final int XILINX_4052XLA
Defines the encoding for an XC4052XLA part type

See Also:
Constant Field Values

XILINX_4062XLA

public static final int XILINX_4062XLA
Defines the encoding for an XC4062XLA part type

See Also:
Constant Field Values

XILINX_4085XLA

public static final int XILINX_4085XLA
Defines the encoding for an XC4085XLA part type

See Also:
Constant Field Values

XILINX_40110XV

public static final int XILINX_40110XV
Defines the encoding for an XC40110XV part type

See Also:
Constant Field Values

XILINX_40150XV

public static final int XILINX_40150XV
Defines the encoding for an XC40150XV part type

See Also:
Constant Field Values

XILINX_40200XV

public static final int XILINX_40200XV
Defines the encoding for an XC40200XV part type

See Also:
Constant Field Values

XILINX_40250XV

public static final int XILINX_40250XV
Defines the encoding for an XC40250XV part type

See Also:
Constant Field Values

FRAME_SIZE_UNKNOWN

public static final int FRAME_SIZE_UNKNOWN
The frame size for an unknown XC4K part type

See Also:
Constant Field Values

FRAME_SIZE_4025

public static final int FRAME_SIZE_4025
The frame size for an XC4025 part type

See Also:
Constant Field Values

FRAME_SIZE_4006E

public static final int FRAME_SIZE_4006E
The frame size for an XC4006E part type

See Also:
Constant Field Values

FRAME_SIZE_4013E

public static final int FRAME_SIZE_4013E
The frame size for an XC4013E part type

See Also:
Constant Field Values

FRAME_SIZE_4020E

public static final int FRAME_SIZE_4020E
The frame size for an XC4020E part type

See Also:
Constant Field Values

FRAME_SIZE_4025E

public static final int FRAME_SIZE_4025E
The frame size for an XC4025E part type

See Also:
Constant Field Values

FRAME_SIZE_4010EX

public static final int FRAME_SIZE_4010EX
The frame size for an XC4010EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4013EX

public static final int FRAME_SIZE_4013EX
The frame size for an XC4013EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4020EX

public static final int FRAME_SIZE_4020EX
The frame size for an XC4020EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4028EX

public static final int FRAME_SIZE_4028EX
The frame size for an XC4028EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4036EX

public static final int FRAME_SIZE_4036EX
The frame size for an XC4036EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4044EX

public static final int FRAME_SIZE_4044EX
The frame size for an XC4044EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4052EX

public static final int FRAME_SIZE_4052EX
The frame size for an XC4052EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4062EX

public static final int FRAME_SIZE_4062EX
The frame size for an XC4062EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4085EX

public static final int FRAME_SIZE_4085EX
The frame size for an XC4085EX/XL part type

See Also:
Constant Field Values

FRAME_SIZE_4013XLA

public static final int FRAME_SIZE_4013XLA
The frame size for an XC4013XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4020XLA

public static final int FRAME_SIZE_4020XLA
The frame size for an XC4020XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4028XLA

public static final int FRAME_SIZE_4028XLA
The frame size for an XC4028XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4036XLA

public static final int FRAME_SIZE_4036XLA
The frame size for an XC4036XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4044XLA

public static final int FRAME_SIZE_4044XLA
The frame size for an XC4044XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4052XLA

public static final int FRAME_SIZE_4052XLA
The frame size for an XC4052XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4062XLA

public static final int FRAME_SIZE_4062XLA
The frame size for an XC4062XLA part type

See Also:
Constant Field Values

FRAME_SIZE_4085XLA

public static final int FRAME_SIZE_4085XLA
The frame size for an XC4085XLA part type

See Also:
Constant Field Values

FRAME_SIZE_40110XV

public static final int FRAME_SIZE_40110XV
The frame size for an XC40110XV part type

See Also:
Constant Field Values

FRAME_SIZE_40150XV

public static final int FRAME_SIZE_40150XV
The frame size for an XC40150XV part type

See Also:
Constant Field Values

FRAME_SIZE_40200XV

public static final int FRAME_SIZE_40200XV
The frame size for an XC40200XV part type

See Also:
Constant Field Values

FRAME_SIZE_40250XV

public static final int FRAME_SIZE_40250XV
The frame size for an XC40250XV part type

See Also:
Constant Field Values

FRAME_COUNT_UNKNOWN

public static final int FRAME_COUNT_UNKNOWN
The frame count for an unknown XC4K part type

See Also:
Constant Field Values

FRAME_COUNT_4025

public static final int FRAME_COUNT_4025
The frame count for an XC4025 part type

See Also:
Constant Field Values

FRAME_COUNT_4006E

public static final int FRAME_COUNT_4006E
The frame count for an XC4006E part type

See Also:
Constant Field Values

FRAME_COUNT_4013E

public static final int FRAME_COUNT_4013E
The frame count for an XC4013E part type

See Also:
Constant Field Values

FRAME_COUNT_4020E

public static final int FRAME_COUNT_4020E
The frame count for an XC4020E part type

See Also:
Constant Field Values

FRAME_COUNT_4025E

public static final int FRAME_COUNT_4025E
The frame count for an XC4025E part type

See Also:
Constant Field Values

FRAME_COUNT_4010EX

public static final int FRAME_COUNT_4010EX
The frame count for an XC4010EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4013EX

public static final int FRAME_COUNT_4013EX
The frame count for an XC4013EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4020EX

public static final int FRAME_COUNT_4020EX
The frame count for an XC4020EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4028EX

public static final int FRAME_COUNT_4028EX
The frame count for an XC4028EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4036EX

public static final int FRAME_COUNT_4036EX
The frame count for an XC4036EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4044EX

public static final int FRAME_COUNT_4044EX
The frame count for an XC4044EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4052EX

public static final int FRAME_COUNT_4052EX
The frame count for an XC4052EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4062EX

public static final int FRAME_COUNT_4062EX
The frame count for an XC4062EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4085EX

public static final int FRAME_COUNT_4085EX
The frame count for an XC4085EX/XL part type

See Also:
Constant Field Values

FRAME_COUNT_4013XLA

public static final int FRAME_COUNT_4013XLA
The frame count for an XC4013XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4020XLA

public static final int FRAME_COUNT_4020XLA
The frame count for an XC4020XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4028XLA

public static final int FRAME_COUNT_4028XLA
The frame count for an XC4028XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4036XLA

public static final int FRAME_COUNT_4036XLA
The frame count for an XC4036XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4044XLA

public static final int FRAME_COUNT_4044XLA
The frame count for an XC4044XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4052XLA

public static final int FRAME_COUNT_4052XLA
The frame count for an XC4052XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4062XLA

public static final int FRAME_COUNT_4062XLA
The frame count for an XC4062XLA part type

See Also:
Constant Field Values

FRAME_COUNT_4085XLA

public static final int FRAME_COUNT_4085XLA
The frame count for an XC4085XLA part type

See Also:
Constant Field Values

FRAME_COUNT_40110XV

public static final int FRAME_COUNT_40110XV
The frame count for an XC40110XV part type

See Also:
Constant Field Values

FRAME_COUNT_40150XV

public static final int FRAME_COUNT_40150XV
The frame count for an XC40150XV part type

See Also:
Constant Field Values

FRAME_COUNT_40200XV

public static final int FRAME_COUNT_40200XV
The frame count for an XC40200XV part type

See Also:
Constant Field Values

FRAME_COUNT_40250XV

public static final int FRAME_COUNT_40250XV
The frame count for an XC40250XV part type

See Also:
Constant Field Values

RB_POSTAMBLE_SIZE

public static final int RB_POSTAMBLE_SIZE
The size of one start bit and 11 CRC bits

See Also:
Constant Field Values

BYTE_SIZE

public static final int BYTE_SIZE
The length of a byte in bits.

See Also:
Constant Field Values

FRAME_START_BITS

public static final int FRAME_START_BITS
The number of start bits per frame.

See Also:
Constant Field Values

FRAME_STOP_BITS

public static final int FRAME_STOP_BITS
The number of stop bits per frame.

See Also:
Constant Field Values
Constructor Detail

XC4KBitstreamParams

public XC4KBitstreamParams()
Constructs an object, setting the value of the PE type to XILINX_UNKNOWN, the header length in bits to 5 (the standard readback bitstream header length for XC4000), and the byte ordering to byteMirrored false (in other words, bit 0 is the MSB of the byte).


XC4KBitstreamParams

public XC4KBitstreamParams(java.lang.String peTypeStr,
                           int newHeaderBits,
                           boolean newByteMirrored)
Constructs an object setting the value of the PE type, the header length, byte ordering according to the parameters given.

Parameters:
peTypeStr - The String representing the type of the XC4000 part. The String has the form of "40xxxx(E/EX/XLA/XV)" or "XC40xxxx(E/EX/XLA/XV)".
newHeaderBits - The length of the header (all bits up to but not including the first frame's start bit).
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

setByteMirrored

public void setByteMirrored(boolean isByteMirrored)
Sets the 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.

Parameters:
isByteMirrored - The byteMirrored property is set to this parameter value.

isByteMirrored

public boolean isByteMirrored()
Returns the values of the byteMirrored property, discussed above.

Returns:
The value of the byteMirrored property.

setPEType

public void setPEType(int newPeType)
Sets the value of the PE type using the static final int "constants" defined earlier.

Parameters:
newPeType - The integer parameter having a value of XILINX_????? from the constants provided above.

getPEType

public int getPEType()
Returns the integer value representing the part type of the PE.

Returns:
The integer value representing the Xilinx part type of the PE.

getBitstreamLength

public int getBitstreamLength()
Returns the bitstream length in terms of bits based on the declared PE type and header length in bits.

Returns:
The length of the bitstream in bits.

getBytestreamLength

public int getBytestreamLength()
Returns the bitstream length in terms of bytes based on the declared PE type and header lengths in bits.

Returns:
The length of the bitstream in bytes, rounded up to the next byte if the length does not end exactly on a byte boundary.

setHeaderBits

public void setHeaderBits(int newHeaderBits)
Sets the length of the header (in bits) to the parameter of the method.

Parameters:
newHeaderBits - The new length of the header in bits.

getHeaderBits

public int getHeaderBits()
Returns the current length of the header, in bits.

Returns:
The length of the header in bits.

getFrameSize

public int getFrameSize()
Maps a PE type to a frame size based on the encodings for the part type defined in the constants above.

Returns:
The frame size (or length) in bits for the given part type.

getFrameCount

public int getFrameCount()
Maps a PE type to a bitstream frame count based on the encodings for the part type defined in the constants above.

Returns:
The number of frames for the given part type.

toString

public java.lang.String toString()
Returns a String reflecting the Xilinx part type of the PE.

Returns:
A String representing the part type based on the part type encodings given above.

whichPEType

public static int whichPEType(java.lang.String peTypeStr)
Returns an int reflecting the Xilinx part type of the PE.

Parameters:
peTypeStr - The name of the part as a String.
Returns:
An int representing the part type based on the part type encodings given above.

calculateRBOffset

public int calculateRBOffset(int llOffset)
Calculates the absolute offset of a readback state bit based on the offset provided by the Xilinx Logical Allocation file (.ll) created by "bitgen".

Parameters:
llOffset - An integer offset for a state bit in the readback bitstream.
Returns:
The absolute offset of the state bit, taking into account the extra bits accompanying each frame.

validPartTypes

public static java.lang.String validPartTypes()
Returns a String reflecting the Xilinx part type of the PE.

Returns:
A String representing the part type based on the part type encodings given above.


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