XZPU - an XMOS based ZPU implementation

XCore Project reviews, ideas, videos and proposals.
User avatar
octal
XCore Addict
Posts: 228
Joined: Thu Jan 27, 2011 3:30 pm
Location: Argenteuil - France

XZPU - an XMOS based ZPU implementation

Post by octal »

First of all, thanks to Heater who contributed a lot and helped me a lot with his extremely constructive discussion about the subject, and for sharing codes and experience on implementation of the ZPU on Propeller microcontroller.

Feel free to give your opinion and discuss ideas about this project :)
Fisrt codes and implementation will be posted in incoming two or three days.

The ZPU is a small 32 bit, portable CPU core with a GCC toolchain and eCos RTOS support.
This project aim at providing an implementation of this portable CPU core on XMOS architecture.
Planed features are:
- the possibility to have code fetched from an external RAM/Flash.
- the possibility to have multiple zpu created and launched in parallel, with one zpu = one thread
- the possibility to have multiple zpu created and launched in parallel in different processors (nice for G4)
- extension of the ZPU RTL to let user create threads on an XMOS (by forking actual executing program ... or ...)
- extension the RTL to give access to ports, and (most important) to give the possibility to use any software component running on an XMOS (SPI, Eth, UART, ...) maybe by defining some kind of a hardware abstraction layer.
Users will be able to program this CPU with GCC (there exists already a port of GCC for this processor), whitch mean that you can already program it with C, C++, Fortran (yeah). Programs can have almost any size (provided necessary ram internal or EXTERNAL is available for the system).
More details about ZPU here :
http://opensource.zylin.com/zpu.htm
http://repo.or.cz/w/zpu.git?a=blob_plai ... ml;hb=HEAD
This soft processor will let users create re-programmable systems, AMINO like boards for example can load precompiled programs through ethernet and execute them locally without having to keep connection alive to an external system. This makes it possible to execute external building bricks completely written in C/C++ or Fortran (and compiled via GCC) of any size!
This processor implementationc can also be a very good starting point and a nice brick of the project "Microprocessor/Microcontroller educational kit" https://www.xcore.com/projects/micropro ... ducational...
Users and students can later still use it as an educational case of use to try to implement simple compilers for the ZPU machine :)


Heater
Respected Member
Posts: 296
Joined: Thu Dec 10, 2009 10:33 pm

Post by Heater »

Excellent. I have been meaning to start a ZPU on XMOS project myself for half a year or so. Life is very busy for me just now so it's great that Octal has the same idea.

We have had a ZPU virtual machine running on the Parallax Inc Propeller MCU for about a year now. It's great because you can run big slow application code from external memory using one of the Propellers cores for the VM whilst running the high speed real-time code on the other 7 cores.

This is an idea that will work even better on XMOS.

All we need now is a supply of XMOS boards with heaps of external SDRAM or SPI FLASH for the ZPU byte codes.
User avatar
octal
XCore Addict
Posts: 228
Joined: Thu Jan 27, 2011 3:30 pm
Location: Argenteuil - France

Post by octal »

Well, after a week of sickness, I'm again on the implementation of the XZPU.
I have finished first alpha that fetch code form internal XS1 ram and execute it.
To check all that, I wrote a PC/MAC application (C++/QT, works also under linux) that disassemble ZPU binaries and display them. I'm going to add communication routines to let me debug and step code inside any XZPU processor running in an XMOS.

I'll upload all codes right after having an alpha version able to upload a bin file to an XMOS running one or multiple instances of XZPU (each in a thread) and able to let user check and execute programs and step them :)


Litte screenshot ;)
You do not have the required permissions to view the files attached to this post.
User avatar
shashi
Member
Posts: 11
Joined: Fri Oct 29, 2010 4:31 pm

Post by shashi »

Sounds like a very nice project.

We are currently trying the ZPU on a Spartan 3E board (from http://papilio.cc ). Planning to add more counter/timer modules into the ZPU.

Waiting to get our hands on the xmos boards. Maybe a while though (govt purchase procedures...)

All the best for your project.
Shashi
User avatar
jonathan
Respected Member
Posts: 377
Joined: Thu Dec 10, 2009 6:07 pm

Post by jonathan »

Government purchase procedures? :shock:
:arrow: :arrow: :arrow:
XMOS - please just send them some free kit. :idea:
Image