Question: 4 - bit ALU Design and implement in Verilog a 4 - bit ALU using gate - level modeling. It should take two 4 -
bit ALU
Design and implement in Verilog a bit ALU using gatelevel modeling. It should take two
bit inputs A and and produce a bit output Result by performing different operations
according to its bit control input as defined in the following table.
In addtion the ALU should have two other outputs zero and overflow, defined as follows:
zero
Result
overflow
otherwise overflow operations AND,
Design and imlement the ALU as described in lecture Designing an ALU. Use hierarchical
design and create three different modules: bit ALU for bits bit ALU for bit and a bit
ALU that uses the instances of the first two. See ALUbehavioral.vl for the inputsoutputs and
functionality of your ALU. It should work exactly in the same way as
ALUbehavioral.vI and
may be tested with the same test module, however it should be implemented entirely at gate
level.
Documentation and submission: Submit a single report file MS Word, PDF as an
attachment to this assignment. The report should include:
Descriptive text ALU operations, operation codes, inputs and outputs
Logic diagrams for each module bit ALU for bits bit ALU for bit and bit
ALU Use blocklevel diagrams for the adders and multiplexers. In the logic diagrams
label each module IO with the variable name used in the Verilog code.
Verilog source code of all modules including the test module.
Simulation results output from running the compiled Verilog code with the test module
The simulation should show the performance of the ALU for all operations AND OR
ADD, SUB, SLT For this purpose include a copy of the test module output showing a
few typical examples for each operation, including Overflow and Zero. Label the columns
for the inputs and outputs and print the data inputs and outputs in both binary and signed
decimal format. You may use the test module from ALUbehavioral.vl
When i say gate level, i want the code to follow the format of this example code for a to line multiplexer:
module muxtooutxyz;
input xyz; Input ports.
output out; Output ports.
wire zab; Internal variables.
and andaxz;
and andbyz;
not nzz;
or oroutab;
endmodule
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
