I've typed a design code and a testbench code for inverter circuit. The input is of 4 bits, and so is the output. I've tried to display the waveform using:
$dumpfile("dump.vcd");
$dumpvars(1);
However, it keeps giving me the message:
Warning: Only a single slice of data found. Did you specify valid 'From/To' times?
Can anybody help me?
Link for my code: https://edaplayground.com/x/EYku
Since no time elapses in your simulation, it is no wonder you get a warning on EDA Playground when you instruct it to display waveforms.
To avoid the warning, uncomment at least one of your delays. Also, you should call $dumpvars
at time 0:
module jinvertertb;
reg [3:0] a;
wire [3:0] y;
//Design Instance
inv jinv(a,y);
initial
begin
$dumpfile("dump.vcd");
$dumpvars;
$display ("RESULT\ta\ty");
a = 1; // Another value
$strobe(" PASS \t%d\t%d",a,y);
#100; //delay
a = 0;
$strobe(" PASS \t%d\t%d",a,y);
//#100; //delay
a = 4;
$strobe(" PASS \t%d\t%d",a,y);
//#80
end
endmodule
This runs without warnings: edaplayground