2021年5月6日 星期四

HBLbits_Verilog Basic_Bugs mux2

HBLbits_Verilog Basic_Bugs mux2

 This 8-bit wide 2-to-1 multiplexer doesn't work. Fix the bug(s).

Module Declaration

module top_module (
    input sel,
    input [7:0] a,
    input [7:0] b,
    output [7:0] out  ); 
module top_module (
    input sel,
    input [7:0] a,
    input [7:0] b,
    output out  );
    assign out = (~sel & a) | (sel & b);
endmodule

module top_module (
    input sel,
    input [7:0] a,
    input [7:0] b,
    output [7:0]out  );
    assign out = sel ? a:b ; 
endmodule



 

沒有留言:

張貼留言

Telegram +ESP32自動發報機

  Telegram   +ESP32自動發報機 這套系統是一個典型的 IoT(物聯網)架構 ,結合了遠端配置(Python)、通訊中介(MQTT)與硬體執行(ESP32)。 以下我為您拆解這兩支程式的核心運作原理: 一、 系統架構流程 Python 端 (控制台) :使用者輸入...