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

Related Homework Solutions

Arbiters And VHDL Models
Homework Solution
$55.00
Computer Science
Engineering
Arbiters
VHDL Models
Precedence
Pending Requests
Diagrams
Round-Robin
Subsystems
Clock Signals
Resources
Ports
Verilog Calculator
Homework Solution
$25.00
Computer Science
Verilog
Calculator
Signed Numbers
Bits
Codes
Operations
Overflow
Buses
Outputs
Adding
Subtracting
Gates
Complement
Percentage Sign
Modulus
Remainder
VHDL Project
Homework Solution
$45.00
Computer
Science
VHDL
Truth
Table
Combinational
Circuit
Dataflow
Input
Structural
Design
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
Logic Diagrams & VHDL Models
Homework Solution
$25.00
Computer Science
Logic Diagrams
VHDL Models
Registers
Inputs
Outputs
Verilog
Testbench
Waveform Snapshot
Get help from a qualified tutor
Live Chats