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

テストベンチ

/* TestBench for counter4.v */

`timescale 1us/1us

module TestBench;

reg clock,clear,updown;

wire [3:0] outq;

parameter STEP=100;

counter4 counter(clock, clear, updown,outq);

endmodule

parameter文

STEPを100にする

/*出力ファイルを指定、表示形式を指定*/

initial begin

・・・

end

/*クロックを生成*/

always begin

・・・

end end

/*シミュレーション本体*/

initial begin

・・・

end

つぎのページで詳しく

この後、

周期100μSの

クロックを用意する