最初のページ 戻る 次へ 最後のページ 画像

テストベンチでも使用している

/* TestBench for counter4.v */

`timescale 1us/1us

module TestBench;

reg clock,clear;

wire [3:0] outq;

parameter STEP=100;

counter4 counter(clock, clear, outq);

・・・

endmodule

TestBench

(下位モジュールcounter4)

インスタンスcounter

clock

clear

outq[3:0]

下位モジュール

module counter4(clk, clr, q);

input clk,clr;

output [3:0] q;

reg q;

endmodule

モジュールcounter4をインスタンス化