Subtractiongreenspun.com : LUSENET : ece342 : One Thread
This may be a stupid question but how do we do subtraction in VHDL?? I'm not sure how to decrement the Count variable by 2.
-- Stumpey (firstname.lastname@example.org), March 10, 1999
In case anyone is still looking for an answer to this, you can *not* by default treat STD_LOGIC_VECTORs as if they were numbers (with operators like + or -.) If you use the following library:
then it becomes legal to do
count <= count + 2; -- count is STD_LOGIC_VECTOR
-- Robin Grindley (email@example.com), March 13, 1999.