Forum Discussion
Altera_Forum
Honored Contributor
11 years agoIf x is indeed an integer, then this code:
y1<=(unsigned(x)-y);Will not compile. unsigned() can be used to convert a std_logic_vector to unsigned, but if you are converting from an integer, then you need to use the to_unsigned() function, and specify the number of bits for the result. Besidesy1<=x-y;should be enough