best way to perform multiplies in vhdl

i am trying to implement an image convolution filter that has negative values in it on a spartan IIe fpga. So i need to perform (for instance) A*B + C*D where A,B,C,D are all signed numbers in the ieee std logic int range. what is the best way to implement this? It seems that the way i am doing it now (using std_logic_vector) fails for negative values of the filter coeffs. can anyone give a suggestion how to fix this (the best way to code it in vhdl). What is the best way to do a numerical comparison (ie. A < B in vhdl (that is also synthesizeable), where A,B are signed integers)

thanks

--
Geoffrey Wall
Masters Student in Electrical/Computer Engineering
Florida State University, FAMU/FSU College of Engineering
wallge@eng.fsu.edu
Cell Phone:
850.339.4157

ECE Machine Intelligence Lab
http://www.eng.fsu.edu/mil
MIL Office Phone:
850.410.6145

Center for Applied Vision and Imaging Science
http://cavis.fsu.edu/
CAVIS Office Phone:
850.645.2257
Reply to
Geoffrey Wall
Loading thread data ...

Use the "numeric_std" type "signed" to represent the numbers. Then multiply them together.

Same thing, just use the "

Reply to
David Bishop

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.