Академический Документы
Профессиональный Документы
Культура Документы
Arrays
Memories
Parameters
Strings
System tasks and compiler directives
ARRAYS
System tasks
Provide standard system tasks for routine
operations
$<keyword>
displaying on screen, monitoring values of nets,
stopping, and finishing are done by system tasks
$display: for displaying values of variables or
strings or expressions
By default it will insert new line at the end of
string
SYSTEM TASKS AND COMPILER
MONITORING INFORMATION
Monitor the signal when its value changes
monitor(p1,p2,p3,.....pn)
only one monitoring list can be activated at a
time
initial //clock toggles for 5 units, reset
goesdown at 10units
Begin
$monitor($time,”value of signal clock = %b
reset = %b”,clock,reset);
end
System tasks and compiler
$stop: to stop during simulation, puts the signal in
interactive mode
$finish: terminate the simulation
Initial
Begin
Clock=0;
Reset=1;
$100 $stop // suspend the simulation at the time =100
$900 $finish // this will terminate the simulation at
time=1000
end
COMPILER DIRECTIVES