Forum Discussion
How to debug VVP Frame Buffer
The key diagnostic signal here is that Dropped fields = Invalid fields = 287, and both are static — they accumulated at startup and are no longer growing. That rules out an ongoing frame-dimension mismatch and points to two separate problems: a startup sequencing gap, and something causing the visible streaks at steady state.
Startup invalid/dropped fields (the 287 count)
In lite mode, the IP has no image information packets to refer to, so it detects broken frames by checking received frame dimensions against the expected dimensions, and discards them if "Enable the dropping of broken frames" is on. Video Frame Buffer IP Functional Description The IMG_INFO_WIDTH register (address 0x0120) is RW in lite mode and sets the expected width of incoming video fields. Table 899. Video Frame Buffer IP Registers In the software API the register names appear with a pref — Video and Vision Processing Suite IP User Guide Similarly, IMG_INFO_HEIGHT (0x0124) sets the expected height in lite mode. Table 899. Video Frame Buffer IP Registers In the software API the register names appear with a pref — Video and Vision Processing Suite IP User Guide
If those registers are written *after* the TPG has already started sending frames, the first N frames will all be flagged invalid and dropped. Write IMG_INFO_WIDTH, IMG_INFO_HEIGHT, IMG_INFO_SUBSAMPLING, IMG_INFO_COLORSPACE, and IMG_INFO_COSITING to the correct values before you assert OUTPUT_CONTROL and before the video source is live.
The steady-state streak issue
Since dropped/invalid fields are no longer growing but streaks persist, the most likely causes are:
1. Inter-buffer stride too small. The inter-buffer stride depends on video frame format and maximum frame size; set it large enough to separate frames of the specified maximum height and width — the GUI gives an error if the stride is too low. Table 896. Video Frame Buffer Performance and Resources The table shows ALM usage and fMAX for a des — Video and Vision Processing Suite IP User Guide For YCC422 10-bit at 4 PIP verify the stride in the MEM_BUFFER_STRIDE register (0x0028) covers the full frame including any line-stride padding. If read and write buffers overlap even slightly you will see horizontal tear artifacts that look like streaks.
2. Memory bandwidth / backpressure. The frame buffer latency depends on the availability of the external memory interfaces, which may backpressure the IP's read and write host interfaces via the av_mm_mem_read_host_waitrequest and av_mm_mem_write_host_waitrequest signals; the streaming video output also experiences backpressure via axi4s_vid_out_tready. Video Frame Buffer IP Functional Description With triple buffering doing simultaneous read and write to the same DDR interface, if the EMIF can't sustain the aggregate bandwidth for 4-PIP 10-bit YCC422 at your frame rate, partial lines get written or read, producing horizontal streaks. Add SignalTap on the waitrequest signals to see if they are asserting frequently during active video.
3. OUTPUT_CONTROL sequencing. The IP starts producing output frames only when you set the OUTPUT_CONTROL bit, and selects which frame to output based on the buffer behavior parameters. Video Frame Buffer IP Functional Description Received frames are available for output only when the Avalon memory-mapped agent accepts the last beat of the last line. Video Frame Buffer IP Functional Description If OUTPUT_CONTROL is set before the first complete frame is in memory, the first frame the IP reads may be partially written, producing an initial streak that persists until the triple-buffer state machine settles.
Recommended next steps:
- Read back MEM_BUFFER_STRIDE (0x0028) and MEM_LINE_STRIDE (0x002C) and manually verify they are consistent with your resolution, bits-per-sample, number of color planes, pixels-in-parallel, and packing mode for YCC422 10-bit 4-PIP.
- Instrument the EMIF waitrequest signals with SignalTap to quantify backpressure during active video.
- Ensure IMG_INFO_WIDTH/HEIGHT/SUBSAMPLING/COLORSPACE/COSITING are all written and stable, then assert OUTPUT_CONTROL only after the INPUT_STATUS register (0x0140) has gone high at least once, confirming the first frame is being written.
- As a sanity check, temporarily switch to double-buffer mode (turn off both drop and repeat) to see if the streaks disappear — if they do, the issue is bandwidth-related contention under triple-buffer simultaneous read/write.
Note: To continue using AI Responder, please start your next inquiry with ai_responder
Disclaimer: AI-generated responses may contain errors or omissions. Please verify technical guidance with official Altera documentation before implementation.
Thank you very much.