Lab3 System Functions
Lab3 System Functions
• System Functions
Understanding
Verilog System
tasks
• These are tasks and functions that are used to generate input and
output during simulation.
• These commands have the same syntax and display their values as text on the screen
during simulation.
• $display/$strobe-$display and $strobe display once every time they are executed.
• The difference between $display and $strobe is that $strobe displays the parameters at the
very end of the current simulation time unit.
Examp
le 1
With value of a, b changing,
$monitor executes thrice..!
$stro
be
1) Make sure you have compiled and simulated your program and checked its netlist and
simulation on Modelsim.
2)On your Menu Bar open Assignments-> Device.
module lab3tb;
reg a,b;
wire y;
LAB3 l1(a,b,y);
initial
$monitor("monitor at time %t -> a=%b, b=%b, y=%b", $time,a,b,y);
Initial begin
$display("display at time %t -> a=%b, b=%b, y=%b",$time,a,b,y);
#10;a=1'b0;b=1'b0;
$display("display at time %t -> a=%b, b=%b, y=%b",$time,a,b,y);
#10;a=1'b0;b=1'b0;
end
endmodule