AXE - An XCore Emulator

XCore Project reviews, ideas, videos and proposals.
Post Reply
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

AXE - An XCore Emulator

Post by richard »

I've just uploaded a fast XCore simulator I've been working on to github:

https://github.com/rlsosborne/tool_axe
AXE is designed for fast simulation of XCore programs. AXE doesn't attempt to be cycle accurate. Instruction execution timing is approximate. AXE is experimental and likely to contain bugs.
A single thread doing mainly arithmetic operations executes at the equivalent of over 100MIPs on my 2.3 GHz Core 2 Duo machine. Programs utilizing ports, chanends and threads will run, although this isn't particularly well tested.

Comments / suggestions / questions are welcome.


User avatar
Jamie
Experienced Member
Posts: 99
Joined: Mon Dec 14, 2009 1:01 pm
Contact:

Post by Jamie »

This looks really interesting - I've been using xsim heavily for development and testing so it would be great to be able to simulate execution faster. In particular, performance is hit dramatically with multi-node simulations. From looking over AXE it doesn't seem that this is supported yet but I'm just wondering what extra work would be necessary to get this working?

Also, it seems that execution begins at the beginning of memory and not at the label _start, is this right?
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

Jamie wrote:This looks really interesting - I've been using xsim heavily for development and testing so it would be great to be able to simulate execution faster. In particular, performance is hit dramatically with multi-node simulations. From looking over AXE it doesn't seem that this is supported yet but I'm just wondering what extra work would be necessary to get this working?
It already supports multiple nodes. What isn't supported is reading and writing sswitch / pswitch registers. On XS1-G the code produced by the mapper accesses a sswitch register to synchronise startup between the cores. Programs built for multinode XS1-L systems appear to work.
Also, it seems that execution begins at the beginning of memory and not at the label _start, is this right?
Yep at the moment execution always starts at the beginning of memory. This would be trivial to fix.

Feel free to create issues on the github repository for things that don't work as expected.
User avatar
Jamie
Experienced Member
Posts: 99
Joined: Mon Dec 14, 2009 1:01 pm
Contact:

Post by Jamie »

On XS1-G the code produced by the mapper accesses a sswitch register to synchronise startup between the cores. Programs built for multinode XS1-L systems appear to work.
Oh okay, how does synchronisation work for multi-node XS1-L systems then?
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

I thought it might be a good idea to provide an update on AXE's status. Since it was first made public I've added the following:

* JIT compilation based on LLVM. A single thread doing mainly arithmetic operations now executes at the equivalent of 575MIPs on a 2.3 GHz Core 2.
* Support for VCD tracing (--vcd)
* Support for a Boot ROM (--rom)
* UART RX peripheral (--uart-rx)
* SPI peripheral (--spi-flash). Currently only the READ command is supported (this is enough to simulate boot from SPI with --boot-spi).
* Ethernet PHY peripheral. Connects to TAP virtual network device on the Host (currently only supported on Linux / OS X).
* Added basic support for reading / writing SSwitch registers (enough to simulate booting multi-node XS1-L and XS1-G systems).
* Various bugfixes / improved correctness.

I haven't tried building it recently on Windows but it did at least build at one point in the past. If people are interested in trying it out (on whatever OS) but having problems building I can try and put together some binary packages.
richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

A first binary release of AXE (v0.1) is now available from:

https://github.com/rlsosborne/tool_axe/releases

There are binaries available for Windows, Linux (32bit/64bit) and OS X. Each archive contains a single executable file - simply unzip / untar this somewhere and add it to your path.

There's no documentation yet so I suggest running --help to get a list of options. To run an .xe file use:

Code: Select all

axe myapp.xe
Post Reply