2021年3月26日 星期五

DE2-115 開發 以 74138解碼器 為例(Verilog data flow modeling )

 DE2-115 開發 以 74138解碼器 為例(Verilog  data flow modeling )  

參考來源https://www.programmersought.com/article/34964783614/





// 74138 decoder

module Decoder_3x8_74138(SW,LEDR );

input [17:0] SW;

output [17:0] LEDR;

x74138(SW[15:13],SW[2:0],LEDR[7:0]);

endmodule

module x74138(En, I, O);

    input wire[2:0] En;   //active enable=[100]

    input wire[2:0] I;

    output wire[7:0] O;

                  

    assign O = (En==3'b100) ? ~(8'b0000_0001 << I) : 8'b0000_0000;

 endmodule 

沒有留言:

張貼留言

2024產專班 作業2 (純模擬)

2024產專班 作業2  (純模擬) 1) LED ON,OFF,TIMER,FLASH 模擬 (switch 控制) 2)RFID卡號模擬 (buttom  模擬RFID UID(不從ESP32) Node-Red 程式 [{"id":"d8886...