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
The C code for the pipeline read function is:
extern volatile float wrDuration;
long long temp1, temp2, temp3, temp4;
void pipeline_read(unsigned byte_cnt)
{
long long *restrict src = (long long *)ext_buf[0];
unsigned int wrStartTime, wrStopTime;
int i;
wrStartTime = CSL_tscRead();
for (i=0; i<byte_cnt/8; i+=4)
{
temp1 = src[i];
temp2 = src[i+1];
temp3 = src[i+2];
temp4 = src[i+3];
}
wrStopTime = CSL_tscRead();
WBINVALIDATE
wrDuration = (float)(wrStopTime-wrStartTime)/(DSP_FREQ/1000);
}
The analysis of the scheduled iteration is given out by the compiler as:
;*----------------------------------------------------------------------------*
;* SOFTWARE PIPELINE INFORMATION
;*
;* Loop found in file : ../pipeline_loop.c
;* Loop source line : 59
;* Loop opening brace source line : 66
;* Loop closing brace source line : 75
;* Known Minimum Trip Count : 1
;* Known Max Trip Count Factor : 1
;* Loop Carried Dependency Bound(^) : 1
;* Unpartitioned Resource Bound : 2
;* Partitioned Resource Bound(*) : 2
;* Resource Partition:
;* A-side B-side
;* .L units 0 0
;* .S units 0 0
;* .D units 2* 2*
;* .M units 0 0
;* .X cross paths 0 1
;* .T address paths 2* 2*
;* Long read paths 0 0
;* Long write paths 0 0
;* Logical ops (.LS) 1 0 (.L or .S unit)
;* Addition ops (.LSD) 0 1 (.L or .S or .D unit)
;* Bound(.L .S .LS) 1 0
;* Bound(.L .S .D .LS .LSD) 1 1
;*
;* Searching for software pipeline schedule at ...
;* ii = 2 Schedule found with 2 iterations in parallel
;*----------------------------------------------------------------------------*
;* SETUP CODE
;*
;* MV A8,B8
;*
;* SINGLE SCHEDULED ITERATION
;*
;* $C$C201:
;* 0 LDDW .D1T1 *+A8(16),A7:A6 ; |72| ^
;* 1 LDDW .D1T1 *+A8(24),A5:A4 ; |73| ^
;* || ADD .L1 A3,A8,A8 ; ^
;* 2 LDDW .D2T2 *B8,B7:B6 ; |67| ^
;* 3 LDDW .D2T2 *+B8(8),B5:B4 ; |71| ^
;* || MV .L2X A8,B8 ; ^ Define a twin register
;* || SPBR $C$C201
;* 4 ; BRANCHCC OCCURS {$C$C201} ; |59|
;*----------------------------------------------------------------------------*
The pipeline can be viewed as in Figure 21. It can be observed that once the loop prologue (pipe up) completes, the code would keep the two 64-bit load engines occupied every cycle until the loop begins to pipe down.