Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARM Simulator on Windows

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

like image 384
Betamoo Avatar asked Jun 01 '10 20:06

Betamoo


People also ask

Does Windows have an Arm version?

Windows on Arm runs native Arm apps, as well as many unmodified x86 & x64 apps, but for the best performance and battery life, apps should be built to be Arm-native wherever possible. Windows apps can be built using many different tools and technologies, including native C/C++ Win32 apps, classic .

Can x64 emulate Arm?

Arm64EC (“Emulation Compatible”) enables you to build new native apps or incrementally transition existing x64 apps to take advantage of the native speed and performance possible with Arm-powered devices, including better power consumption, battery life, and accelerated AI & ML workloads.

Will Windows 11 have an Arm version?

With Windows 11, 64-bit app-emulation was now included in Windows 11 right out of the box. Through the Windows Insider program, Microsoft has optimized plenty more of its apps for ARM, including the Edge web browser, Microsoft Teams, Visual Studio, and the popular tool PowerToys — all run natively without emulation.

Can x86 emulate Arm?

The WOW64 layer of Windows allows x86 code to run on the Arm64 version of Windows. x86 emulation works by compiling blocks of x86 instructions into Arm64 instructions with optimizations to improve performance.


2 Answers

QEMU

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

like image 90
Doug Currie Avatar answered Oct 13 '22 14:10

Doug Currie


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.

like image 25
old_timer Avatar answered Oct 13 '22 14:10

old_timer