p1spin
Dave Hein
Posts: 6,347
p1spin is a program that runs P1 Spin binary files on a P2. The P1 binary file is included at the end of p1spin.spin using a FILE statement. p1spin maps port A from P1 to port C in P2. The serial pins 91 and 90 should be referenced at pins 27 and 26, since that is their bit positions within Port C. p1spin has been tested on the DE2 FPGA board, and under spinsim.
A sample P1 program is included that runs a Spin version of the Dhrystone 1.1 benchmark. The top object is test.spin, which uses dry11.spin and Simple_Serial.spin. Simple_Serial is identical to the one in the OBEX, except that variables are stored in a DAT section instead of VAR. The baud rate is set for 19200, but I have run it up to 57600. The binary file, test.binary is included at the end of p1spin.spin.
A sample P1 program is included that runs a Spin version of the Dhrystone 1.1 benchmark. The top object is test.spin, which uses dry11.spin and Simple_Serial.spin. Simple_Serial is identical to the one in the OBEX, except that variables are stored in a DAT section instead of VAR. The baud rate is set for 19200, but I have run it up to 57600. The binary file, test.binary is included at the end of p1spin.spin.
zip
28K
Comments
Nice work !!!
The Dhrystone benchmarks runs about 3.8 times faster in p1spin on a P2 than it does on a P1. I haven't attempted to align with hub slots or use delayed jumps so there's some room for improvement. However, the nature of the p1spin code makes it difficult to take advantage of these features.
I agree - well done, Dave.
Dream on!
Ross.
BTW, I included the file spasm.txt in the zip file, which is the man page for the spinix spasm bytecode assembler. This provides some information on the bytecode names that I used in p1spin.