パラメーター化モジュール (LPM) 関数のファーストインファーストアウト (FIFO) ライブラリーを直接インスタンス化すると、このエラーが発生する可能性があります。インスタンス化された FIFO バッファーがセルを使用して 2 つの算術関数をログする場合、パラメーターを引数から渡すことはできません defparam
。以下の例は、正しくコーディングされているにもかかわらず動作しません。
. . . module fifo256x8 (data, rreq, wreq, clock, clockx2, aclr, threshlevel, threshold, empty, full, usedw, q); input [7:0] data; input [7:0] threshlevel; input rreq, wreq, clock, clockx2, aclr; output [7:0] q; output [7:0] usedw; output threshold, empty, full; sfifo inst_1 (.data (data), .rreq (rreq), .wreq (wreq), .clock (clock), .clockx2 (clockx2), .aclr (aclr), .q (q), .usedw (usedw), .threshold (threshold), .empty (empty), .threshlevel (threshlevel), .full (full)); defparam inst_1.lpm_width = 8; defparam inst_1.lpm_numwords = 256; endmodule . . .
回避策は、すべてのパラメーターが設定されたスミリスト・グラフィック・デザイン・ファイル (.gdf)ファイルで FIFO 関数をインスタンス化し、特定の名前 (my_fifo.gdfなど) を付ける方法です。GDF のデフォルトの Include File(.inc)を作成します。パラメーターを指定しないでトップレベルの Verilog HDL コードで GDF をインスタンス化します。以下の例が機能します (上記の例に対応)。
. . . module fifo256x8 (data, rreq, wreq, clock, clockx2, aclr, threshlevel, threshold, empty, full, usedw, q); input [7:0] data; input [7:0] threshlevel; input rreq, wreq, clock, clockx2, aclr; output [7:0] q; output [7:0] usedw; output threshold, empty, full; my_fifo inst_1 (.data (data), .rreq (rreq), .wreq (wreq), .clock (clock), .clockx2 (clockx2), .aclr (aclr), .q (q), .usedw (usedw), .threshold (threshold), .empty (empty), .threshlevel (threshlevel), .full (full)); endmodule . . .
my_fifo.gdf には with SFIFO
lpm_width = 8
と lpm_numwords = 256
.上記のポートマッピングは my_fifo.gdfを参照し、 SFIFO
メガファンクションではありません。