Forum Discussion
Altera_Forum
Honored Contributor
11 years agoAssign all zeroes to unsigned
Hi, I want to assign all zeroes to an unsigned signal. I've been using ( others => '0' ) for STD_LOGIC_VECTOR signals, but when i attempt to do the same for unsigned, i get an error: Error (105...
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- You can't do that because 0 is an integer. Also note that unsigned is binary, not base 10. You need to convert to an unsigned from an integer. Op <= to_unsigned(0, op'length); This should also work. Op <= (others => '0'); The ops problem sounds like a syntax error. Why not post the actual code? --- Quote End --- Hi, I have no idea what the problem was but i reverted my code to a previous save and made my changes one by one and it worked! i wish i knew what caused the problem in the first place, but i cant even seem to reproduce it now.