Forum Discussion
How to debug VVP Frame Buffer
No output data while change the mode to double-buffer.
But the status is always fine.
Strides are fixed, the line stride is 0x3000, buffer stride is 0x3000000
- ai_responder7 hours ago
Community Manager
Your status registers and field counters look healthy — both Input Running and Output Running are asserted, and the Output fields counter is incrementing — but that is exactly the trap in double-buffer mode. The VFB is reading from memory and clocking out frames, yet the downstream pipeline loses sync because of how double-buffer stalls work.
The core issue: TVALID stalls between frames
Double-buffering is selected by turning off both Enable dropping of input frames and Enable repeating of output frames. It uses only two frame buffers, with base addresses calculated from the base address and interbuffer stride you specify. If no free buffers are available and a new frame is pending at the input, frame writing stalls — the IP holds off the input by de-asserting TREADY until a free buffer becomes available. If the IP finishes creating output from one buffer and the other buffer does not hold a complete, new frame, the IP stalls its output by lowering TVALID. Video Frame Buffer IP Functional Description
That last sentence is the problem. In double-buffer mode the VFB periodically drives TVALID low between successive output frames while it waits for the write path to complete the next frame. Any Clocked Video Output or similar downstream IP that expects a continuous, uninterrupted stream will lose sync at those gaps and produce no visible video — even though the VFB's own status and field counter look fine. Triple-buffer mode (Enable dropping = ON, Enable repeating = ON) eliminates those TVALID gaps because there is always a third "spare" buffer ready to read while the other two are in use.
Dropped/Invalid fields in one of your screenshots
Select triple-buffering by turning on both Enable dropping of input frames and Enable repeating of output frames in the GUI. For triple-buffering, the frame buffer uses three frame buffers, with base addresses calculated from the base address and interbuffer stride you select. The stride is the separation between frames in memory and is always fixed to the parameterized value regardless of the size of frames the IP receives. Video Frame Buffer IP Functional Description
The 287 Dropped / 287 Invalid count visible in your left screenshot is consistent with a prior triple-buffer run; in true double-buffer mode those counters should stay at 0 because the IP stalls rather than drops.
Things to verify before concluding it is a pure stall problem
1. OUTPUT_CONTROL must be set. Write a 1 to register 0x015C for the frame buffer to start producing buffered frames; write a 0 to stop producing buffered frames. 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 Confirm this is 1 after every reset.
2. Lite-mode width/height registers. When you turn on lite mode, register IMG_INFO_WIDTH (0x0120) holds the expected width of the incoming video fields; when you turn off lite mode, the received width in the IP derives from the image information packets. 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 Same applies to IMG_INFO_HEIGHT (0x0124), IMG_INFO_INTERLACE, IMG_INFO_COLORSPACE, and IMG_INFO_SUBSAMPLING. If any of these are zero or mis-programmed after a recompile, the downstream IP will not form a valid video stream even though the VFB output counter is incrementing.
3. Buffer stride sanity check. Inter-buffer stride depends on video frame format and maximum frame size; set a stride (in bytes) 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 Your 0x3000000 (48 MB) inter-buffer stride with a 0x3000 (12,288-byte) line stride gives ~4,096 lines of separation, which is well above a 1080-line frame, so stride is not the issue here.
Bottom line: the TVALID stall between frames in double-buffer mode is the most likely reason a downstream CVO or display IP loses video even while the VFB status registers read healthy. If your input and output clocks are not genlocked, switch back to triple-buffer mode (compile with both Enable dropping and Enable repeating turned on) so there is always a fully-written spare buffer available at the output side.
Note: To continue using AI Responder, please start your next inquiry with ai_responderDisclaimer: AI-generated responses may contain errors or omissions. Please verify technical guidance with official Altera documentation before implementation.
Thank you very much.