この例では、Verilog HDL を使用して階層デザインを作成する方法を説明しています。このデザインは、VHDL 例、AHDL 例、およびスケマティック階層例で同じです。top_ver.v がトップレベルのファイルで、2 つの下位レベルファイルである bottom1.v および bottom2.v を呼び出します。
この例をプロジェクトで使用する際の詳細は、以下をご覧ください。
- Verilog HDL の使用方法例
- MAX+PLUS® II ヘルプ
vprim.v
top_ver.v module top_ver (q, p, r, out); input q, p, r; output out; reg out, intsig; bottom1 u1(.a(q), .b(p), .c(intsig)); bottom2 u2(.l(intsig), .m(r), .n(out)); endmodule
bottom1.v
module bottom1(a, b, c); input a, b; output c; reg c; always begin c<=a & b; end endmodule
bottom2.v
module bottom2(l, m, n); input l, m; output n; reg n; always begin n<=l | m; end endmodule