3 ms·
It's easy to do this. See this part? It's repeated 32 times. // Compute mode. cos_next = cos + (direction_negative ? sin_shr : -sin_shr);
by jhallenworld 8y ago
It's easy to do this. See this part? It's repeated 32 times.
// Compute mode.
cos_next = cos + (direction_negative ? sin_shr : -sin_shr);
sin_next = sin + (direction_negative ? -cos_shr : cos_shr);
angle_next = angle + (direction_negative ? beta : -beta);
What you need to do is make 32 instances of this in series. Then you can compute the sin and cos without any flip-flops, which counts as asynchronous. beta is an array indexed by count, so this will instead be replaced with `BETA_0, `BETA_1, etc. for each instance.
A pipelined version is more useful: you still make 32 instances, but leave flip-flops between each stage. This way you produce one result per cycle, but with a 32-cycle latency. The cycle time is fast since there is not much logic in each stage. This might be useful, for example, to make the logic part of a DDS.