Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Verilog Cascading 2 4bit full adders to get an 8bit adder

Status
Not open for further replies.

xtolbert

Newbie level 1
Joined
Apr 24, 2011
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,280
Activity points
1,280
Hello, I know that in theory a very simple way to create an 8 bit adder is to cascade to four bit adders together, the code of a 4 bit adder is in this message. How would I go about writing the code in verilog to cascade two? And then output it to an LED Screen in base 10 digits?

module full_adder_4bit(
cin,
cout,
in_a,
in_b,
sum
);

parameter reg_size = 4;

input cin;
input [reg_size-1:0] in_a;
input [reg_size-1:0] in_b;
output [reg_size-1:0] sum;
output cout;

assign {cout,sum} = in_a + in_b + cin;

endmodule
 

quick note: I'm writing th code to tst out on an Altera DE-2 board if that helps
 

quick note: I'm writing th code to tst out on an Altera DE-2 board if that helps
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top