Question

2atubhs, and explain the cause of oe y LUTs are reqllited l the difference, if any. .37 hekrncecdemux for a customized multip

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Verilog Code for 8-bit wide 8x1 multiplexer
module Vrabcdemux #(parameter WIDTH = 8) (
input [WIDTH-1:0] A,B,C,D,E, //Input Ports Declaration
input [2:0]S, //Select Line input port Declaration
output reg [WIDTH-1:0] T //Output Port Declaration
);

//Combo Logic for Multiplexer
//Based on select line 'S', mux inputs will be selected for output
always@(*) //For Combo use '*' in always block
begin
case(S)
   3'b000 : T = A;
   3'b001 : T = B;
   3'b010 : T = B;
   3'b011 : T = C;
   3'b100 : T = C;
   3'b101 : T = D;
   3'b110 : T = E;
   3'b111 : T = A;
   endcase
end
endmodule

//Testbench for mux

module test;

reg [7:0]A,B,C,D,E;
reg [2:0]S;
wire [7:0]T;

//Mux module instantiation

Vrabcdemux #(.WIDTH(8)) mux_instance (
.A(A),.B(B),.C(C),.D(D),.E(E),.S(S),.T(T)
       );

//Driving Stimulus
initial begin
A = 10;
B = 20;
C = 30;
D = 40;
E = 50;
S = 0;
#10 S = 1;
#10 S = 2;
#10 S = 3;
#10 S = 4;
#10 S = 5;
#10 S = 6;
#10 S = 7;
#10 S = 8;
#10 $finish;
end
endmodule

//Waveform Simulation

M Modelsim PE Student Edition 104 File Edit View Compile Simulete Add Wave Tools Layout BookmarksWindow Help ILI ■ 豳//..Γ. l
//Synthesis RTL viewer
Ouartus Pnme uite Edition Flle Edit View Project Asslenments Processing Tools Window Help abodemux VWabcdemux Catalog Table o

RTL Viewer Flle Edit View Tools Mndow Help Page 1 of 1 t Navigator Muxo S12..0 OUT 817.0 C[7.0] DI7.0] Mux1 OUT DAT Mux2 OUT

Add a comment
Know the answer?
Add Answer to:
2atubhs, and explain the cause of oe y LUTs are reqllited l the difference, if any. .37 hekrncecd...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • IIOnTg EXcitise 0., synthesize your Vrmux4in18b cc module as well as 6.46 Cohtmu the original in ...

    6.47 using verilog IIOnTg EXcitise 0., synthesize your Vrmux4in18b cc module as well as 6.46 Cohtmu the original in Program 6-17, targeting your favorite FPGA. Determine how many LUTs are required in each of the two realizations, and explain the cause of the difference, if any rite a Verilog module Vrabcdemux for a customized multiplexer with five 8-bit nput buses A, B, C, D, and E, selecting one of the buses to drive a 8-bit output bus T according to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT