Altera_Forum
Honored Contributor
15 years agoUndesired (incorrect?) behavour of CVI AV-ST output
Hi,
I have a video stream (BT1120) entering an FPGA through the CVI. The stream can be interrupted at any time (someone pulling out the plug). I have an internally generated "blue-screen" that I need to switch to if the input video is interrupted. So I have taken the CVI output and the BS output to a Switch component (form the VIP suite). If I detect that the input video is missing, I command the switch to switch to the blue screen. Simple. However, this does not always work - sometimes the switch never switches over from the CVI input to the BS input. It just remains stuck there. The switch only switches on ST frame boundaries and it seems as if the CVI does not always end its current ST frame. I have done a couple of simulations of the CVI alone and have found the following puzzling behavour: 1. If you take the vid_locked input low at an arbitrary point in the input stream, while the CVI is streaming video on its ST output, it simply takes the st_valid output line low, but does not end the current video frame. The video frame remains "open" indefinitely, until vid_locked goes high again. The CVI then re-syncs with the incoming video (while still keeping the previous video frame open), and once synced again, starts to output new video data. But this data is still part of the previous video packet. The result is an invalid video packet. (See CVI_1.jpg attached). Surely, if the input has lost lock, you would want to end the current video frame, resync and then start a new frame? 2. If you command the CVI to stop streaming video on its ST output (clear bit 0 of the control register), the CVI continues until the end of the current video frame, ends the frame correctly, BUT, then outputs another control frame and starts a new video frame by outputting just the header and then nothing else. This video frame remains open as long as the CVI is stopped. (See attached CVI_2.jpg). A Switch component would sit forever and wait for the current video frame to end in this situation. Both of these cases seem like bugs. Or am I missing something? Regards, Niki PS: Forgot to mention that I was using Quartus 9.1SP2.