Forum Discussion
Altera_Forum
Honored Contributor
14 years agoto Kevin: I didn't post the code as it is a work in progress, rather a lot, and proprietary. Now you say:
--- Quote Start --- I suspect that in your simulation there may be a simulation delta delay between 'X' and 'Y' and that there is a delta cycle where X and Y do produce the value of 261. To verify I would suggest putting X, Y and lxn into a list window and observe there whether or not X and Y really are changing on the same delta cycle or not and whether or not X and Y are at values that would create the errent value at the time of the error. --- Quote End --- But why would I have to care about that. The simulator should handle my code or flag an error on compilation not on runtime. Your code very closely resembles what I have, but I did enclose the 'lxn <= ... ' inside a process. Also in you code lxn is not exported to the output? I tried the list-thing (1st encounter) and in the list it shows 254 ... no sign of a 261 in miles ... So it will be the 'process'?
process( X , Y , Z , M )
begin
if (M = 0) then
if (Z < 0) then
lzn <= Z + ARCZ ;
lxn <= X + Y / (2 ** RANK) ;
lyn <= Y - X / (2 ** RANK) ;
else
...
end if ;
end if ;
end process ;
to Dave: --- Quote Start --- Tests failed with earlier versions of Modelsim, since you have conversion functions on the ports to components (which we discussed in an earlier thread - it requires creating intermediate signals). --- Quote End --- Old habits die hard ... then again the latest released version should be better than an earlier one? --- Quote Start --- I defined a subtype for your integer of limited range, and then added dummy qualifications around each argument and result of the operation, and the error was still generated. Definitely looks like a bug. I'd recommend trying to create a minimal example with just your subtype and whatever operation leads to the error, eg., have something as simple as z <= x + y; and ramp x and y until the error is triggered. Submit that file with a SR to Mentor and to Altera. --- Quote End --- Kevin shows that the minimal example seems to work. I can file an SR to Altera, and I registered on supportnet.mentor.com but only got a 'guest' status.