Question

Implement the adder in Verilog. Use either structural or behavioral or any combination for level 1, you can re0-use existing implementation from the literature for this level.
For level 2, you have implement a structural module identical.
Write a test bench to test it for all different values including this: 0, minimum, maximum, positive, negative (25 different combinations).
Show snapshot of simulation in a document and submit it along with Verilog Module.
1-level Carry-Select Adder (CSA)
Conditional sum adder (SUM)

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

module carry_sel(a,b,cin,sum,co);
input [3:0]a;
input [3:0]b;
input cin;
output [3:0]sum;
output co;
wire [3:0]sum;
wire co;

wire s1,c1,s2,c2,s3,c3,s4,s11,s44,c4,c11,s22,c22,s33,c33,c44;
//assuming carry in 0
fulladd x1(a[0],b[0],0,s1,c1);
fulladd x2(a[1],b[1],c1,s2,c2);
fulladd x3(a[2],b[2],c2,s3,c3);
fulladd x4(a[3],b[3],c3,s4,c4);

//assuming carry in 1
fulladd x5(a[0],b[0],1,s11,c11);
fulladd x6(a[1],b[1],c11,s22,c22);
fulladd x7(a[2],b[2],c22,s33,c33);
fulladd x8(a[3],b[3],c33,s44,c44);

//select either carry 1 or 0 using carry out of FA...

This is only a preview of the solution. Please use the purchase button to see the entire solution

$50.00

or $1 if you
register a new account!

Related Homework Solutions

Verilog Lab
Homework Solution
$123.00
Computer
Science
Verilog
Lab
Algorithm
Diagram
Division
Simulation
Code
Planning
Verilog (VHDL) Compiling in ModelSim
Homework Solution
$25.00
Verilog
Computer Science
Programming
ModelSim
Counter
Output Ports
Incrementing
If Statement
Read Command
Write Command
Digital Logic Verilog
Homework Solution
$127.00
Computer
Science
Digital
Logic
Verilog
Input
CPU
Interface
Design
Bit
Output
Creating A Calculator Using Verilog
Homework Solution
$60.00
Verilog
Computer Science
Programming
Engineering
16-Bit Numbers
Arithmetic Operations
Decrementation
Incrementation
Output Results
Input Values
Get help from a qualified tutor
Live Chats