SWARM - Software ARM
This is SWARM - SoftWare ARM. It is a modular simulation of an ARM 7 processor written in C++. It is cycle accurate, and models the datapath at the bus level. It is sufficiently complete that it will run microcontroller linux.
Note: For those of you looking for the multi-agent simulator for complex systems, called Swarm (note the capitalisation :-) you should be looking at www.swarm.org instead.
The initial stage in this process is implement a plain software model of the basic ARM. There are, of course, already software models of the ARM available, so why do another one? Well, this one will need to allow the instruction set to be modified at run time, and provide not just an execution environment, but also a way of monitoring things like cache hits.
To this end a hierarchical model of an ARM CPU has been implemented in C++. It currently supports:
The code has been written over the last two years by several contributers, mainly myself, with some major parts coming from Hanish Menon (UART and LCD Controller, debugger), and Matt Holgate (numerous bug fixes that let us run a simple task switching bootstrapper). Thanks to these guys SWARM now runs a version of uCLinux!
The current release of SWARM is 0.61. You can download it now: swarm-0.61.tar.gz . If you're just after the documentation then you want swarm-0.44.pdf (currently a little out of date, but not by much).
Important notice: SWARM is intended for use in simulating and experimenting with the ARM core in software, and should not be used to infringe on ARM Ltd's Intellectual Proptery Rights (IPR), such as using parts of it in a hardware implementation. Such an usage couple possibly infringe on ARM Ltd's IPR.
The change log can be found here. Announcements about the latest SWARM releases appear on freshmeat.net. The entry for SWARM can be found here. There is a project page for SWARM on advogato.org, which can be found here. A version of SWARM packaged for NetBSD is also available, but it appears to be a couple of versions out of date.
For help using SWARM, there is a development mailing list set up, called swarm-devel at g141.com. To subscribe send a blank mail to firstname.lastname@example.org.
For those of you that don't have easy access to an ARM compiler, then you should download test_apps_20010218.tar.gz. This contains the binaries for the examples distributed with SWARM. For information on how to build your own ARM binaries see Chris Rutter's page on Building the GNU toolchain for ARM targets.
To give you an example of how complete SWARM is, here's a couple of images. The one on the left is an original shot I took with my webcam. The one on the right has been run through a program which sharpens the image which was run on SWARM:
But, of course, running SWARM is not as fast as running on a native platform. The above test was carried out on a Alpha PC164 at 533 MHz. Natively the filter application runs in 0:00.01 elapsed time @ 5% CPU usage, but SWARM takes a little longer at 3:20.08 elapsed time @ 96% CPU usage (SWARM is compiled with Compaq C++ which produces a faster binary than gcc; in both cases the filter application was compiled using gcc).
Thanks go to ARM Ltd., for inviting me to visit, and for providing me with the ARM Architectural Reference Manual.
This site is Copyright 2003, 2004 Michael Dales Last modified on Thu Feb 20 20:54:13 GMT 2003