edaplayground / eda-playground

EDA Playground -- The FREE IDE for SystemVerilog, Verilog, and VHDL
http://www.edaplayground.com
48 stars 17 forks source link

for basic PISO code, questa/vcs doesnt give out correct results when 2nd bit is flipped although it does gives out correct result when that bit is made 0. #37

Open rtawade opened 4 years ago

rtawade commented 4 years ago

image

image

udif commented 4 years ago

You are using $monitor on a single bit. Assuming it is not driven by 'Z or 'X, the only values it can change to are 0 to 1 and vice versa. When you drive your shift register with 'b110001, $monitor() will only display the changes. This is why the 1st test only display 5 values, while the other one displays 7 values.