• R/O
  • SSH
  • HTTPS

puzzlebox: Source Tree


Name Size Rev. Time Author Log Message
trunk r62 2009-05-05 00:06:51 ohsawa GC bugs are fixed that PuzzleBox GC m...

README

PuzzleBox alpha: Graph Reduction Machine for LazyK

1. Run a sample program on the PuzzleBox Virtual Machine
1.1 Install requred packages
To execute PuzzleBox Virtual machine, following packages are required.

	SystemC 2.2
	Verilator 3.700
	CMUCL 19a

1.2 Compile PuzzleBox Virtual Machine

	% cd vm
	% (edit Makefile as you like :-)
	% make

1.3 Comple a sample LazyK code to a SKI combinator file

	% ../compiler/compile.sh ../src/sample/fact.l fact.lz

1.4 Execute PuzzleBox Virtual Machine with a compiled source.

	% echo "" | ./lazy fact.lz

Finally, the number "6" will be output as the result of (fact 3).

Another example,

	% ../compiler/compile.sh ../src/sample/add7.l add7.lz
	% ./lazy add7.lz

reqires input data from 0 to 255 separated by space or newline,
and EOF (Ctrl-D) indicates the end-of-input-data.
These outputs are the list of numbers that are the result of +7.







2. Run a sample program on the PuzzleBox implemented on the FPGA
2.1 Prepareing execution environments
To execute PuzzleBox on the FPGA, following software and hardware are required.

	Linux PC with RS-232C serial port for controlling PuzzleBox
	Nios II Embedded Evaluation Kit(NEEK), Cyclone III Edition
	QuartusII 8.1 (on windows machine)

On the Linux PC, serial port /dev/ttyS? (i.e. /dev/ttyS0) must be accessable and
the port must be connected to NEEK via an RS-232C cable.


2.2 Compile PuzzleBox FPGA Design to configure FPGA
On the Windows PC,

	(Install the USB-Blaster Driver in QuartusII)
	(Connect the Windows PC to the NEEK using a USB cable for configuration)
	% cd syn\altera
	% compile.bat
	% compile.bat program

2.3 Compile Program Loader for PuzzleBox on the FPGA

	% cd loader
	% (edit SERIALPORT in Makefile)
	% make

2.4 Comple a sample LazyK code to a SKI combinator file

	% ../compiler/compile.sh ../src/sample/fact.l fact.lz

2.5 Execute PuzzleBox on the FPGA with a compiled source.

	(Connect the Linux PC to the NEEK using a RS-232C cable for execution)
	% echo "" | ./zload fact.lz

Finally, the number "6" will be output as the result of (fact 3).

Another example,

	% ../compiler/compile.sh ../src/sample/add7.l add7.lz
	% ./zload add7.lz

reqires input data from 0 to 255 separated by space or newline,
and EOF (Ctrl-D) indicates the end-of-input-data.
These outputs are the list of numbers that are the result of +7.

Show on old repository browser