R
rickman
I suppose this is something that you need to expect, but I just have
never come across this before. I have some concurrent logic equations
using integers where one input common to two assignments changes and
because one gets updated before the other, one is set to a value that
is outside the range of the integer and flags an error in
simulation.
C <= B - A * stuff;
D <= A + C; -- A changes and puts D outside of its range until C is
updated
In the real world, this is not really an issue since all sorts of
intermediate states are expected when doing arithmetic. But VHDL
doesn't seem to accommodate this well. The only way I can think of to
fix this, without changing the logic, is to do these calculations
inside a combinatorial process using variables. Then I can control
the sequence of updates explicitly.
The only other thing I can think is to assign A to A' and use A' in
place of A in the assignment for D. That may still allow an error,
but if A'' is used, then there will be two delta delays in D
assignment path. However, if C grows because A has shrunk, then that
could cause the same sort of out of bounds error on D.
Is there another way make this work that isn't so cumbersome?
Rick
never come across this before. I have some concurrent logic equations
using integers where one input common to two assignments changes and
because one gets updated before the other, one is set to a value that
is outside the range of the integer and flags an error in
simulation.
C <= B - A * stuff;
D <= A + C; -- A changes and puts D outside of its range until C is
updated
In the real world, this is not really an issue since all sorts of
intermediate states are expected when doing arithmetic. But VHDL
doesn't seem to accommodate this well. The only way I can think of to
fix this, without changing the logic, is to do these calculations
inside a combinatorial process using variables. Then I can control
the sequence of updates explicitly.
The only other thing I can think is to assign A to A' and use A' in
place of A in the assignment for D. That may still allow an error,
but if A'' is used, then there will be two delta delays in D
assignment path. However, if C grows because A has shrunk, then that
could cause the same sort of out of bounds error on D.
Is there another way make this work that isn't so cumbersome?
Rick