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 

沒有留言:

張貼留言

  清除項目編譯快取 執行 flutter clean 重新取得套件依賴 執行 flutter pub get 完整重新編譯並執行 flutter run 1. 新增專案套件 (pubspec.yaml) 在 Flutter 專案根目錄下的 pubspec.yaml 中,新增 ...