別のモジュールでシーケンシャルカウンタブロックをインスタンス化したいと思います。これらは以下のモジュールです。これらのモジュールをsynopsysデザインビジョン環境で合成すると、次のエラーメッセージが表示されます。Verilogでシーケンシャルブロックをインスタンス化する方法
prob_calculator.sv:1:メモリprobへの不正な参照。 (VER-253)カウンタブロックの
module counter #(parameter m=16) (input en,input clk,input reset,output reg [m-1:0] out);
always @(posedge clk)
if(reset) begin
out <= 0;
end
else if (en) begin
out <= out+1;
end
endmodule
インスタンス:
module prob_calculator #(parameter n=32,parameter m=6,parameter Ir=14) (input
[n-1:0]b,input clk,input reset,output reg [m-1:0] prob [0:Ir-1]);
genvar i;
generate
for (i=0;i<Ir;i=i+1) begin:x1
counter #(.m(m)) count_blck(.en(1),.clk(clk),.reset(reset),.out(prob[i]));
end
endgenerate
endmodule
誰でもコードと間違っているものを指摘していただけますか?
感謝を使用することを再開。 'prob'変数を平坦化すると動作します。 私はあなたが言及した他の可能性について検討します。 – Snigdha203