ARM System-on-chip Architecture

Stephen Bo Furber

Mentioned 4

A reference for system-on-chip designers and professional engineers covers design, memory management, on-chip buses, debug and production tests, application development, and ARM and Thumb programming models.

More on Amazon.com

Mentioned in questions and answers.

I'm familiar with X86[-64] architecture & assembly. I want to start develop for an ARM processor. But unlike desktop processors, I don't have an actual ARM processor. I think I need an ARM simulator.

http://www.armtutorial.com/ say

An ARM assembly compiler will be required, the most accessible is the ARMulator.

I thought of downloading Armulator but found from http://forums.arm.com/index.php?showtopic=13744 that

Its not sold seperately. But you can download an eval of RVDS - which includes RVISS/ARMulator

I've downloaded & installed RVDS but It looks very complex. I'm unable to figure out what do I need to do to write ARM assembly & run it.

Do you have any better suggestions?

Options for environments

  • Install Linux in the QEMU system emulator. It can emulate a variety of ARM-based chipsets.
  • Get an emulator for a specific ARM-chipset like a game handheld. Gameboy Advance is fun to play with. NoCash GBA and VisualBoy Advance are two great GBA emulators.

Toolchains

You will need a toolchain. A toolchain is a collection of low-level tools like an assembler, a linker, a compiler, an archiver and a bunch of other usefull stuff. Even more, you want a cross-toolchain, which means that the toolchain runs on one system, but builds executables for another architecture. This way you can build applications that run on ARM-devices, but on your x86-based PC. It's faster and more convenient.

If you run Windows, DevkitPro is a fairly good choice. For Unix/Linux/BSD variants, you have CodeSourcery's free toolchains, and the GCC toolchain from gnuarm.com. There are several others, but you don't need more options.

Documentation

Get the specification for your ARM CPU of choice at infocenter.arm.com. One reference you need no matter the CPU is the ARM Architecture Reference Manual (Often abbreviated ARMARM). I'm hosting an older version, which covers the ARM architecture and instruction set version up to ARMv4T, here, but you will find the current and later versions on infocenter.arm.com as well. If you go for GBA, notice that the CPU is an ARM7TDMI, with the instruction set version ARMv4T.

The ARMARM contains tips and examples for usual nitty-gritty system coding, tips on how to proceed on certain design issues, as well as a reference of both the ARM instruction set, Thumb instruction set and co-processors like MMUs, MPUs, DSPs and FPUs.

If you stick with QEMU, that's pretty much all you need, since the Linux kernel handles everything. QEMU also has user-mode emulation (with a C-library stub). If you go for one of the GBA emulators, here's a nice reference over the GBA hardware and hardware registers: CowBiteSpec. Also make sure to check out http://www.gbadev.org/.

Nintendo DS is probably an option as well, but I don't know of any decent emulators for that handheld yet. Good luck to you :-)

EDIT: Here's a trivial example of some GBA code I wrote years ago: GBA Color fill 240x160 16-bit example

I did some reseach, but could not find much information.

I'd like to know how many L1 read and L1 write ports ARM embedded processors have and how wide the ports are. Specifically, I am interested in Cortex-A8, Cortex-A9, and Cortext-A15.

My blind guess is that a Cortex-A9 processor has one L1 read port and one L1 write port which are 64 bits wide. My other guess is that it has a single shared read/write port. Any thoughts on that?

These processors have separate L1 instruction and data caches. I'm pretty sure all ARM cores' L1 I-cache and D-cache each have 1 read and 1 write port Furber p.81.

L1 Cache is in each core, so for details I'd go to core TRM e.g. Cortex-A9 TRM rather than an MPCore TRM. Ch 7 there tells of 64-bit datapath for each.

I'm looking at a sample code that causes an undefined instruction exception and provides a handler for the exception. The last line of the code has unfamiliar syntax and I haven't been able to find its meaning:

LDMFD sp!, {r0-r12, pc}^

What does the ^ symbol represent?

This copies SPSR of current mode into CPSR, giving atomic-return-and-restore-state instruction. There is nice description in Furber text pg. 131.

Please suggest a book for me on embedded system design which covers:

  1. Advanced design of embedded software
  2. Design of hardware to build efficient system

On the software side these two books pretty good on covering issues related to system design:

I would suggest you have a look at this book,

ARM System-on-Chip Architecture

In embedded system domain, knowing ARM architecture is always helpful as its widely adopted in industry. This book touches on how you can design system using ARM IP cores, programming models etc.