SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
The read port is used to read gain and offset data from SDRAM required for the LSC computation. When LSC is enabled, 8-bit gain values are read and 8-bit offset values can optionally also be read. The LSC gain computation can be enabled or disabled by setting the ISIF_2DLSCCFG[0] ENABLE bit. The LSC offset computation can be enabled by setting the ISIF_2DLSCOFST[0] OFSTEN bit.
LSC fetches four 8-bit gain values per paxel and optionally four 8-bit offset values per paxel. This is a maximum 8 bytes per paxel.
The bandwidth that is generated by the LSC module is also proportional to the paxel size. The paxel size is set up by the ISIF_2DLSCCFG[14:12] GAIN_MODE_M and ISIF_2DLSCCFG[10:8] GAIN_MODE_N bit fields. The possible values are 8, 16, 32, 64, and 128. Smaller values lead to higher memory bandwidth requirements. Hence, the worst case is achieved by setting an 8 × 8 paxel size.
When LSC is enabled it automatically prefetches two lines of gain values and two lines of offset values (if this is enabled). When the first VD comes, it again requests one line of gain values and one line of offset values (if this is enabled). Then, it again fetches one line of gain values and one line of offset values (if this is enabled) after ISIF_2DLSCCFG[10:8] GAIN_MODE_N lines. It continues to do so until the last row of paxels. For the last row of paxels, it fetch two lines of gain values and two lines of offset values (if this is enabled), which are used for the following frame.
By default, LSC creates peak bandwidth requirements. To avoid this, the MTC bandwidth limiter must be used to space the request over time.
The MTC bandwidth limiter must be used to smooth the bandwidth requirements of the LSC module. The MTC bandwidth limiter can be set with the ISP5_BL_MTC_1.ISIF_R register.
The principle is that instead of reading the gain and offset data as fast as possible, use the time that it takes for ISIF_2DLSCCFG[10:8] GAIN_MODE_N lines to pass through the ISP to read the data.
Table 9-218 gives the estimated delay between 32-byte MTC requests for different pixel clock frequencies and assumes the L3_MAIN clock at 212.8 MHz.
Pixel Clock | Max Bandwidth MB/s | Expected Delay Between MTC Requests |
---|---|---|
212.8 | 25.07 | 255 cycles = 1275 ns |
100 | 12.5 | 510 cycles = 2550 ns |
10 | 1.25 | 5103 cycles = 2515 ns |
When the bandwidth limiter is used, ensure that there is enough time for the data prefetching.