|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.models.stimuli.StimuliParser
StimuliParser reads Hades stimuli files and generates the corresponding simulation events.
WARNING: due to my still insufficient knowledge of the JavaCC tokenizer specification options, the parser cannot not handle all legal Hades signal or component names correctly. You should not use names that include
WARNING: avoid events at time t=0.0, because those assignments may conflict with initialization assignments (usually U or X values). Due to the default resolution function and the random order of multiple assignments at the same time, results may be non-deterministic in such cases. Instead, use assignments at very small times (e.g., a few ps).
Nested Class Summary | |
(package private) class |
StimuliParser.ClockGen
internal adapter class to generate the specified clock events. |
(package private) static class |
StimuliParser.JJCalls
|
(package private) class |
StimuliParser.Pause
|
Field Summary | |
(package private) boolean |
debug
|
(package private) Design |
design
|
(package private) ASCII_CharStream |
jj_input_stream
|
Token |
jj_nt
|
boolean |
lookingAhead
|
(package private) DesignHierarchyNavigator |
navigator
|
(package private) int |
processID
|
(package private) java.lang.String |
processName
|
(package private) double |
processTime
|
(package private) SimKernel |
simulator
|
Token |
token
|
StimuliParserTokenManager |
token_source
|
Fields inherited from interface hades.models.stimuli.StimuliParserConstants |
ABSOLUTE_NAME, ASSIGN, CONSTANT, DEBUG, DEFAULT, DEFCLOCK, DIGIT, ENDPROC, EOF, EOL, FLOAT, HEXDIGIT, ID, INTEGER, LETTER, PAUSE, PROCESS, SINGLE_LINE_COMMENT, TIMESCALE, tokenImage, TRACE, UNTIL, WAIT |
Constructor Summary | |
StimuliParser(java.io.InputStream stream)
|
|
StimuliParser(java.io.Reader stream)
|
|
StimuliParser(StimuliParserTokenManager tm)
|
Method Summary | |
void |
assign_or_wait()
|
void |
assignment()
|
java.lang.String |
constant_or_ID()
|
void |
createClockGenerator(java.lang.String name,
double period,
double dutycycle,
double offset)
create an (internal class) clock generator component with the specified name and timing parameters. |
void |
define_clock()
|
void |
disable_tracing()
|
void |
do_pause()
|
void |
do_wait()
|
void |
enable_debug()
|
void |
enable_tracing()
|
ParseException |
generateParseException()
|
Token |
getNextToken()
|
static double |
getTimeScale(java.lang.String s)
convert a string into a timescale. |
Token |
getToken(int index)
|
void |
handleAssignStatement(java.lang.String targetName,
java.lang.String valueString)
create the simulation event for a single assign statement. |
void |
handlePauseStatement()
tell the simulation engine to change to "pause" mode at the simulation time corresponding to the "current process" time. |
static void |
main(java.lang.String[] argv)
create a StimuliParser for the Design specified by argv[0] and parse the stimuli file specified by argv[1] |
static void |
msg(java.lang.String s)
print string s to stdout |
static double |
parseDouble(java.lang.String s)
|
void |
process()
|
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(java.io.Reader stream)
|
void |
ReInit(StimuliParserTokenManager tm)
|
void |
setDebug(boolean b)
|
void |
setDesign(Design _design)
set the 'current working' design for this parser and create a DesignHierarchyNavigator for that design. |
void |
setSimulator(SimKernel _simulator)
set the simulation engine to be used by this StimuliParser. |
java.lang.String |
signal_name()
|
void |
statement()
|
void |
stimuli_file()
|
void |
trace_signal()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
SimKernel simulator
Design design
DesignHierarchyNavigator navigator
double processTime
java.lang.String processName
int processID
boolean debug
public StimuliParserTokenManager token_source
ASCII_CharStream jj_input_stream
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
public StimuliParser(java.io.InputStream stream)
public StimuliParser(java.io.Reader stream)
public StimuliParser(StimuliParserTokenManager tm)
Method Detail |
public void setSimulator(SimKernel _simulator)
public void setDesign(Design _design)
public void setDebug(boolean b)
public static void main(java.lang.String[] argv) throws ParseException, java.lang.Exception
ParseException
java.lang.Exception
public void handleAssignStatement(java.lang.String targetName, java.lang.String valueString)
public void handlePauseStatement()
public void createClockGenerator(java.lang.String name, double period, double dutycycle, double offset)
public static double getTimeScale(java.lang.String s)
public static double parseDouble(java.lang.String s)
public static void msg(java.lang.String s)
public final void stimuli_file() throws ParseException
ParseException
public final void statement() throws ParseException
ParseException
public final void process() throws ParseException
ParseException
public final void assign_or_wait() throws ParseException
ParseException
public final void assignment() throws ParseException
ParseException
public final void do_wait() throws ParseException
ParseException
public final void do_pause() throws ParseException
ParseException
public final void define_clock() throws ParseException
ParseException
public final void trace_signal() throws ParseException
ParseException
public final java.lang.String constant_or_ID() throws ParseException
ParseException
public final java.lang.String signal_name() throws ParseException
ParseException
public final void enable_debug() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(StimuliParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public final 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 |