More than 5 years have passed since last update.
Icarus Verilogを使っています。
$monitorに、複数bit幅の信号のうち特定bitだけを入力しても変化を検出してくれないようです。
reg a, b;
reg[1:0] c;
initial begin
c = 0;
【うまくいかない例】
$monitor ("%t: c[0] = %b, c[1] = %b", $time, c[0], c[1]);
#10 c = c+1;
#10 c = c+1;
【うまくいく例】
$monitor ("%t: a = %b, b = %b", $time, a, b);
a <= c[0]; b <= c[1];
#10 c = c+1; a <= c[0]; b <= c[1];
#10 c = c+1; a <= c[0]; b <= c[1];
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
