[FYI] waitvid vs hub window
kuroneko
Posts: 3,623
Disclaimer: This is mainly for people who need/want to know how the waitvid hand-off point (WHOP) can be synchronised with the hub window. I'm aware that this solution relies on certain clock ratios to be useful. In order to keep the graphics intact I do this as kind of a slide show.
What it boils down to is simply to stretch a given frame by a number of adjustment cycles and then switch back to the normal frame size.
At this point the PLL is settled and the video generator is up and running (outputs are disabled). We now need a reference to a live waitvid call in order to calculate any adjustment. As the frame length comes down to two hub windows, measuring any waitvid will give us the relevant info (this detail is omitted here but can be found in the attached source).
And that's about it. No magic involved. The example source file works for the demoboard (ATM it displays the length of the test sequence, 19 or 35 cycles, see file for details). In case someone chokes on the NCO reference in the first picture, I'm referring to the NCO feeding the PLL.
The code sequence above (hub op followed by waitvid) is also a prime candidate for [post=993236]not using a waitvid[/post] at all.
What it boils down to is simply to stretch a given frame by a number of adjustment cycles and then switch back to the normal frame size.
At this point the PLL is settled and the video generator is up and running (outputs are disabled). We now need a reference to a live waitvid call in order to calculate any adjustment. As the frame length comes down to two hub windows, measuring any waitvid will give us the relevant info (this detail is omitted here but can be found in the attached source).
And that's about it. No magic involved. The example source file works for the demoboard (ATM it displays the length of the test sequence, 19 or 35 cycles, see file for details). In case someone chokes on the NCO reference in the first picture, I'm referring to the NCO feeding the PLL.
The code sequence above (hub op followed by waitvid) is also a prime candidate for [post=993236]not using a waitvid[/post] at all.
waitvid transmitter - 4 cycles/bit * PLL mode 2, clkfreq/4 setup, WHOP @ 4n+3 byte_0 rdbyte pixels, addr +0 = cmp colour, pixels +8 -4 - 20 cycles for house keeping +0 = - address increment +4 - loop management +8 -4 byte_1 rdbyte pixels, addr +0 = cmp colour, pixels +8References:
- [post=963147]Ideas or theory on odd problem related to spin program startup[/post]
- [thread=126874]waitvid setup timing & Co[/thread]
- [post=982876]Full Color Tile Driver Thread[/post]
- [thread=129769]50 column VGA text driver in one cog ...[/thread]
- [thread=129739]64 column VGA text driver in one cog ...[/thread]
- [thread=129781]80 column VGA text driver in one cog ...[/thread]
Comments