2021年4月22日 星期四

HBLbits_Verilog Basic_Gates100

 HBLbits_Verilog Basic_Gates100

Build a combinational circuit with 100 inputs, in[99:0].

There are 3 outputs:

  • out_and: output of a 100-input AND gate.
  • out_or: output of a 100-input OR gate.
  • out_xor: output of a 100-input XOR gate.
module top_module( 
    input [99:0] in,
    output out_and,
    output out_or,
    output out_xor 
);
//out_and: output of a 100-input AND gate.
//out_or: output of a 100-input OR gate.
//out_xor: output of a 100-input XOR gate.
    assign out_and = & in[99:0];
    assign out_or  = | in[99:0];
    assign out_xor = ^ in[99:0];
     
endmodule

沒有留言:

張貼留言

設定並測試 Flutter

  設定並測試 Flutter https://docs.flutter.dev/install/quick 使用基於開源軟體的編輯器(例如 VS Code)在您的裝置上安裝 Flutter,即可開始使用 Flutter 開發您的第一個多平台應用程式! 學習如何使用任何基於開源軟...