Question

Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux.

Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux.

Homework Answers

Answer #1

FIRST LET UNDERSTAND AND SEE HOW THE BLOCK DIAGRAM WILL BE FOR 8:1 MUX USING 2:1MUX

VERILOG DESIGN CODE FOR 8:1 MUX USING 2:1 MUX

module mux8to1(d,sel,y);
input [7:0]d;
input [2:0]sel;
output y;

wire [3:0]w;
wire [1:0]a;
//mux numbers are marked in RED in block digram.
mux2to1 mux1 (d[1:0],sel[0],w[0]);
mux2to1 mux2 (d[3:2],sel[0],w[1]);
mux2to1 mux3 (d[5:4],sel[0],w[2]);
mux2to1 mux4 (d[7:6],sel[0],w[3]);

mux2to1 mux5 (w[1:0],sel[1],a[0]);
mux2to1 mux6 (w[3:2],sel[1],a[1]);

mux2to1 mux7 (a[1:0],sel[2],y);

endmodule

//BLOCK OF 2:1 MUX

//THIS MODULE IS INSTANTIATED IN UPPER MODULE TO GET 8:1 MUX
module mux2to1(i,s,f);
input i;
input s;
output f;

assign f=i[s];
endmodule

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block...
Write verilog code for a 8:1 Mux using the blocks of 2:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended. Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended.
Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block...
Write verilog code for a 16:1 Mux using the blocks of 4:1 Mux; Draw the block diagram for this design and write the truth table to prove that the design works as intended.
Develop Verilog code for a 8-to-1 Mux with an active low OE input and a tri-state...
Develop Verilog code for a 8-to-1 Mux with an active low OE input and a tri-state output using assign statements.
Please show complete Verilog code. Write a Verilog description for 3-to-8 decoder generating low outputs when...
Please show complete Verilog code. Write a Verilog description for 3-to-8 decoder generating low outputs when enabled with a low enable.
(ii) Create a hierarchical Verilog 5-to-1 mux module with five data inputs (a, b, c, d,...
(ii) Create a hierarchical Verilog 5-to-1 mux module with five data inputs (a, b, c, d, e), three select inputs (s[2:0]), and one output bit (f) using 4-to-1 multiplexers. Design the 4-to-1 multiplexer using behavioral code.
Write down the VERILOG code for a 2-to-4 decoder and the testbench code to test it
Write down the VERILOG code for a 2-to-4 decoder and the testbench code to test it
use code blocks to write a code that a) solves linear, 2- variable simultaneous equation using...
use code blocks to write a code that a) solves linear, 2- variable simultaneous equation using the elimination method.
Write the Verilog code for a 16 to 1 multiplexer as well as a test bench...
Write the Verilog code for a 16 to 1 multiplexer as well as a test bench using gate-level modeling.
Write down the VERILOG code for an AND gate and the testbench code to test it
Write down the VERILOG code for an AND gate and the testbench code to test it
Write verilog code for Huffman Decoder with testbench.
Write verilog code for Huffman Decoder with testbench.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT