Signed Arithmetic using VHDL Operators

Joined
Mar 1, 2012
Messages
1
Reaction score
0
For some reason I can't seem to find a clear answer for this. Are all VHDL operators overloaded to allow signed arithmetic?

I want to use std_logic_vectors to do add and multiply over. But if I use: "result <= signed(data_a) + signed(data_b)", does the numeric_std library account for overflow and saturate? By the way, my output, result, needs to be a std_logic_vector, so would doing this work (as long as they line up)?

Likewise, with multiply. I haven't even been able to find whether you can do multiply with the * operator.

Thanks for the help!
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top