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


沒有留言:

張貼留言

2026 作業3 RFID+ Telegram 練習

 2026 作業3  RFID+ Telegram  練習 (Wokwi 與 Telegram 二者溝通訊息反映比較慢 ) 歡迎 Alex 使用 RFID 控制系統 /on : 開啟 LED /off : 關閉 LED /flash : 閃爍模式 /timer : 開啟 5 秒 ...