How to get the Port Count without a dummy write?
Posted: Fri Sep 13, 2019 1:25 am
I'm writing to a set of 1 bit ports clocked from a single clock source. Each of these ports is buffered from a 32 bit shift register. The port counters are matched because there were all initialised before the clock source was started and so they all increment together.
The official way in the XMOS Programming Guide (section 6.10) to synchronise multiple ports is to use a sync(p) call to create the largest timing window and then quickly stuff each of the transfer registers before next clock edge. However, I am clocking the shift registers at around 60MHz and the window is too small get everything written in time.
Instead I am using scheduled transfers with the "@ count+delta" form. For this I need to read the current timestamp from one of the ports by doing a dummy write. This is not too bad, because I can write 0xffffffff to a line that is parked high anyway, but it is hugely wasteful of time.
Is there a way that I can read the port timestamp without a dummy write? Anyone used GETTS directly?
(Yes, I know I could use a 4 bit port which would be in sync already, but I have run out of 4 bit ports)
Update:
This is better, in that I can limit the dummy write to a single clocked bit rather than the whole field.
The official way in the XMOS Programming Guide (section 6.10) to synchronise multiple ports is to use a sync(p) call to create the largest timing window and then quickly stuff each of the transfer registers before next clock edge. However, I am clocking the shift registers at around 60MHz and the window is too small get everything written in time.
Instead I am using scheduled transfers with the "@ count+delta" form. For this I need to read the current timestamp from one of the ports by doing a dummy write. This is not too bad, because I can write 0xffffffff to a line that is parked high anyway, but it is hugely wasteful of time.
Is there a way that I can read the port timestamp without a dummy write? Anyone used GETTS directly?
(Yes, I know I could use a 4 bit port which would be in sync already, but I have run out of 4 bit ports)
Update:
Code: Select all
count = partout_timestamped(dac_sync_A, 1 ,1);