作者AnRedR (AnRedR)
看板Electronics
标题[请益] NC-Verilog的indexed part-select问题
时间Mon May 27 22:06:12 2013
以下是我把实际遇到的问题简化後的样子
module test;
reg [0:0] index = 0;
reg [0:-1] vector = 0;
initial begin
#1;
$display("%b", vector[index[0]+:1]);
end
endmodule
用NC-Verilog(版本11.10-s072)模拟後显示为x不是0
但是用Icarus Verilog模拟出来结果却是0
想请问版上高手是否indexed part-select这样使用是behavior undefined或
implementation dependent?或者这是bug?
若把code里vector的range改成[0:0]或者把index[0]的bit select去掉(即index)
则NC-Verilog模拟出来是变成0了
之前也因为类似的问题debug很久..
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.214.119
1F:→ AnRedR:ncverilog 08.10-p002这个版本似乎就没这个问题 05/27 23:00
※ 编辑: AnRedR 来自: 118.170.10.180 (05/27 23:01)