1/1

|
Re: ZPU (Adam Pierce)
by Unknown on Mar 6, 2008 |
Not available! | ||
|
I get these email digests from this mailing lists a *LONG* time after
the post.... how often are digest emails sent out?
anway...
I listen more closely to this mailing list. I've answered a number of
emails privately in email, but I'm considering only replying
to emails at the zylin-zpu mailing list...
http://mail.zylin.com/mailman/listinfo/zylin-zpu_zylin.com
I want to know if the ZPU instruction set is documented anywhere.
There are only 11 instructions :-) and there is some documentation
here:
http://www.opencores.org/cvsweb.shtml/zpu/zpu/docs/zpuprotoarch.odt
- addsp is missing
- pushpc is emulated (or implement in hw as the case may be)
Patches welcome!
I
managed to synthesize the core and have compiled a very simple test program but I cannot get it to run. If I understood a little more about what the opcodes did, I could figure out what I am doing wrong. You can enable trace output, which shows what instructions are executed. I've recently checked in some fixes to hdl/examples. The ZPU really does work, but what I committed to opencores was not precisely the same as what i worked on, so some of the examples and modelsim demos, etc. stopped working. I had to leave a few things out to fit the open source license.
Maybe
this is an endian-ness issue but I can't tell. It's a big-endian architecture as far as I recall. Here is my simple example. I am running Cygwin on Windows XP. $ cat looptest.c // Dead simple test program main() { while(1) ; } $ zpu-elf-gcc -o looptest.elf looptest.c -nostartfiles -nostartfiles leaves out the microcode! :-)
/home/Adam/zpu/bin/../lib/gcc/zpu-elf/3.4.2/../../../../zpu-elf/bin/ld: warning:
cannot find entry symbol _start; defaulting to 00000000 $ zpu-elf-objcopy -O binary looptest.elf looptest.bin To show disassembly: zpu-elf-objdump --disassemble looptest.elf To show all sections, including microcode: zpu-elf-objdump --disassemble-all looptest.elf
$ hexdump looptest.bin
0000000 088c 8c02 0b0c 0b0b fb0b 0039 000000b $ java -classpath zpu/simulator/zpusim.jar com.zylin.zpu.simulator.tools.MakeRam looptest.bin 0 => x"8c08028c", 1 => x"0c0b0b0b", Answering second email from digest...
I've got another step further, I noticed that the Java "MakeRam" utility
Thanks! Committed:
2008-03-06 Adam Pierce
* zpu/zpu/hdl/example/zpuromgen.c - generate rom files
without java
--
Øyvind Harboe
http://www.zylin.com - eCos ARM & FPGA developer kit
tends to leave a few bytes off the end. I'm not much of a Java person so I re-wrote it in C. Here it is. You could include it in the ZPU CVS if you think it useful. |
|||
1/1

