1/1

|
ZPU
by AdamPierce on Feb 24, 2008 |
AdamPierce
Posts: 3 Joined: Aug 11, 2009 Last seen: Aug 4, 2011 |
||
|
Hi everyone, I'm new to this list. I'd like to talk about some
difficulties I'm having with the ZPU core, is this the right place ? -- __ __ _______ __/ \____________________________/ \__ _______ \_____ | \ o \ Adam Pierce / o / | _____/ \___ | \ o \________________________/ o / | ___/ \__|____\ o www.doctort.org/adam o /____|__/ \__\____________________________/__/ ~~~~~~~\____________/~~~~~~~ \______/ \/ |
|||
|
ZPU
by Unknown on Feb 27, 2008 |
Not available! | ||
|
Hi everyone, I'm new to this list. I'd like to talk about some
Here or http://mail.zylin.com/mailman/listinfo/zylin-zpu_zylin.com is fine.
--
Øyvind Harboe
http://www.zylin.com - eCos ARM & FPGA developer kit
difficulties I'm having with the ZPU core, is this the right place ? |
|||
|
ZPU
by AdamPierce on Feb 28, 2008 |
AdamPierce
Posts: 3 Joined: Aug 11, 2009 Last seen: Aug 4, 2011 |
||
|
I want to know if the ZPU instruction set is documented anywhere. I
--
__ __
_______ __/ \____________________________/ \__ _______
\_____ | \ o \ Adam Pierce / o / | _____/
\___ | \ o \________________________/ o / | ___/
\__|____\ o www.doctort.org/adam o /____|__/
\__\____________________________/__/
~~~~~~~\____________/~~~~~~~
\______/
\/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.opencores.org/forums.cgi/cores/attachments/20080228/e8653052/attachment.htm
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. Maybe this is an endian-ness issue but I can't tell. 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 /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 $ 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", Øyvind Harboe wrote:
Hi everyone, I'm new to this list. I'd like to talk about some
Here or http://mail.zylin.com/mailman/listinfo/zylin-zpu_zylin.com is fine.
difficulties I'm having with the ZPU core, is this the right place ? |
|||
|
ZPU
by AdamPierce on Mar 1, 2008 |
AdamPierce
Posts: 3 Joined: Aug 11, 2009 Last seen: Aug 4, 2011 |
||
|
I've got another step further, I noticed that the Java "MakeRam" utility
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.
My code unfortunately still doesn't run.
// zpuromgen.c
//
// Program to turn a binary file into a VHDL lookup table.
// by Adam Pierce
// 29-Feb-2008
//
// This software is free to use by anyone for any purpose.
//
#include
#include
typedef uint8_t BYTE;
main(int argc, char **argv)
{
BYTE opcode[4];
int fd;
int addr = 0;
ssize_t s;
// Check the user has given us an input file.
if(argc \n\n", argv[0]);
return 1;
}
// Open the input file.
fd = open(argv[1], 0);
if(fd == -1)
{
perror("File Open");
return 2;
}
while(1)
{
// Read 32 bits.
s = read(fd, opcode, 4);
if(s == -1)
{
perror("File read");
return 3;
}
if(s == 0)
break; // End of file.
// Output to STDOUT.
printf("%6d => x\"%02x%02x%02x%02x\",\n",
addr++, opcode[0], opcode[1],
opcode[2], opcode[3]);
}
close(fd);
return 0;
}
--
__ __
_______ __/ \____________________________/ \__ _______
\_____ | \ o \ Adam Pierce / o / | _____/
\___ | \ o \________________________/ o / | ___/
\__|____\ o www.doctort.org/adam o /____|__/
\__\____________________________/__/
~~~~~~~\____________/~~~~~~~
\______/
\/
|
|||
1/1

