adding std_logic_vectors in vhdl

Joined
Oct 15, 2006
Messages
6
Reaction score
0
For a command like this one:

C <= std_logic_vector(signed(A) + signed(B))

How does VHDL add the vectors? For example, If I wanted to synthesize this on an FPGA, would the compiler create an adder? Or does it use some other technique to add vectors?
Sorry if this is too much of a newbie question :)
 

zty

Joined
Oct 2, 2006
Messages
4
Reaction score
0
i think the synthesis tool will add many adder depend on the length of your vector.


ohaqqi said:
For a command like this one:

C <= std_logic_vector(signed(A) + signed(B))

How does VHDL add the vectors? For example, If I wanted to synthesize this on an FPGA, would the compiler create an adder? Or does it use some other technique to add vectors?
Sorry if this is too much of a newbie question :)
 
Joined
Oct 15, 2006
Messages
6
Reaction score
0
zty said:
i think the synthesis tool will add many adder depend on the length of your vector.

That makes sense, thanks.

Does it use ripple-carry or carry-look-ahead adders?
 
Joined
Oct 11, 2006
Messages
4
Reaction score
0
Does it use ripple-carry or carry-look-ahead adders?

Different compilers synthesize the same code differently sometimes. I guess you can know how your particular FPGA would implement your code at the RTL level by looking at the RTL viewer if your vendor provides such an option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top