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 

沒有留言:

張貼留言

WOKWI ESP32 LED Control , Node-Red MQTT SQLITE  

WOKWI ESP32 LED Control ,  Node-Red  MQTT SQLITE   const char broker[] = "test.mosquitto.org" ; //const char broker[] = "br...