2. Let’s create a module that defines a 4:1 mux by instantiating three 2:1 muxes. Assume the module we are going to instantiate has the interface definition:

(a) First, write the code that would go inside the module defined above.
(b) Now define the interface for your 4:1 mux. You can call the module anything you want and use any variable names you want. But think about how many inputs you’ll need.
(c) Now instantiate three instances of the 2:1 mux defined above and connect the ports correctly to match your interface definition in part (b). Note that you may also need to define a few internal wires.
a) code for the 2to1 mux. Here I am using dataflow modelling.
module mux2to1(w0,w1,s,f);
input w0,w1,s;
output f;
assign f=(s&w0)|((~s)&w1);
endmodule
b) now we have to instantiate the mux4to1 by mux2to1 Note that 4to1 multiplexer contains 4 inputs 2 select lines so total 6 inputs. 1 output. Instantiating the module
module mux4to1(a,b,c,d,s0,s1,z);
input a,b,c,d,s0,s1;
output z;
wire z1,z2;
Here wire z1 and z2 are used to interconnect the mux2to1 instances inside mux 4 to1.
C)
module mux4to1(a,b,c,d,s0,s1,z);
input a,b,c,d,s0,s1;
output z;
wire z1,z2;
mux2to1 m1(a,b,s0,z1);
mux2to1 m2(c,d,s0,z2);
mux2to1 m3(z1,z2,s1,z);
endmodule


2. Let’s create a module that defines a 4:1 mux by instantiating three 2:1 muxes. Assume the modu...
2. Let's create a module that defines a 4:1 mux by instantiating three 2:1 muxes. Assume the module we are going to instantiate has the interface definition: module mux2tol (wO,wl,s,f); input w0, wl, s; output f (a) First, write the code that would go inside the module defined above. (b) Now define the interface for your 4:1 mux. You can call the le anything you wa But think about how many inputs you'll need.
2. Let's create a module that...
Instantiate four copies of the mux2_1b in mux2_4b file. Connect the 1-bit muxes (4 mux2_1b instances) with ports of mux2_4b to produce 4-bit wide 2:1 multiplexer. This is an example of hierarchical design with reusable modules. The mux2_4b module receives input signals a[3:0], b[3:0], sel, and generates an output signals y[3:0]. I already have a 2_1bit mux verilog coded out but I am not getting correct results intended by what the question is asking. //multiplexer using copies of a mux2:1...
1&2 and please I need quickly.
Q1 (35 pts): Design a combinational circuit that takes 8 bits of input and checks iif the inputs are symmetric or not and produces an output immediately. Example: 10011001 or 11000011 produce 1 and 11011010 or 11001100 produce 0.) (a) Write Verilog RTL for this circuit. (b) Same functionality but output appears next cycle. You can instantiate the design in part a. (c) Same functionality but output appeurs after two cycles. You can instantiate...
Consider the circuit in Figure 1. It is a 4-bit (QQ2Q3) synchronous counter which uses four T-type flip-flops. The counter increases its value on each positive edge of the clock if the Enable signal is asserted. The counter is reset to 0 by setting the Clear signal low. You are to implement an 8-bit counter of this type Enable T Q Clock Clear Figure 1. 4-bit synchronous counter (but you need to implement 8-bit counter in this lab) Specific notes:...
IN JAVA For the following questions, “define a class” means the following: • Create an appropriately-named file containing the Java class definition, including the following: – A block comment describing the file (and hence the class), as always – Any instance variables, as required by the question – Accessor (getter) and mutator (setter) methods for any instance variables – Constructors as appropriate or as required by the question – A toString method that prints instances of the class informatively –...
Objective: Creating a register file (memory) using Verilog. The register file is made up of four registers and each register holds one nibble (half a byte, i.e., four bits) 3. Create a D flip-flop AD flip-flop holds 1 bit of data, and it only changes its data when the clock changes. We want a positive edge triggered flip-flop. Design your Verilog D flip-flop, so we will create them now. Enter the 2 to 4 line decoder. We will need two...
In this lab, you will design a finite state machine to control the tail lights of an unsual car. There are three lights on each side that operate in sequence to indicate thedirection of a turn. Figure ! shows the tail lights and Figure 2 shows the flashing sequence for (a) left turns and (b) right rums. ZOTTAS Figure 28:8: BCECECece BCECECECes BCECECECB BCECECBCB 8888 Figure 2 Part 1 - FSM Design Start with designing the state transition diagram for...
Java Project In Brief... For this Java project, you will create a Java program for a school. The purpose is to create a report containing one or more classrooms. For each classroom, the report will contain: I need a code that works, runs and the packages are working as well The room number of the classroom. The teacher and the subject assigned to the classroom. A list of students assigned to the classroom including their student id and final grade....
I'm having trouble writing this code, can some help me? Step 1: Capturing the input The first step is to write a functionGetInput()that inputs the expression from the keyboard and returns the tokens---the operands and operators---in a queue. You must write this function. To make the input easier to process, the operands and operators will be separated by one or more spaces, and the expression will be followed by #. For example, here’s a valid input to your program: 6...
Recursion and Trees Application – Building a Word Index Make sure you have read and understood · lesson modules week 10 and 11 · chapters 9 and 10 of our text · module - Lab Homework Requirements before submitting this assignment. Hand in only one program, please. Background: In many applications, the composition of a collection of data items changes over time. Not only are new data items added and existing ones removed, but data items may be duplicated. A list data structure...