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 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 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
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.
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...
True or False 1. Tri-state logic may be used to reduce parts count when interfacing digital...
True or False 1. Tri-state logic may be used to reduce parts count when interfacing digital integrated circuits. 2. The Schmitt Trigger comparator exhibits hysteresis in its input/output relationship. 3. One gigabyte equals 29 bytes. 4. Random-access memory can be accessed equally fast, regardless of the address. 5. Static RAM uses charge in capacitors to store data.
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.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT