Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > full adder example using fpga

Reply
Thread Tools

full adder example using fpga

 
 
Amit
Guest
Posts: n/a
 
      12-10-2007

Hello group,

Does anybody know about an online resource that I can find some
samples on how to implement a full adder using LUT? either using
Flex10k or any other classical methods?

I've started learning FPGA and have done something but need to compare
it.

Regards,
Amit

 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      12-10-2007
On Dec 9, 9:34 pm, Amit <amit.ko...@gmail.com> wrote:
> Hello group,
>
> Does anybody know about an online resource that I can find some
> samples on how to implement a full adder using LUT?


Google lists about 19000

http://www.google.com/search?hl=en&q=VHDL+full+adder

KJ
 
Reply With Quote
 
 
 
 
Ralf Hildebrandt
Guest
Posts: n/a
 
      12-11-2007
Amit schrieb:

> Does anybody know about an online resource that I can find some
> samples on how to implement a full adder using LUT? either using
> Flex10k or any other classical methods?


Usually you don't need to think about every single fulladder. Just use
result<=a+b; -- all signals are vectors of type signed or unsigned

For a single fulladder you could use:

signal result : unsigned(1 downto 0);
signal a,b,c_in : std_ulogic;
signal sum,c_out : std_ulogic;

result<=unsigned('0' & a) + unsigned('0' & b) + unsigned('0' & c_in);
sum<=result(0);
c_out<=result(1);


Ralf
 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      12-12-2007
On Dec 11, 9:01 am, Ralf Hildebrandt <Ralf-Hildebra...@gmx.de> wrote:
> Amit schrieb:
>
> > Does anybody know about an online resource that I can find some
> > samples on how to implement a full adder using LUT? either using
> > Flex10k or any other classical methods?

>
> Usually you don't need to think about every single fulladder. Just use
> result<=a+b; -- all signals are vectors of type signed or unsigned
>
> For a single fulladder you could use:
>
> signal result : unsigned(1 downto 0);
> signal a,b,c_in : std_ulogic;
> signal sum,c_out : std_ulogic;
>
> result<=unsigned('0' & a) + unsigned('0' & b) + unsigned('0' & c_in);
> sum<=result(0);
> c_out<=result(1);
>
> Ralf


It's even easier with integers:

signal a,b,sum,c_in,c_out : integer range 0 to 1;

sum <= (a + b + c_in) mod 2;
c_out <= (a + b + c_in) / 2;

Andy
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      12-12-2007
Andy wrote:

> It's even easier with integers:



Easier still, if I let synthesis wire up the carries

-- Mike Treseler
 
Reply With Quote
 
Amit
Guest
Posts: n/a
 
      12-12-2007
On Dec 12, 9:44 am, Mike Treseler <mike_trese...@comcast.net> wrote:
> Andy wrote:
> > It's even easier with integers:

>
> Easier still, if I let synthesis wire up the carries
>
> -- Mike Treseler


Thanks to all,

But maybe I didn't ask the question properly or I had to post in a
different group (I'm sure doesn't exist). My concern is not regarding
VHDL sytnax but trying to understand how to tacking the flow on a
Flex10K diagram.

I apologize all for this.

However, if somebody knows this I will be more than happy to have your
help.

Regards,
Amit
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: FPGA BOARD FOR NEWBIE TO FPGA Oliver Mattos VHDL 0 02-02-2011 10:33 PM
FPGA BOARD FOR NEWBIE TO FPGA TheRightInfo VHDL 1 02-02-2011 11:19 AM
8 bit full adder 2's complement salvador1985 VHDL 4 04-20-2009 04:15 PM
FPGA Central eNewsletter - LinkedIn, Write Articles, Post FREE Jobs,FPGA for Mobiles Vikram VHDL 0 07-24-2008 07:37 PM
FPGA / HDL full time job wanted KaRtiK VHDL 2 01-29-2004 05:54 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57