|
|||||||||||
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.MRP_Virtex
This class parses Section 5 (the optimization section) of Virtex
.mrp (Map report) files generated with the -detail
option to Map and builds a MergedSignalsHash
which
relates physical signal names to all their logical signal aliases.
Though only the merged signals are really recorded, the grammar is
"complete" for the entire section. The parser skips the rest of
the file by returning at the end of the section. As mentioned
before, the parser produces a Hashtable of
MergedSignals
which reflects the signals that were
merged by the Xilinx Map tool. The parser handles multi-level
merges, in other words, when a signal has been merged into one
signal and then that signal is merged into to yet others.
Field Summary | |
Token |
jj_nt
|
Token |
token
|
MRP_VirtexTokenManager |
token_source
|
Fields inherited from interface byucc.jhdl.platforms.util.readback.Xilinx.Virtex.MRP_VirtexConstants |
BLOCK, COLON, COMMA, DEFAULT, EOF, EQUAL, EXT_SELECTIO, ID, IDCONTINUATION, LANGLE, LBRACKET, LOADLESSBLOCK, LOGICNAME, LPAREN, MERGEDSIGNALS, NETEXT, NUM, OPTIMIZEDBLOCKS, PERIOD, PRIM_TYPE, PRIMITIVE, RANGLE, RBRACKET, REDUNDANTBLOCKS, REMOVED, RPAREN, SECTION5, SECTION6, SELECTIO, SOURCELESSBLOCK, THESIGNAL, TOENABLEPRINTING, tokenImage, TRIMMEDLOGIC1, TRIMMEDLOGIC2, TYPE, UNUSEDBLOCK |
Constructor Summary | |
MRP_Virtex(java.io.InputStream stream)
|
|
MRP_Virtex(MRP_VirtexTokenManager tm)
|
|
MRP_Virtex(java.io.Reader stream)
|
Method Summary | |
void |
disable_tracing()
|
void |
enable_tracing()
|
ParseException |
generateParseException()
|
java.util.Hashtable |
getMergedSignalsHash()
Returns a reference to the Hashtable of
MergedSignals built by the parser. |
Token |
getNextToken()
|
Token |
getToken(int index)
|
static java.io.BufferedReader |
initStream(java.io.InputStream ins)
Provides a way for the user to skip past the first four sections of the MRP file. |
void |
initTables()
Initializes the extra data structures used by the parser---it must be called before calling the parseMRP
method. |
static void |
main(java.lang.String[] args)
Provides a command line interface test for the class. |
void |
MapDetailMessage()
Parses message which describes how to get a more detailed Map Report file. |
void |
MergedSignals()
Parses the Merged Signals subsection of the file and builds the MergedSignalsHash and the MergedToHash
based on the information from this subsection. |
void |
OptimizedBlocks()
Parses the Optimized Block portion of the file. |
void |
parseMRP()
Initiates the parsing of the Section 5 of the MRP file. |
void |
RedundantBlocks()
Parses the Redundant Block subsection of the file. |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(MRP_VirtexTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
void |
RemovedBlock()
Parses just the removed logic/block clauses for the Trimmed Logic section. |
void |
RemovedSignal()
Parses just the removed signal clauses for the Trimmed Logic section. |
void |
S5Heading()
Parses the heading of Section 5 |
void |
S6Heading()
Parses the heading of section 6. |
void |
TrimmedLogic()
Parses any trimmed logic statements and headings |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public MRP_VirtexTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
public MRP_Virtex(java.io.InputStream stream)
public MRP_Virtex(java.io.Reader stream)
public MRP_Virtex(MRP_VirtexTokenManager tm)
Method Detail |
public static void main(java.lang.String[] args) throws ParseException
args
- If the parameter is empty, then the parser just
parses the input via System.in (stdin). If there is
one command line argument, the "*.mrp" ending is
added to the argument when searching for the MRP file
to parse and process.
ParseException
public void initTables()
parseMRP
method. Ideally, I should have just extended the
MRP_Virtex
class so I could override it's
constructors. The default constructors are not flexible enough.
public static java.io.BufferedReader initStream(java.io.InputStream ins)
public java.util.Hashtable getMergedSignalsHash()
Hashtable
of
MergedSignals
built by the parser.
MergedSignalsHash
.public final void parseMRP() throws ParseException
ParseException
public final void S5Heading() throws ParseException
ParseException
public final void TrimmedLogic() throws ParseException
ParseException
public final void RemovedSignal() throws ParseException
ParseException
public final void RemovedBlock() throws ParseException
ParseException
public final void OptimizedBlocks() throws ParseException
ParseException
public final void RedundantBlocks() throws ParseException
ParseException
public final void MergedSignals() throws ParseException
MergedSignalsHash
and the MergedToHash
based on the information from this subsection. Because of the
presence of multi-level merges, the method effectively performs a
transitive closure on signal names to resolve signal name
aliases.
ParseException
public final void MapDetailMessage() throws ParseException
MapDetailException
since the .mrp
file was generated without the
-detail
option.
ParseException
public final void S6Heading() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(MRP_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 |