I am designing hardware that should gradually increase the value of a variable from one value to another within a certain range of clock cycles - graphically you can view it as a solid line drawing.
I used the Breshenem algorithm, but found that if the time is less than the range of variable values, this algorithm is not applicable simply because the axis of the clock cycle cannot be physically replaced with the variable axis of values - the time is always adjacent.
I am looking for advice
- Can Breschenham be modified in some way to work in the above situation in octant 2, when the axes cannot be replaced,
- what other algorithm can be used for situations when the x-range is less than the y-range;
- maybe there is a different approach to resolution and a different algorithm covering both scenarios?
Limitations: separation is not allowed, as well as FP-emulation. Multiplication is allowed (as well as addition and subtraction).
Update: modulo a number other than 2 ^ n is not allowed. Only integer math (unsigned and / or signature). Algorithm tuning should take one or two cycles.
source
share