Flo89
Newbie level 4
- Joined
- Feb 16, 2014
- Messages
- 5
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 44
Hello experts,
When I try to synthesize the following code:
I get this error:
Width mismatch, location has width 16, value 17
But because of the amplitude of sin and cosine beeing max. 2 in normalized form there should be no overflow because the algorithm is there to calculate sin and cosine values.
The problem is that this code is in a loop and so I cannot simply spend 17 bits for the result because then I would need 18 for the next cycle of the loop.
How to handle this?
Thanks in advance for help!
Florian
When I try to synthesize the following code:
Code:
variable sin_temp, cos_temp,sin_tempn, cos_tempn : sfixed (1 downto -14);
sin_tempn := sin_temp - (cos_temp srl i);
I get this error:
Width mismatch, location has width 16, value 17
But because of the amplitude of sin and cosine beeing max. 2 in normalized form there should be no overflow because the algorithm is there to calculate sin and cosine values.
The problem is that this code is in a loop and so I cannot simply spend 17 bits for the result because then I would need 18 for the next cycle of the loop.
How to handle this?
Thanks in advance for help!
Florian
Last edited: