【发布时间】:2023-02-25 20:55:13
【问题描述】:
module dut_top;
wire [31:0] ctrl_32bit;
wire ctrl_1bit;
assign ctrl_32bit = 0;
assign ctrl_1bit=0;
initial begin #1000ns; end
endmodule
program automatic test;
initial begin
repeat(5) begin
#100ns;
force dut_top.ctrl_32bit[0] =~ dut_top.ctrl_32bit[0]; //LINE 1
force dut_top.ctrl_1bit =~ dut_top.ctrl_1bit; //LINE 2
force dut_top.ctrl_32bit[0] = dut_top.ctrl_1bit; //LINE 3
end
end
endprogram
我的代码如上所示。 LINE 1 卡住了。但是在注释掉 LINE 1 之后,LINE 2 和 LINE 3 工作正常。
- 这是什么原因?我觉得是和timeslot有关,但是我自己也说不清楚。
- 这个需求应该怎么解决?
我想每隔一段时间在一个位数组中强制一个位。
【问题讨论】:
标签: verilog system-verilog test-bench