|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.platforms.util.readback.Xilinx.Virtex.LL_Virtex
The Xilinx Logical Allocation file (.ll file) parser for Virtex
FPGAs. The parser fills two Hashtable
objects with the
readback bitstream information for state elements in the Virtex
design. One Hashtable
is filled with RAM bitstream
information keyed on physical location (block name) while the
second holds the bitstream information for flip-flops keyed on
physical location (block name). The grammar is not published but
was developed from looking at the file format.
Field Summary | |
Token |
jj_nt
|
Token |
token
|
LL_VirtexTokenManager |
token_source
|
Fields inherited from interface byucc.jhdl.platforms.util.readback.Xilinx.Virtex.LL_VirtexConstants |
BIT, BLOCK, BLOCKRAM, COLON, COMPARE, DEFAULT, EOF, EQUAL, HEXNUM, I, ID, IN_LINE_COMMENT, INFO, IQ, LANGLE, LATCH, LBRACKET, LUT, NET, NETEXT, NO, NUM, O, PAD, RAM, RANGLE, RBRACKET, REVISION, ROM, T, tokenImage, X, XQ, XX, Y, YES, YQ |
Constructor Summary | |
LL_Virtex(java.io.InputStream stream)
|
|
LL_Virtex(LL_VirtexTokenManager tm)
|
|
LL_Virtex(java.io.Reader stream)
|
Method Summary | |
void |
Attributes(int offset,
int frame,
int frameOffset,
java.lang.String block)
Parses the "attributes" of a state bit in the readback bitstream, which define whether it belongs to a flip-flop, a RAM, or a ROM and other related information. |
void |
BitStreamEntry()
Parses an entire readback bitstream location entry for a state element. |
java.lang.String |
Block()
Parses the information regarding location of the IOB/SLICE/BLOCKRAM and returns the information as a String . |
void |
Compare()
Parses "COMPARE=..." clauses, which are otherwise ignored. |
void |
disable_tracing()
|
void |
enable_tracing()
|
ParseException |
generateParseException()
|
java.util.Hashtable |
getNetHashBlock()
Returning a reference to the NetHashBlock , which
holds a LatchRBEntry for each flip-flop in the .ll file
keyed on the location and the latch type (XQ, YQ, etc.) |
Token |
getNextToken()
|
java.util.Hashtable |
getRAMGroupHash()
Returns a reference to the RAMGroupHash , which holds
a RAMGroup object for each RAM in the .ll file keyed on
the location of the RAM and the RAM type (F, G, M, or B). |
Token |
getToken(int index)
|
boolean |
hasAbsoluteOffsets()
Returns true if the LL file provides absolute offsets and false otherwise. |
void |
InfoEntry()
Parses any entries in the LL file which do not directly associate state elements with readback bitstream locations. |
void |
InfoValue()
Parses the value of any the informational entries in the LL file. |
void |
initTables()
Initializes the Hashtables and counts. |
java.lang.String |
Latch()
Parses the entire clause having the type of the flip-flop and returns the flip-flop type as a String. |
java.lang.String |
LatchType()
Defines the various flip-flop types and returns the type as a String . |
static void |
main(java.lang.String[] args)
Instances and initializes the parser and parses the input from System.in |
void |
Net(int offset,
int frame,
int frameOffset,
java.lang.String block,
java.lang.String latchType)
Parses the entire "Net=..." clause. |
void |
NetName(int offset,
int frame,
int frameOffset,
java.lang.String block,
java.lang.String latchType)
Parses the net names associated with latches and stores a LatchRBEntry object in the NetHashBlock
Hashtable . |
void |
parseLL()
Initiates the parsing of an .ll file and prints out
statistics about the number of flip-flops (latches) and RAMs it
found. |
void |
Ram(int offset,
int frame,
int frameOffset,
java.lang.String block)
Parses the "Ram=..." clauses of the RAM LL entries and enters the data into the RAMGroupHash . |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(LL_VirtexTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
void |
Revision()
Parses the revision information for the .ll file. |
void |
Rom()
Parses "Rom=..." entries, but doesn't do anything with them. |
void |
YesNo()
Parses "YES/NO" clauses. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public LL_VirtexTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
public LL_Virtex(java.io.InputStream stream)
public LL_Virtex(java.io.Reader stream)
public LL_Virtex(LL_VirtexTokenManager tm)
Method Detail |
public static void main(java.lang.String[] args) throws ParseException
System.in
args
- Command line arguments (ignored by the method)
ParseException
public void initTables()
Hashtables
and counts.
public java.util.Hashtable getRAMGroupHash()
RAMGroupHash
, which holds
a RAMGroup
object for each RAM in the .ll file keyed on
the location of the RAM and the RAM type (F, G, M, or B).
RAMGroupHash
public java.util.Hashtable getNetHashBlock()
NetHashBlock
, which
holds a LatchRBEntry
for each flip-flop in the .ll file
keyed on the location and the latch type (XQ, YQ, etc.)
NetHashBlock
public boolean hasAbsoluteOffsets()
true
if absolute offsets are provide,
false
otherwise.public final java.lang.String LatchType() throws ParseException
String
.
String
for flip-flop type.
ParseException
public final void parseLL() throws ParseException
.ll
file and prints out
statistics about the number of flip-flops (latches) and RAMs it
found.
ParseException
public final void Revision() throws ParseException
ParseException
public final java.lang.String Block() throws ParseException
String
.
ParseException
public final java.lang.String Latch() throws ParseException
String
.
ParseException
public final void NetName(int offset, int frame, int frameOffset, java.lang.String block, java.lang.String latchType) throws ParseException
LatchRBEntry
object in the NetHashBlock
Hashtable
. The method handles both angle brackets ("<>")
and square brackets ("[]") for net names. In some strange
circumstances, it was necessary to handle names which extended
beyond the array naming construct (in other words, there was still
part of the name after the last "]" or ">"). In these cases, the
names are considered atomic (not multi-bit), so the index variable
is reset to "-1".
offset
- The first offset provided by the LL file for this
flip-flop; it is actually a junk bit in the readback
bitstream.frame
- The frame number for this flip-flops readback data
provided by the LL file.frameOffset
- The offset within the frame for this flip-flop's
readback data provided by the LL file.block
- The block's name and location.latchType
- The type of the flip-flop.
ParseException
public final void Net(int offset, int frame, int frameOffset, java.lang.String block, java.lang.String latchType) throws ParseException
offset
- The first offset provided by the LL file for this
flip-flop; it is actually a junk bit in the readback
bitstream.frame
- The frame number for this flip-flops readback data
provided by the LL file.frameOffset
- The offset within the frame for this flip-flop's
readback data provided by the LL file.block
- The block's name and location.latchType
- The type of the flip-flop.
ParseException
public final void Ram(int offset, int frame, int frameOffset, java.lang.String block) throws ParseException
RAMGroupHash
. Since a certain RAM may
already have a RAMGroup
entry in the
RAMGroupHash
, the method performs a lookup first to
see if the RAM's RAMGroup
entry exists. If the entry
exists, the method adds a RAMRBEntry
to the
RAMGroup
which was found. Otherwise, the method
creates a new RAMGroup
and adds an
RAMRBEntry
to it. This method handles both LUT RAMs
and BlockRAMs.
offset
- The first offset provided by the LL file for this
flip-flop; it is actually a junk bit in the readback
bitstream.frame
- The frame number for this flip-flops readback data
provided by the LL file.frameOffset
- The offset within the frame for this flip-flop's
readback data provided by the LL file.block
- The block's name and location.
ParseException
public final void Rom() throws ParseException
ParseException
public final void YesNo() throws ParseException
ParseException
public final void Compare() throws ParseException
ParseException
public final void Attributes(int offset, int frame, int frameOffset, java.lang.String block) throws ParseException
offset
- The first offset provided by the LL file for this
flip-flop; it is actually a junk bit in the readback
bitstream.frame
- The frame number for this flip-flops readback data
provided by the LL file.frameOffset
- The offset within the frame for this flip-flop's
readback data provided by the LL file.block
- The block's name and location.
ParseException
public final void BitStreamEntry() throws ParseException
ParseException
public final void InfoValue() throws ParseException
ParseException
public final void InfoEntry() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(LL_VirtexTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |