views:

386

answers:

3

I am studying ARM Processors from a textbook...

I thought it will be more useful if I could apply what I learn on an ARM simulator... writing code then watching results and different execution stages would be more fun...

I have searched for it, but all I could find was either a freeware on linux or a demo on windows

Is there a simulator that allow me to see execution steps and different changes for ARM processor (any version!) that runs on windows??

Thanks

+2  A: 

QEMU

Perhaps you were referring to the experimental binary installer for Windows. For source installation on Windows, see this documentation.

Doug Currie
Is there another one with better UI?
Betamoo
+2  A: 

Qemu supports Windows and is a first class emulator for ARM. Of course, the exact pipeline states are not available, but the programmer's view of the emulation is available.

Yann Ramin
+2  A: 

I have a thumb emulator that should compile anywhere, windows, linux, mac, whatever. thumbulator.blogspot.com. Add a few printfs wherever you want to see something and you are golden. ARMs emulator the armulator, is available in source form in many places, in the gdb sources for example. qemu works great but is going to be hard to "see your code". the best would be to have an hdl source (verilog for example) for an arm core and create vcd files or other waveform formats. Unless you work for a chip company with an embedded arm though you probably are not going to find one. I could be wrong but I think all the open arm cores out there are quickly taken down by ARM.

mame has an arm core or two. visual boy advance has an arm core. the nds emulators have arm cores.

Or you can do what I did with the thumbulator and write your own, I found it easier than trying to get one of the others to show me what I wanted to see. Of course I was lazy and only did a thumb instruction set emulator instead of a full arm emulator. It is not difficult at all just time consuming.

EDIT

Okay I stand corrected. google the words arm verilog. isc.tgz contains a behavioral model model of an arm which compiles and runs just fine with icarus verilog (free).

Comment out all the $save_store(); lines (just like C use a //).

Add a few lines of code to testarm.v (after the arm10 and before the initial begin for example).

initial begin $dumpfile("test.vcd"); $dumpvars(0,arm10); end

always #50000 $finish;

then

iverilog -o hello testarm.v arm10.v

vvp hello

and it will run 50000 units of time, finish the sim and close out the vcd file. To make the sim longer or shorter change the always #50000 line.

Get a copy of gtkwave (free) to view the vcd file. Using gtkwave is a whole other post, you will want to do something like click on the + sign next to test_arm, then click on the arm10 that is there, under signals click on say addr_bus to highlight the line then click on the append box, click on data_bus and click on the append button, maybe add some registers, r1, r2, etc. There is a tool bar but you can also use the menu time->zoom->zoom full which is ALT-F on my install. then you get to learn how to zoom in and out on things.

Speaking from personal experience, you wont "see your code" run any better than using an hdl simulator. Actually once you get used to this you may have a hard time running on silicon where you pretty much cannot see anything.

I have not done more than run the test program that was included with that behavioral model. dont know what you can or cant do with it.

A verilog $readmemh is pretty simple it just wants to read lines of hex into whatever memory specified. So you can easily make a tool that takes your compiled arm code and creates the ascii file that the verilog simulation wants.

dwelch
Note a behavioral model (HDL) is not a synthesizable model meaning you cannot make a chip from it, nothing ARM has to worry about being out there in the open.
dwelch