写了一个1024*1bit ram的测试文件,仿真时出现这些错误: # ** Error: test.v(34): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(34): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(34): Cannot assign an unpacked type to a packed type # ** Error: test.v(63): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(63): Cannot mix packed and unpacked types in this operation # ** Error: test.v(66): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(66): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(66): Cannot mix packed and unpacked types in this operation # ** Error: test.v(68): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(68): Cannot mix packed and unpacked types in this operation # ** Error: test.v(71): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(71): (vlog-2110) Illegal reference to memory "add". # ** Error: test.v(71): Cannot mix packed and unpacked types in this operation # ** Error: d:/Modeltech_xe/win32xoem/vlog failed.
请问大家“packed and unpacked types”是什么意思?
好像都是因为对地址端的使用有问题。请大家指教~~~下面是测试程序,出错的行都标出来了:
module test_v; reg clk; reg din; wire dout; reg add[9:0]; reg we; integer i;
ramram ram1 ( .A(add), //34 .CLK(clk), .D(din), .WE(we), .SPO(dout));
initial begin clk=0; forever #2.5 clk=~clk; end
initial begin din=0; forever #5 din=~din; end
initial begin we=1; #500 we=0; end
initial begin add = 10'b0000000000; //63 for(i=0;i<100;i=i+1) begin #5 add = add+10'b0000000001; //66 end #5 add = 10'b0000000000; //68 for(i=0;i<100;i=i+1) begin #5 add = add+10'b0000000001; //71 end end initial begin #1200 $stop; end
endmodule
|