Verilog コードの合成でいくつかの問題に直面していますが、シミュレーションは問題ないようです。
具体的には、次のように定義されたモジュール..
module nexys2_sevensegment(
input clk,
input [NUM_CHARS*4-1: 0] disp_chars,
output [NUM_CHARS-1: 0] anodes, // The common cathodes for each display.
output [6: 0] cathodes // The seven segments in the form {G,F,E,D,C,B,A}
);
parameter NUM_CHARS = 4; // The number of characters that need to be
// displayed. Should be in [1, 4].
そして、次のようにインスタンス化されます。
nexys2_sevensegment #(4) seven_seg_disp(clk, disp_bus, an, seg);
シミュレーションは正常に動作しているようですが、合成すると次のエラーが発生します。
=========================================================================
* HDL Compilation *
=========================================================================
Compiling verilog file "nexys2_sevensegment.v" in library work
ERROR:HDLCompilers:28 - "nexys2_sevensegment.v" line 8 'NUM_CHARS' has not been declared
ERROR:HDLCompilers:28 - "nexys2_sevensegment.v" line 9 'NUM_CHARS' has not been declared
Compiling verilog file "tb_nexys2_seven_segment.v" in library work
Module <nexys2_sevensegment> compiled
Module <tb_nexys2_seven_segment> compiled
Analysis of file <"tb_nexys2_seven_segment.prj"> failed.
Spartan3e-1200 - Digilent Nexys2でザイリンクスに取り組んでいます。
ありがとう !