The OCP request generation state machine loops through the phases described below for each image line until the complete image has been fetched.
- DPCM initialization data
- CAL_RD_DMA_CTRL .INIT=1
- Initialization data fetched as single request of 16 bytes
- The source address must be 8 byte aligned. The RD DMA fetches 16 bytes (full OCP bus width) but only uses 8 of them (depending on bit 3 of the data fetch address)
- CAL_RD_DMA_CTRL .INIT=0
- Pixel data / Y data / UV data
- When CAL_RD_DMA_CTRL .RD_PATTERN=YUV420, requests for Y and UV are interleaved at OCP burst boundary. Both streams share the same response FIFO and data is interleaved before sending it to the internal pipeline.
- One (CAL_RD_DMA_CTRL .RD_PATTERN /= YUV420) or two ( CAL_RD_DMA_CTRL .RD_PATTERN=YUV420) smaller burst(s) is (are) issued to re-align OCP address to the burst boundary (defined by CAL_CTRL.BURST_SIZE )
- "n" full sized bursts (defined by CAL_CTRL .BURST_SIZE ) are issued to fetch the data in the middle of the line
- One ( CAL_RD_DMA_CTRL .RD_PATTERN/=YUV420) or two ( CAL_RD_DMA_CTRL .RD_PATTERN=YUV420) smaller burst(s) is (are) issued to fetch the remaining data at the line end (burst size is less than CAL_CTRL .BURST_SIZE).
- An OCP can never cross a 128 byte boundary or be longer than the size define in CAL_CTRL .BURST_SIZE
Figure 9-23 shows a few graphical examples of OCP burst generation for pixel data.
Below is an example sequence of OCP transactions.
Parameters
CAL_CTRL .BURST_SIZE = 128
CAL_RD_DMA_INIT_ADDR = 0x00100020
CAL_RD_DMA_INIT_OFST = 0x00000008
CAL_RD_DMA_PIX_ADDR = 0x000027C0
CAL_RD_DMA_PIX_OFST = 0x000003E0
CAL_RD_DMA_XSIZE = 816
CAL_RD_DMA_YSIZE = 10
The read DMA pipelines requests to OCPO for best performance. It has a FIFO to store prefetched data until it can be sent through the processing pipeline. It requests new data from SDRAM until the complete frame has been read. Requests can only be issued when:
- There is enough space in the FIFO to store the OCPO response
- OCPO is idle (i.e. write DMA requests have higher priority)
- No more than CAL_RD_DMA_CTRL .TAG_CNT read requests are outstanding
- No more than CAL_CTRL .TAG_CNT read+write requests are outstanding (two separate configuration registers are provided so that a certain number of tags can be reserved exclusively for write transactions)
- The last read request was issues more than CAL_RD_DMA_CTRL .BW_LIMITER*8 clock cycles ago.
The read FIFO can only hold data from up to two consecutive images lines and their initialization data. Performance will be lower for very "small" lines when OCP latencies are "long" as the read FIFO will not prefetch "enough" data. Full performance is expected for image lines wider than 512 bytes.