ARM Programming and Optimisation Techniques

Discussion about SAM7 Series and ARM7TDMI based products.

Moderator: nferre

User avatar
pfilippi
Contact:
Posts: 326
Joined: Fri Feb 13, 2004 7:53 pm

ARM Programming and Optimisation Techniques

Mon Sep 12, 2005 10:28 pm

Dear All,

A tutorial about ARM Programing Optimisation Techniques covering the ARM Architecture, the pipeline of an ARM7TDMI, C coding optimisation to reduce memory footprint or execution speed.

Enjoy !
at91_engineer
Posts: 3
Joined: Thu Sep 22, 2005 11:36 pm

Single Page Programming on AT91SAM764

Fri Dec 16, 2005 3:15 am

I am having trouble programming a single page in flash.

It starts the instruction, and the data in the flash page changes to the new data, but I get a pre-fetch abort error before the instruction is finshed.
thedude138
Posts: 2
Joined: Thu Mar 16, 2006 7:12 am

Thanks

Thu Mar 16, 2006 7:16 am

Thanks for the great code! :evil:
f234f234
Posts: 2
Joined: Mon Mar 27, 2006 8:52 am

Mon Mar 27, 2006 9:14 am

thanks~~~
hazart
Posts: 7
Joined: Tue Mar 28, 2006 8:43 pm

Wed May 10, 2006 1:41 am

Thanks, the block copy optimization came in handy in my bootloader. :D
kelly_liu
Contact:
Location: MA, US
Posts: 8
Joined: Wed Aug 16, 2006 8:24 pm

Wed Sep 13, 2006 4:08 pm

The link for download is broken. After I clicked the download link, I got a blank page.

Kelly
zohair
Posts: 1
Joined: Wed Sep 06, 2006 6:49 am

Mon Oct 16, 2006 4:54 pm

link works ok.
Great tutorial, by the way.
seadog
Location: Texas
Posts: 109
Joined: Fri Sep 23, 2005 6:20 pm

Wed Oct 25, 2006 4:23 pm

The link doesn't work for me. Clicking on it brings up a blank page with a little icon with a an 'X' in it (looks like a broken link icon).
grant
Location: Australia
Posts: 8
Joined: Thu Jan 12, 2006 11:33 am

Thu Oct 26, 2006 5:33 pm

The link is definitely ok, works fine for me in both Firefox and Safari. It sounds like misconfiguration with your browser and/or Acrobat installation. Try a different browser.

The PDF is 112,763 bytes and should work in any version of Acrobat or Adobe Viewer 4.x or later.
gerhardf
Posts: 552
Joined: Thu Dec 02, 2004 2:28 pm

Mon Apr 23, 2007 3:58 pm

hello,
has anybody a link where i can download the file?

regards
gerhard
calvinh
Posts: 1
Joined: Wed Apr 25, 2007 2:19 am

Wed Apr 25, 2007 2:21 am

where is the link for the tutorial,?
can somebody please postthe link, as i cannot see the link in this post.
thnx
cal
User avatar
pfilippi
Contact:
Posts: 326
Joined: Fri Feb 13, 2004 7:53 pm

Thu Apr 26, 2007 11:57 am

brebisson
Posts: 4
Joined: Thu May 15, 2008 2:00 am

does a load realy takes 3 cycles?

Wed Aug 06, 2008 1:52 am

hello,

I thought that a LOAD only took 1 cycle if you did not use the loaded value just after...

ie:
LDR R0, [R1]
ADD R2, R2, R4
ADD R2, R2, R0

takes 3 cycles because the end of the LDR is able to run in "parallel" with the ADD R2, R2 R4

while
LDR R0, [R1]
ADD R2, R2, R0
ADD R2, R2, R4
is 4 cycles because we need to wait 1 cycle for the end of the LDR before the ADD R2, R2, R0?

also, I thought that a non executed loop was only 1 cycle as the ARM assumes that a branch is not taken and that the 3 cycle for the loop was only in the case where the loop was executed.

can anyone confirm?

regards, cyrille
riveywood
Contact:
Posts: 1
Joined: Fri Aug 15, 2008 11:29 am

Re: does a load realy takes 3 cycles?

Fri Aug 15, 2008 11:34 am

brebisson wrote:hello,

I thought that a LOAD only took 1 cycle if you did not use the loaded value just after...

ie:
LDR R0, [R1]
ADD R2, R2, R4
ADD R2, R2, R0

takes 3 cycles because the end of the LDR is able to run in "parallel" with the ADD R2, R2 R4

while
LDR R0, [R1]
ADD R2, R2, R0
ADD R2, R2, R4
is 4 cycles because we need to wait 1 cycle for the end of the LDR before the ADD R2, R2, R0?

also, I thought that a non executed loop was only 1 cycle as the ARM assumes that a branch is not taken and that the 3 cycle for the loop was only in the case where the loop was executed.

can anyone confirm?

regards, cyrille
That is true of ARM9, but not ARM7. In ARM7, the load is always three cycles (ignoring any delays imposed by the memory system). On the first cycle it calculates the address for the load, the second it actual performs the read and because it doesn't get the data back until the end of the cycle, it then takes a further cycle to update the register. ARM9 has two additional pipeline stages which allow these cycles to be hidden, if (as you say), the loaded data is not used by a following instruction.

It is correct that for both ARM7 and ARM9, a non-taken branch is 1 cycle and a taken branch is 3 cycles.

Riveywood
arli28
Posts: 7
Joined: Wed Jun 25, 2008 9:04 am

Re: ARM Programming and Optimisation Techniques

Tue Nov 04, 2008 2:55 pm

a good job thanks

Return to “SAM7 ARM7TDMI MCU”

Who is online

Users browsing this forum: No registered users and 1 guest