Question

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.

Homework Answers

Answer #1
module mux8to1( Out,
  Sel,
  In1,
  In2,
  In3,
  In4,
  In5,
  In6,
  In7,
  In8
  ); 
input [7:0]  In1,
  In2,
  In3,
  In4,
  In5,
  In6,
  In7,
  In8; //The eight 8-bit input lines of the Mux 
input [2:0] Sel; //The three bit selection line 
output [7:0] Out; //The single 8-bit output line of the Mux 
reg [7:0] Out; 
//Check the state of the input lines 
always @ (In1 or In2 or In3 or In4 or In5 or In6 or In7 or In8 or Sel) 
begin 
case (Sel) 
  3'b000 : Out = In1; 
  3'b001 : Out = In2; 
  3'b010 : Out = In3; 
  3'b011 : Out = In4; 
  3'b100 : Out = In5; 
  3'b101 : Out = In6; 
  3'b110 : Out = In7; 
  3'b111 : Out = In8; 
default : Out = 8'bx; 
//If input is undefined then output is undefined 
endcase 
end  
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 down the VERILOG code for a tri-state buffer and the testbench code to test it
Write down the VERILOG code for a tri-state buffer and the testbench code to test it
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.
Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code...
Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code below do? Provide as much detail as possible and provide informative descriptions/labels for the 4 input/outputs. module mystery (W, X, Y, Z); input W, X, Y; output Z; reg [7:0] P; always @ (posedge W or posedge X) begin if (X) P = 8'b00000000; else P = {P[6:0], Y); end assign Z = P[7]; endmodule
Using Moore machine approach design a sequence detector with one input and one output. When input...
Using Moore machine approach design a sequence detector with one input and one output. When input sequence 010 occurs the output becomes 1 and remains 1 until the sequence 010 occurs again in which case the output returns to 0. The output remains 0 until, 010 occurs the third time, and so on. Your design should be able to handle overlapping sequences, i.e., input sequence 11001010100 should produce the output 00000110011. Draw the state diagram and implement your detector using...
Implement an octal to 7-segment decoder, using only a single 3-to-8 decoder module (with active-low outputs)...
Implement an octal to 7-segment decoder, using only a single 3-to-8 decoder module (with active-low outputs) plus seven additional gates – one gate per output. Each gate should have as few inputs as possible. Show your work and sketch the circuit.
Question 1 A sequential pattern detection circuit (state machine) has input A and output Y, which...
Question 1 A sequential pattern detection circuit (state machine) has input A and output Y, which becomes 1 whenever input pattern of 1 1 0 is detected on the input Draw the state transition diagram for this circuit. Simply use state names S0, S1, S2… without any state encoding Using one-hot-encoding draw the state transition table. Clearly show input(s). present state and next state variables and output(s). Write next state and output equations.
Design an active-RC low pass second order Butterworth filter for a cutoff frequency of 1 kHz,...
Design an active-RC low pass second order Butterworth filter for a cutoff frequency of 1 kHz, and a pass band gain of 2 V/V. Use a 741 Op Amp. If using Table I, use a capacitor value of 0.1 μF for C and C1, otherwise you may use any capacitors available in the lab. If applicable, make an excel worksheet showing the calculations required for the above design.  Choose appropriate real resistor values for the designed circuit and simulate this circuit...
(In c code only, not c++) We will simulate the status of 8 LEDs that are...
(In c code only, not c++) We will simulate the status of 8 LEDs that are connected to a microcontroller. Assume that the state of each LED (ON or OFF) is determined by each of the bits (1 or 0) in an 8-bit register (high-speed memory). Declare a char variable called led_reg and initialize it to 0. Assume that the least-significant bit (lsb) controls LED#0 and the most-significant bit (msb) controls LED#7. In the main function, build and present a...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT