ARM Simulator on Windows

18,838

Solution 1

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.

Solution 2

QEMU

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

Solution 3

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.

Solution 4

It has been a long while since this question. Still thought it would be good to write an answer for those who are familiar with C. This is a small C application that emulates some/following ARM assembly instructions, where you can add debug or print results at points to check the execution stages.

  1. Pipeline: Size 4
  2. Reserves memory locations for; Interrupt instructions and user instructions.
  3. Counts the cycles for each instruction and total cycles.
  4. Data processing instructions: Sets the overflow and carry flags.
  5. Branch instructions: Uses stack to store the link data if need.
  6. Data transfer instructions.
  7. Interrupts instructions: Executes the interrupt instruction in the input instructions set or accepts hardware instruction before fetching a new instruction.
  8. Prints out the registers, user accessible memory, stack memory and the status flags. “debugEnabled” and “instructionLogEnabled” variables can be switched on for farther information in the output.

Source code is available here: http://www.omidmufeed.com/arm-assembler-emulator-with-c/

Solution 5

ARMSIM

ARMSim# is a desktop application running in a Windows environment. It allows users to simulate the execution of ARM assembly language programs on a system based on the ARM7TDMI processor.

From me: it's a simulator and is processor-specific, that is, running ARM Linux under QEMU, as others suggested, is a better option when testing real-life solutions. The next step is bare ARM metal, which in 2015 is cheaply achievable with Raspberry PI.

Share:
18,838

Related videos on Youtube

Betamoo
Author by

Betamoo

I love Algorithms, Programming, AI and machine learning In my spare time, I like playing real time strategy games, chess, watching movies.

Updated on April 23, 2022

Comments

  • Betamoo
    Betamoo about 2 years

    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

  • Betamoo
    Betamoo about 14 years
    Is there another one with better UI?
  • old_timer
    old_timer about 14 years
    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.