Forum Discussion
Altera_Forum
Honored Contributor
18 years agoError 10327: Can't determine definition of operator ""+""
Hello to everybody, could someone tell me what's wrong in the following code? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity round16to12 is ...
Altera_Forum
Honored Contributor
18 years agoTo add to what Frank said, if you are doing arithmetic, it is quicker (simulation-wise) to use INTEGER types, rather than vectors of bits. Other things that you get from this are errors if you use restricted ranges of integer and it goes outside of the range. This does mean that if you want modulo-n rollover in a counter or similar, you have to code it explicitly:
if (counter + 1 > t_counter'high) then counter := 0; else counter := counter +1; end if; If t_counter'high is a power of 2, then the "counter+1>" comparison will usually optimise out in synthesis. Cheers, Martin