Exams/ece241 2014 q3

2023. 6. 26. 16:17FPGA/HDLBits

728x90

For the following Karnaugh map, give the circuit implementation using one 4-to-1 multiplexer and as many 2-to-1 multiplexers as required, but using as few as possible. You are not allowed to use any other logic gate and you must use a and b as the multiplexer selector inputs, as shown on the 4-to-1 multiplexer below.

You are implementing just the portion labelled top_module, such that the entire circuit (including the 4-to-1 mux) implements the K-map.

(The requirement to use only 2-to-1 multiplexers exists because the original exam question also wanted to test logic function simplification using K-maps and how to synthesize logic functions using only multiplexers. If you wish to treat this as purely a Verilog exercise, you may ignore this constraint and write the module any way you wish.)

 

module top_module (
    input c,
    input d,
    output [3:0] mux_in
); 
    assign mux_in [0] = d | c;
    assign mux_in [1] = 1'b0;
    assign mux_in [3] = c & d;
    assign mux_in [2] = ~d;
endmodule

'FPGA > HDLBits' 카테고리의 다른 글

Edgedetect2  (0) 2023.06.27
Edgedetect  (0) 2023.06.26
Exams/2012 q1g  (0) 2023.06.26
Exams/m2014 q3  (0) 2023.06.26
Bcdadd4  (0) 2023.06.26