およびゲート用の簡単なテストベンチを作成しました。コードとテスト ベンチは問題なく動作していました。今私がやりたいことは、「自分のケースにwhileループを実装しようとしています」です。構文エラーは発生していませんが、出力が表示されません。体は私の間違いを伝えることができますか?.
timescale 1ns / 100ps
int count=0;
module and_gate_test;
// Inputs
reg in1_t;
reg in2_t;
// Outputs
wire out_t;
// Instantiate the Unit Under Test (UUT)
and_gate and_gate_1 (in1_t,in2_t,out_t);
initial
begin
// Initialize Inputs
//case 0
while(count==100){
in1_t <= 0;
in2_t <= 0;
#1 $display ("out_t=%b",out_t);
//case 1
in1_t <= 1;
in2_t <= 1;
#1 $display ("out_t=%b",out_t);
//case2
in1_t <= 0;
in2_t <= 1;
#1 $display ("out_t=%b",out_t);
//case3
in1_t <= 1;
in2_t <= 0;
#1 $display ("out_t=%b",out_t);
count++; }
// Add stimulus here
end
endmodule