Hi there,
i have an idea of an app, witch would need any cpu-speed as posible, so I have !x! questions:
1) I've looked in the arm7 default code and as I see (and understand) , it is most time not bussy ("Keep the ARM7 mostly idle") and so the arm7 could do some operations and save some arm9 resources (=more speed for the app). Is that right?
2) Only the arm7 has direct access to the touchscreen, the x,y and "close"-buttons. So has the arm9 speedloses accessing them (because of getting them from arm7) or is that meaningless?
3) How can I get the real size of the arm7 code in memory or how can I get, how much free space i have in the arm7 given 96KB? And are variabbles stored in thet 96KB, so that I dont lose speed, making variables in arm7 code? Are arrays also in that 96KB alocated?
4) Here one not arm7 aligned question: How can I get the free space of the 4 MB main memory?
Please help me!
thx syrasia
some questions around arm7
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: some questions around arm7
The arm7 is kept mostly idle in order to prevent it impacting on the arm9 performance. Given that the arm7 takes priority over the arm9 when accessing the external buses it's best to leave the arm7 to do what it does best - touchscreen, wifi and audio.
The default arm7 core reads X/Y and touchscreen regularly and makes the readings available to the arm9, there is no speed loss involved.
You can tell how much iwram is available on the arm7 from the map file generated by the build.
Newlib has mallinfo which will give you some statistics on memory use.
The default arm7 core reads X/Y and touchscreen regularly and makes the readings available to the arm9, there is no speed loss involved.
You can tell how much iwram is available on the arm7 from the map file generated by the build.
Newlib has mallinfo which will give you some statistics on memory use.
Re: some questions around arm7
Frist thanks for the fast answer,
but Im not happy yet.
When the access of arm7 could slow the arm9, then how can I change the priority of the external buses to arm9? (Is it posible?)
I realy need the arm7 cpu resurses for some operations (to help the arm9 a bit out).
And here an other question:
what is the difference between arm (-marm) and thumb (-mthumb) architecture?
but Im not happy yet.
When the access of arm7 could slow the arm9, then how can I change the priority of the external buses to arm9? (Is it posible?)
I realy need the arm7 cpu resurses for some operations (to help the arm9 a bit out).
And here an other question:
what is the difference between arm (-marm) and thumb (-mthumb) architecture?
Re: some questions around arm7
What are you planning on doing?
Are you sure the arm9 cannot handle the full load? Are you sure you 'really' need the arm7 to help out? It's not easy to make a system that uses both of the processors efficiently. The ARM7 processor can't even access mainram efficiently, there are huge waitstates when accessing mainram [normally] which are greatly reduced by on the arm9 due to its cache.
-marm generates code with full 32-bit instructions ("arm code"), which can process data more efficiently at the cost of a higher memory usage. -mthumb generates cut down 16-bit instructions ("thumb code") that use around ~65% of the memory required for ARM code, but it might take more than one instruction to do the same 32-bit instruction operation. (also you might save a little time since you can fetch double the amount of thumb instructions into the cache)
Are you sure the arm9 cannot handle the full load? Are you sure you 'really' need the arm7 to help out? It's not easy to make a system that uses both of the processors efficiently. The ARM7 processor can't even access mainram efficiently, there are huge waitstates when accessing mainram [normally] which are greatly reduced by on the arm9 due to its cache.
-marm generates code with full 32-bit instructions ("arm code"), which can process data more efficiently at the cost of a higher memory usage. -mthumb generates cut down 16-bit instructions ("thumb code") that use around ~65% of the memory required for ARM code, but it might take more than one instruction to do the same 32-bit instruction operation. (also you might save a little time since you can fetch double the amount of thumb instructions into the cache)
Re: some questions around arm7
I am planing to write an game eangine, witch would be like an skript in binary mode, so i could write my games without the computer. It was thr idea of giving thr arm7 some operations around touch-screen (something like an touch-button engine) and giving the output to the arm9. And maybe would be much more work, but for me it would be worth it.
Here are some questions: First, is it posible to change the bus access priority?
Next, is it realy needed to change it, because I wanted only to work in the IWRAM and WRAM, witch a aligned to the arm7. If I use only some Variables, the would be aligned in the IWRAM or WRAM aslong there is enough space (and work per dma accessing only that ram). so I wouldn't access the main Ram or VRAM and the arm9 had full speed, I'd only then had to give from arm7 to arm9 the results. I guess right?
Last question, but more for information, do comercial games also leave the arm7 unbusy? Or do the maybe the work to get the best out of the NDS and use the arm7 also?
But altouth thank you.
Here are some questions: First, is it posible to change the bus access priority?
Next, is it realy needed to change it, because I wanted only to work in the IWRAM and WRAM, witch a aligned to the arm7. If I use only some Variables, the would be aligned in the IWRAM or WRAM aslong there is enough space (and work per dma accessing only that ram). so I wouldn't access the main Ram or VRAM and the arm9 had full speed, I'd only then had to give from arm7 to arm9 the results. I guess right?
Last question, but more for information, do comercial games also leave the arm7 unbusy? Or do the maybe the work to get the best out of the NDS and use the arm7 also?
But altouth thank you.
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: some questions around arm7
Commercial developers aren't allowed to touch the arm7 at all.
Changing the bus access priority causes sound artifacts and is rather likely to interfere with wifi.
Changing the bus access priority causes sound artifacts and is rather likely to interfere with wifi.
Re: some questions around arm7
ok, thx.
So comercial programmers don't touch the arm7 code also?
Some way crasy.
But I want to know, if i only remove the maxmod lib (i won't use it) and do some operations with variables on the arm7, are then the variables located in the arm7 memory? And it sholdn't slow the arm9, because i don't use dma or any memory operations on the main ram. I only would use the fifo to comunicate betwen the arm9 and arm7 once per frame. Would that be an acceptable use of the arm7? (The arm7 would be only a bit more busy.)
Please reply, although I maybe pester (if so, say it and I stop asking).
So comercial programmers don't touch the arm7 code also?
Some way crasy.
But I want to know, if i only remove the maxmod lib (i won't use it) and do some operations with variables on the arm7, are then the variables located in the arm7 memory? And it sholdn't slow the arm9, because i don't use dma or any memory operations on the main ram. I only would use the fifo to comunicate betwen the arm9 and arm7 once per frame. Would that be an acceptable use of the arm7? (The arm7 would be only a bit more busy.)
Please reply, although I maybe pester (if so, say it and I stop asking).
Who is online
Users browsing this forum: Google [Bot] and 5 guests