Monday, August 12, 2013

Demo System Revealed

Here, I am introducing a tangible demo of register-less multiprocessor system.

This demo system is a register-less multiprocessor with 16 cores installed on a commercial FPGA board DE0-Nano enabling the download and execution of programs by host PC.

The main contents of this demonstration are VGA ouput with on-board SDRAM as framebuffer and scrolling the viewing area by accelerometer.  Thanks to no disarray in instruction execution timing due to accessing cache memory, register-less multiprocessor system benefits users with capability of device control with rigorous timing directly via software.  Here, making the best of this capability, the demo system leaves almost all complicated control on SDRAM to software applications.

To run the demo system, it requires just downloading and executing a Jar file (relm_demo.jar) on host PC connected to DE0-Nano board.  However, Java Runtime Environment (JRE) and USB-Blaster driver need to be installed beforehand.  There would be no problem in an environment where demo programs supplied with DE0-Nano work well.

Hopefully the idea was to offer a demonstration viable with DE0-Nano board alone.
But it is almost impossible to develop a useful application only with LED on the board, and so I decided to add a simple VGA output circuit consisting of just 5 resistors.
Even such a bit output circuit, while being incapable of halftone display like VGA output of DE0 board enables, still offers much more than LED could express.

vga_circuit.pngIMG_3378.JPG

In the above picture, a piezoelectric sounder is installed in the empty area of the board but is not used in this demonstration.  You can leave this sounder out, if you don’t need sound or worry about piezoelectric element destroying the FPGA board.

Execution of “relm_demo.jar” invokes downloading a JRuby Jar file through the internet when JRuby execution environment is not loaded yet.  The downloaded “jruby-complete.jar” is stored in the same folder of “relm_demo.jar” and eliminates the need for downloading it again.

jrubyloader.png

Upon the completion of downloading JRuby execution environment, the demo system starts running.

relm_demo.png

Connect host PC to DE0-Nano and then click “Config FPGA” to execute the configuration of the multiprocessor circuit.  Right after configuration, a program loader is executed as one of 16 threads, while all the other threads are halted.  The program loader rewrites main memory and SDRAM along with data sent via JTAG from host PC.  This way enables rewriting and launching software applications without reconfiguration.

Then execute the demo program once configuration is completed.  Firstly, let’s try a demonstration viable with DE0-Nano board alone.  Select the tab of “led.rb” and click “Run Program” to start once a Ruby program appears in the editor, and then LED on DE0-Nano board starts flashing.  As you see here, the demo program is described as Ruby codes, and so is forwarded to and executed on FPGA in the demo environment.

However, because this demo system makes up only a assembly-language-like domain-specific language based on Ruby, users are to create software applications by relatively low-level program description.  Unfortunately, it doesn’t enable executing common Ruby codes on FPGA.

Then next, let’s go on to a higher-level demonstration with the attached VGA output circuit.  Click “Config FPGA,” then select the tab of “vga.rb” after finishing configuration and do “Run Program” to start.  Connect the output of the VGA circuit to a display you have, and you are supposed to see random patterns of SDRAM initial state on the screen.  In the photo below, the left display is for host PC and the right one is for VGA output of FPGA board.

IMG_3379.JPG

In this condition, click “Send Image URL…” to input the URL of an image of Mt.Fuji used in a Wikipedia article (http://upload.wikimedia.org/wikipedia/ja/3/3e/MtFuji_FujiCity.jpg) as an example — you can copy and paste the string of URL by Ctrl+V.

Though forwarding data takes a while, you will see the image of Mt.Fuji on the screen for VGA output.
The picture appears as an image dithered by error diffusion method based on an original algorithm to deal with VGA output incapable of halftone display.  In an environment off the internet, you can forward an image in a local file by clicking “Send Image File…”

IMG_3380.JPG

With the image active on the screen, select “gsensor.rb” and click “Run Program,” and you can scroll the whole image along with the tilt of DE0-Nano board.