labs.beatcraft.com
DE0-Nano
Synthesijer

DE0-Nano/Synthesijer

Sythesijer is the successor of JavaRock, a high-level synthesis tool that is able to generate VHDL and Verilog HDL code from Java code.
This article explains how to execute a sample program of Synthesijer on DE0-Nano.

This article uses synthesijer-20140818.jar and synthesijer_sample-20140818. However, the newer version of Synthesijer, and
its sample are also available at this page. Please download them.

The outline and some part (the version of Quartus) of this article are identical to DE0-Nano/JavaRock.
The outline of this articles are:

  • About host PC
    Working on a virtual machine (Ubuntu 12.04LTS, 64bit version) on Windows PC.
    (This article does NOT explain how to install a Linux virtual machine, Ubuntu 12.04LTS, on a PC.)

  • Configuring Ubuntu and editing files
    Install the development tools on Ubuntu, and edit the files for working with DE0-Nano.

  • Writing down to DE0-Nano
    Explain how to execute a sample of Synthesijer on DE0-Nano.

About Host PC

The details of the host PC for this article are shown below. Most work is done in Ubuntu 12.04 LTS (64bit)

OS:

  • Host OS: Windows7 (64bit version, hereafter “Windows”)
  • Guest OS: Ubuntu 12.04 LTS (64bit version, hereafter “Ubuntu”)

Applications:

  • VMware Player (Windows)
  • DE0-Nano System Builder (Windows)
  • Quartus II 12.0 sp1 (Ubuntu, hereafter “Quartus”)

Create an Ubuntu image on VMware Player. The desk size of image is 20GB.

DE0-Nano System Builder, which is provided by Terasic Technologies, Inc, manages the project files (qpf)
and configuration file for pin-assignment (qsf). This application can be executed from only Windows.

Quartus is a FPGA and CPLD design and development tool, which can be downloaded from the site of Altera Corporation.
(The download page is here.) This is installed on Ubuntu. The version of Quartus, which is used for this article is 12.0 sp1.
The newer versions of this application are available at its download site. However, Quartus 12.0 sp1 is used in the article of
[[DE0-Nano/JavaRock>]], this article uses the same version of the application.

Configuring Ubuntu and Editing Files

This part of this article explains how to configure Ubuntu and to edit the files for the configurations.

Install the development tool

To install Quartus on Ubuntu, install the development tools, first.

$ sudo apt-get install build-essential ia32-libs

la32-lib is installed because each binary of Quartus is written in 32bit.

Setting and installing Java SE, Synthesijer, and Quartus are done at the directory of /home/beat. However, you may change to
any directory as you like to work.

Install Java SE 7u67 for working with Synthesijer. Download Linux version of Java SE 7u67 from the web page of Oracle.
Then, extract the archive.

$ tar xvfz jdk-7u67-linux-x64.tar.gz

Caution:
According to the web page of Synthesijer, Java SE should be Java SE 7 or greater. However, as you use Java SE 8
with synthesijer-20140818.jar, an annotation error will occur. This is why this article uses Java SE 7u67.

Download synthesijar-20140818.jar and synthesijar_samples-20140818.zip form http://synthesijer.sourceforge.net/

Unzip synthesijer_samples-20140818.zip

$ unzip synthesijer_samples-20140818.zip

Install Quartus. Expand the archive and execute setup. Then, follow the instructions of GUI to proceed the installation process.

$ tar xvfz 12.0sp1_232_quartus_free_linux.tar.gz
$ cd 12.0sp1_232_quartus_free_linux/
$ ./setup

If start up Quartus, show up the error message , which is shown below. To avoid this error to occur, set up the symbolic link from /altera/12.0/quartus/ to linux64

$ cd ~/altera/12.0sp1/quartus/
$ ln -s linux linux64

The error message

*** The Quartus II software cannot be started because the current platform,
    'linux64', does not appear to be installed in:
    '/home/beat/altera/12.0sp1/quartus'.

/home/beat/altera/12.0sp1/quartus/bin/jtagd: 69: exit: Illegal number: -1

Edit .bashrc

To let working environment easier, set up the PATH of Java, Synthesijer, and Quartus.
Please add three lines shown below at the end of .bashrc.

$ vi .bashrc

export JAVA_HOME=/home/beat/jdk1.7.0_67
export PATH=$JAVA_HOME/bin:/home/beat/altera/12.0sp1/quartus/bin:$PATH
export SYNTHESIJER=/home/beat/synthesijer-20140818.jar

Add and apply the rules of udev

To transfer a program to DE0-Nano from Ubuntu by USB connection, the USB-Blaster is used. To make Ubuntu recognize the USB-Blaster,
add the rule file for the USB-Blaster (51-usbblaster.rules) to the rule file for udev (automatically create and delete device file, /etc/udev/rule.d).

After adding the rule file, restart udev. Just adding the file, the change will not be effective.

$ sudo vi /etc/udev/rules.d/51-usbblaster.rules

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", SYMLINK+


$ sudo udevadm control --reload-rules

Revision History

  • 2014/12/24 This article is initially uploaded

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2014-12-24 (Wed) 10:08:09 (3414d)