09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

16.8 Scheduling example<br />

Instruction Cycle Timing<br />

Example 16-6 shows a sample code segment and how the processor might schedule it.<br />

Example 16-6 Dual issue instruction sequence for integer pipeline<br />

Cycle PC Opcode Instruction Timing description<br />

1 0x00000ed0: 0xe12fff1e BX r14 Dual issue pipeline 0<br />

1 0x00000ee4: 0xe3500000 CMP r0,#0 Dual issue in pipeline 1<br />

2 0x00000ee8: 0xe3a03003 MOV r3,#3 Dual issue pipeline 0<br />

2 0x00000eec: 0xe3a00000 MOV r0,#0 Dual issue in pipeline 1<br />

3 0x00000ef0: 0x05813000 STREQ r3,[r1,#0] Dual issue in pipeline 0, r3 not needed until E3<br />

3 0x00000ef4: 0xe3520004 CMP r2,#4 Dual issue in pipeline 1<br />

4 0x00000ef8: 0x979ff102 LDRLS pc,[pc,r2,LSL #2] Single issue pipeline 0, +1 cycle for load to pc, no<br />

extra cycle for shift since LSL #2<br />

5 0x00000f2c: 0xe3a00001 MOV r0,#1 Dual issue with 2nd iteration of load in<br />

pipeline 1<br />

6 0x00000f30: 0xea000000 B {pc}+8 #0xf38 dual issue pipeline 0<br />

6 0x00000f38: 0xe5810000 STR r0,[r1,#0] Dual issue pipeline 1<br />

7 0x00000f3c: 0xe49df004 LDR pc,[r13],#4 Single issue pipeline 0, +1 cycle for load to pc<br />

8 0x0000017c: 0xe284200c ADD r2,r4,#0xc Dual issue with 2nd iteration of load in pipeline 1<br />

9 0x00000180: 0xe5960004 LDR r0,[r6,#4] Dual issue pipeline 0<br />

9 0x00000184: 0xe3a0100a MOV r1,#0xa Dual issue pipeline 1<br />

12 0x00000188: 0xe5900000 LDR r0,[r0,#0] Single issue pipeline 0: r0 produced in E3,<br />

required in E1, so +2 cycle stall<br />

13 0x0000018c: 0xe5840000 STR r0,[r4,#0] Single issue pipeline 0 due to LS resource<br />

hazard, no extra delay for r0 since produced in<br />

E3 and consumed in E3<br />

14 0x00000190: 0xe594000c LDR r0,[r4,#0xc] Single issue pipeline 0 due to LS resource hazard<br />

15 0x00000194: 0xe8bd4070 LDMFD r13!,{r4-r6,r14} Load multiple loads r4 in 1st cycle, r5 and r6<br />

in 2nd cycle, r14 in 3rd cycle, 3 cycles total<br />

17 0x00000198: 0xea000368 B {pc}+0xda8 #0xf40 dual issue in pipeline 1 with 3rd cycle of LDM<br />

18 0x00000f40: 0xe2800002 ADD r0,r0,#2 <strong>ARM</strong> Single issue in pipeline 0<br />

19 0x00000f44: 0xe0810000 ADD r0,r1,r0 <strong>ARM</strong> Single issue in pipeline 0, no dual issue due to<br />

hazard on r0 produced in E2 and required in E2<br />

Example 16-7 shows a sample instruction sequence for the NEON pipeline.<br />

Example 16-7 Instruction sequence for the NEON pipeline<br />

Cycle PC Opcode Instruction Timing description<br />

1 0x00003690: 0xf2dbeac8 VMULL.S16 q15,d27,d0[1] ;4X16 SIMD multiply<br />

2 0x00003694: 0xf2daaac8 VMULL.S16 q13,d26,d0[1] ;independent from previous multiply, issued<br />

in back-to-back cycles<br />

2 0x00003698: 0xf4402a5d VST1.16 {d18,d19},[r0@64]! ;128bit 2-issue cycle store (1st issue cycle<br />

is dual issued with previous instruction)<br />

3 0x0000369c: 0xf2d7685a VRSHRN.I32 d22,q5,#9 ;shift operation (dual issued with 2nd issue<br />

cycle of previous store)<br />

4 0x000036a0: 0xf2d7785c VRSHRN.I32 d23,q6,#9 ;independent from previous shift, executed<br />

in back-to-back cycles<br />

5 0x000036a4: 0xf29caac0 VMULL.S16 q5,d28,d0[0] ;4X16 SIMD multiply<br />

6 0x000036a8: 0xf29dcac0 VMULL.S16 q6,d29,d0[0] ;independent from previous multiply, issued<br />

in back-to-back cycles<br />

7 0x000036ac: 0xf26aa8c6 VADD.I32 q13,q13,q3 ;4x32 (128bit) VADD uses result of multiply<br />

from cycle 2.<br />

8 0x000036b0: 0xf26ee8c8 VADD.I32 q15,q15,q4 ;4x32 (128bit) independent from previous<br />

add, issued in back-to-back cycles<br />

9 0x000036b4: 0xf29e6260 VMLAL.S16 q3,d14,d0[2] ;independent multiply<br />

9 0x000036bc: 0xf4004a5d VST1.16 {d4,d5},[r0@64]! ;128bit 2-issue cycle store (1st issue cycle<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 16-37<br />

ID060510 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!