SPRUHZ7K August 2015 – April 2024 AM5706 , AM5708 , AM5716 , AM5718 , AM5718-HIREL
According to the CBUF operation a read request can only be made when there are enough number of video lines written to the CBUF. Therefore, there should not be any underflow conditions due to normal processing speed variations. An underflow condition occurs when the VBUF read address is greater than the last VBUF write address. To detect an abnormal failure in the read/write mechanism which could cause an underflow condition, each valid CBUF read access is checked for an underflow condition and if detected, an underflow interrupt is generated for the selected CBUF. The STATUS_CBUF_UNDERFLOW[11:0] CBUF_ERR bit field has status flags indicating when underflow occurs. This interrupt condition exists until the corresponding underflow status bit in the STATUS_CBUF_UNDERFLOW register is cleared.
If an underflow is detected on a CBUF read access, the OCM controller generates an underflow interrupt and continues to perform reads and writes normally, but the return data will not be correct while the underflow condition exists.
To avoid a false underflow detection at the end of a frame (due to external decoders sending short last line or due to interlaced input video having different number of lines in even/odd fields), the CFG_OCMC_CBUF_ERR_HANDLER[8] UNDERFLOW_LAST_CBUF_SLICE_DISABLE bit can be set to 0x1 which disables the underflow checking in the last CBUF slice.
The INTR0_STATUS_RAW_SET[13] CBUF_UNDERFLOW_ERR_FOUND/INTR1_STATUS_RAW_SET[13] CBUF_UNDERFLOW_ERR_FOUND bit is asserted if at least one of the bits in the STATUS_CBUF_UNDERFLOW[11:0] CBUF_ERR bit field is set to 0x1.
In addition, the underflow check can be enabled or disabled through the CFG_OCMC_CBUF_ERR_HANDLER[3] UNDERFLOW_ERR_CHECK_EN bit.