P2 PASM getqy timing
pic18f2550
Posts: 400
Hello,
the "getqy" is specified with 2..58 clock cycles.
what must I consider, so that I come on 2 clock cyclen?
what should I avoid to get close to the target?
Comments
Hehe, that's why I showed you that snippet of Chip's Spiral Demo code.
54 stage pipeline, plus some for the Cordic-op also being a Hub-op.
You can't reduce the pipeline operation time but the Cog can do other things concurrently to the Cordic while you're waiting for the results. The final result pair, QX and QY, are held indefinitely, so the Cog can collect them much later if desired. Therefore, the 2-clock case is only true when the Cordic results are ready and waiting to be collected.
PS: It gets more complicated when filling the pipeline for higher throughput.
Is it possible to nest the individual tasks?
E.g.
Staggered would be a better name. But yes, that's what that snippet is doing - https://forums.parallax.com/discussion/comment/1520964/#Comment_1520964
There is complexity to it though. Per Cog, there is only one pair of result registers for QX and QY. So timing starts to become critically important, or you'll get corruption of results. Which can be very confusing when not aware.
Ok, I can see that the from-to clocking is a bit of a tricky issue when it comes to fast processing.
With complex and variable values it is certainly much better.
It would be nice if there was a flag indicating that data is ready for collection.
After all, a lot of clocks come together.
Maybe in the future there will be the possibility to assign all slots to a COG.
(arithmetic farmworker)
When really packing the CORDIC pipeline, you need to be starting operations and getting results every 8 clocks, or 4 instructions.
If I understand correctly, the code should look like this.
The beginning and end, yes, but in the middle you need to do both.
Do you mean that?
Yup.
That's nice.
That opens up a lot of nice possibilities.