2021年4月5日 星期一

使用Quartus-II 9.1SP2 + ModelSim 6.5b-Aletra + Altera DE2-115 FPGA開發平台,設計SR Latch (ungated)為例(Test Bench開發平台)

使用Quartus-II 9.1SP2 + ModelSim 6.5b-Aletra + Altera DE2-115 FPGA開發平台,設計SR Latch (ungated)為例(Test Bench開發平台) 







//SR Latch (ungated)

module sr_latch_ungated(Q, Qn, S, R);
   output Q;
   output Qn;
   input  S;
   input  R;
   nor(Qn, S, Q);
   nor(Q, R, Qn);
endmodule 
`timescale 1us/10ps
module tb_sr_latch_ungated;
reg tS;
reg tR;
wire tQ, tQn;
//module sr_latch_ungated(Q, Qn, S, R);
sr_latch_ungated  DUT(tQ, tQn, tS, tR);
//instantiate counter to be tested.
initial
begin
#10 tS=1'b1;tR=1'b0;
#20 tS=1'b0;tR=1'b1;
#30 tS=1'b1;tR=1'b0;
#40 tS=1'b0;tR=1'b0;
#50 tS=1'b1;tR=1'b0;
#60 tS=1'b0;tR=1'b1;
#70 tS=1'b1;tR=1'b1;
#80 tS=1'b0;tR=1'b1;

#100 $stop;
end
endmodule


沒有留言:

張貼留言

Arduino 物聯網應用 - 上課教材

Arduino 物聯網應用 - 上課教材 https://dic.vbird.tw/arduino/list.php Arduino 物聯網應用 - 課程列表 我們會從 Arduino 的認識、IDE 環境的熟悉、與操作電腦的序列埠連動的功能、Arduino 開發語言的熟悉、 簡...