SPRAC21A June 2016 – June 2019 OMAP-L132 , OMAP-L138 , TDA2E , TDA2EG-17 , TDA2HF , TDA2HG , TDA2HV , TDA2LF , TDA2P-ABZ , TDA2P-ACD , TDA2SA , TDA2SG , TDA2SX , TDA3LA , TDA3LX , TDA3MA , TDA3MD , TDA3MV
Following is the C code for the L2 Stride-Jmp Copy function. The difference from the earlier pipeline copy is as highlighted.
void l2_stride_jmp_copy(int byte_cnt)
{
long long *restrict dst = (long long *)ext_buf[1];
long long *restrict src = (long long *)ext_buf[0];
unsigned int wrStartTime, wrStopTime;
int i;
_nassert((int)dst == 0);
_nassert((int)src == 0);
wrStartTime = CSL_tscRead();
for (i=0; i<byte_cnt/8; i+=16 )
{
dst[i] = src[i];
}
wrStopTime = CSL_tscRead();
WBINVALIDATE
wrDuration = (float)(wrStopTime-wrStartTime)/(DSP_FREQ/1000);
}
Following is the analysis of the scheduled iteration given out by the compiler. The pipeline remains the same as with the pipeline copy with addition of the parallel add operations with the LDDW and STDW.
;*----------------------------------------------------------------------------*
;* SOFTWARE PIPELINE INFORMATION
;*
;* Loop found in file : ../pipeline_loop.c
;* Loop source line : 37
;* Loop opening brace source line : 44
;* Loop closing brace source line : 46
;* Known Minimum Trip Count : 1
;* Known Max Trip Count Factor : 1
;* Loop Carried Dependency Bound(^) : 1
;* Unpartitioned Resource Bound : 1
;* Partitioned Resource Bound(*) : 1
;* Resource Partition:
;* A-side B-side
;* .L units 0 0
;* .S units 0 0
;* .D units 1* 1*
;* .M units 0 0
;* .X cross paths 1* 1*
;* .T address paths 1* 1*
;* Long read paths 0 0
;* Long write paths 0 0
;* Logical ops (.LS) 1 2 (.L or .S unit)
;* Addition ops (.LSD) 0 0 (.L or .S or .D unit)
;* Bound(.L .S .LS) 1* 1*
;* Bound(.L .S .D .LS .LSD) 1* 1*
;*
;* Searching for software pipeline schedule at ...
;* ii = 1 Schedule found with 7 iterations in parallel
;*----------------------------------------------------------------------------*
;* SINGLE SCHEDULED ITERATION
;*
;* $C$C325:
;* 0 LDDW .D1T1 *A3,A5:A4 ; |45| ^
;* || ADD .L1X B6,A3,A3 ; ^
;* 1 NOP 4
;* 5 DADD .S2X 0,A5:A4,B5:B4 ; |45| Define a twin register
;* 6 STDW .D2T2 B5:B4,*B7 ; |45| ^
;* || ADD .L2 B6,B7,B7 ; ^
;* || SPBR $C$C325
;* 7 ; BRANCHCC OCCURS {$C$C325} ; |37|
;*----------------------------------------------------------------------------*