特殊:Badtitle/NS100:QuartusII:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/QuartusII}} {{Languages|UbuntuHelp:QuartusII}} <<Include(Tag/NeedsExpansion)>> == Introduction == This document provides information on installati... |
小无编辑摘要 |
||
第88行: | 第88行: | ||
https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_ubuntu.jpg | https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_ubuntu.jpg | ||
=== Create a service for jtagd === | === Create a service for jtagd === | ||
''jtagd'' should be run as a service to be able to work as a [http://en.wikipedia.org/wiki/JTAG JTAG] server. The correct way to do this is installing '' | ''jtagd'' should be run as a service to be able to work as a [http://en.wikipedia.org/wiki/JTAG JTAG] server. The correct way to do this is installing ''jtagd'' in the system run levels mechanism: | ||
<ol><li>Download ''jtagd'' init script from [[UbuntuHelp:attachment:jtagd|here]] | <ol><li>Download ''jtagd'' init script from [[UbuntuHelp:attachment:jtagd|here]] | ||
</li><li>Place the script in <code><nowiki>/etc/init.d/</nowiki></code> directory | </li><li>Place the script in <code><nowiki>/etc/init.d/</nowiki></code> directory |
2010年5月20日 (四) 00:00的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/QuartusII }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/af | • {{#if: UbuntuHelp:QuartusII|Afrikaans| [[::QuartusII/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ar | • {{#if: UbuntuHelp:QuartusII|العربية| [[::QuartusII/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/az | • {{#if: UbuntuHelp:QuartusII|azərbaycanca| [[::QuartusII/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/bcc | • {{#if: UbuntuHelp:QuartusII|جهلسری بلوچی| [[::QuartusII/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/bg | • {{#if: UbuntuHelp:QuartusII|български| [[::QuartusII/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/br | • {{#if: UbuntuHelp:QuartusII|brezhoneg| [[::QuartusII/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ca | • {{#if: UbuntuHelp:QuartusII|català| [[::QuartusII/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/cs | • {{#if: UbuntuHelp:QuartusII|čeština| [[::QuartusII/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/de | • {{#if: UbuntuHelp:QuartusII|Deutsch| [[::QuartusII/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/el | • {{#if: UbuntuHelp:QuartusII|Ελληνικά| [[::QuartusII/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/es | • {{#if: UbuntuHelp:QuartusII|español| [[::QuartusII/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/fa | • {{#if: UbuntuHelp:QuartusII|فارسی| [[::QuartusII/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/fi | • {{#if: UbuntuHelp:QuartusII|suomi| [[::QuartusII/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/fr | • {{#if: UbuntuHelp:QuartusII|français| [[::QuartusII/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/gu | • {{#if: UbuntuHelp:QuartusII|ગુજરાતી| [[::QuartusII/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/he | • {{#if: UbuntuHelp:QuartusII|עברית| [[::QuartusII/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/hu | • {{#if: UbuntuHelp:QuartusII|magyar| [[::QuartusII/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/id | • {{#if: UbuntuHelp:QuartusII|Bahasa Indonesia| [[::QuartusII/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/it | • {{#if: UbuntuHelp:QuartusII|italiano| [[::QuartusII/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ja | • {{#if: UbuntuHelp:QuartusII|日本語| [[::QuartusII/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ko | • {{#if: UbuntuHelp:QuartusII|한국어| [[::QuartusII/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ksh | • {{#if: UbuntuHelp:QuartusII|Ripoarisch| [[::QuartusII/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/mr | • {{#if: UbuntuHelp:QuartusII|मराठी| [[::QuartusII/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ms | • {{#if: UbuntuHelp:QuartusII|Bahasa Melayu| [[::QuartusII/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/nl | • {{#if: UbuntuHelp:QuartusII|Nederlands| [[::QuartusII/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/no | • {{#if: UbuntuHelp:QuartusII|norsk| [[::QuartusII/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/oc | • {{#if: UbuntuHelp:QuartusII|occitan| [[::QuartusII/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/pl | • {{#if: UbuntuHelp:QuartusII|polski| [[::QuartusII/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/pt | • {{#if: UbuntuHelp:QuartusII|português| [[::QuartusII/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ro | • {{#if: UbuntuHelp:QuartusII|română| [[::QuartusII/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/ru | • {{#if: UbuntuHelp:QuartusII|русский| [[::QuartusII/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/si | • {{#if: UbuntuHelp:QuartusII|සිංහල| [[::QuartusII/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/sq | • {{#if: UbuntuHelp:QuartusII|shqip| [[::QuartusII/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/sr | • {{#if: UbuntuHelp:QuartusII|српски / srpski| [[::QuartusII/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/sv | • {{#if: UbuntuHelp:QuartusII|svenska| [[::QuartusII/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/th | • {{#if: UbuntuHelp:QuartusII|ไทย| [[::QuartusII/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/tr | • {{#if: UbuntuHelp:QuartusII|Türkçe| [[::QuartusII/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/vi | • {{#if: UbuntuHelp:QuartusII|Tiếng Việt| [[::QuartusII/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/yue | • {{#if: UbuntuHelp:QuartusII|粵語| [[::QuartusII/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/zh | • {{#if: UbuntuHelp:QuartusII|中文| [[::QuartusII/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/zh-hans | • {{#if: UbuntuHelp:QuartusII|中文(简体)| [[::QuartusII/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:QuartusII | UbuntuHelp:QuartusII | {{#if: | :}}QuartusII}}/zh-hant | • {{#if: UbuntuHelp:QuartusII|中文(繁體)| [[::QuartusII/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:QuartusII|:QuartusII|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :QuartusII/zh | | {{#ifexist: QuartusII/zh | | {{#ifeq: {{#titleparts:QuartusII|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:QuartusII|1|-1|}} | zh | | }}
<<Include(Tag/NeedsExpansion)>>
Introduction
This document provides information on installation and setup of Quartus II v8.1 under Ubuntu 8.04 (Hardy Heron). At the end of this how-to you should be able to use Quartus II IDE both to design digital circuits and to load them in Altera devices using the following configuration:
- Windows guest on a Ubuntu 8.04 (Hardy Heron) host using virtualization via VirtualBox
- Quartus II v8.1 running on Windows guest
- Altera device connected to host computer
Although it is possible that the following instructions work under a different version of Ubuntu, it is very important to use the indicated version of Quartus II software, as it has been reported that previous releases have some problems during installation on Linux flavors that are different from the ones officially supported (Red Hat Linux Enterprise 4/5 (32/64 bit), SUSE Linux Enterprise 9 (32/64-bit) and CentOS 4/5 (32/64 bit)).
About Quartus II
At the time of writing this document, Altera provides Quartus II software in two different versions:
- Quartus II Web Edition - Free version available only for Windows
- Quartus II Subscription Edition - Free 30 day trial. After that period, subscription license is required. Available for Windows and Linux
Although Quartus II Subscription Edition needs a license in order to work, several command line tools that are provided as part of the installation can be used without the need of it. Two important commands of these tools that we will use are jtagd and jtagconfig. jtagd communicates with and loads compiled designs into Altera devices using JTAG standard in two different connection modes:
- Local mode - The Altera device is fisically connected to the computer in which jtagd is running
- Remote mode - The Altera device is fisically connected to a remote computer that acts as a server. Quartus II software running on the local computer communicates with the remote Altera device via the remote server
jtagconfig allows us to register and configure connection cables and Altera devices, and setup jtagd to act as a JTAG server
Setting up configuration
The following is a big picture of the steps that will be explained in the following sections:
- Install Quartus II Web Edition in the guest system to be able to create, compile and load designs into Altera devices
- Set up a JTAG server on host computer
- Install Quartus II Subscription Edition in the host machine to be able to use jtagd and jtagconfig
- Use jtagd and jtagconfig to setup a JTAG server
- Communicate the Quartus II Web Edition installed in the guest system with the JTAG server running on the host via virtual networking
- Test configuration by loading a compiled design into Altera device
Setting up Quartus II Web Edition 8.1 in the Windows guest
- Install VirtualBox (either normal or OSE version) on the host computer.
- Create a new virtual machine and install WindowsXP or Windows Vista on it (only this versions of Windows are supported by Quartus II software)
- Download Quartus II Web Edition Software v8.1 from Altera's site
- Install Quartus II Web Edition Software v8.1 in previously created Windows guest. No license file is required in this version of Quartus II software
You should now be able to run Quartus II on your Windows guest:
Setting up the JTAG server
Setup environment for Quartus II installation script
- Remove
csh
and installtcsh
on the host system
sudo apt-get remove csh tcsh sudo apt-get install tcsh
- Make sure that
/bin/sh
is pointing tobash
.
ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-11-06 11:53 /bin/sh -> bash
If it is not pointing to bash
, delete existing link and create a new one
sudo rm /bin/sh sudo ln -s bash /bin/sh
Install Quartus II Subscription Edition
- Download Quartus II Subscription Edition Software v8.1 for Linux from Altera's site
- Untar
81_quartus_linux.tar
in the the host computer, in a directory of your choice - Go to the directory where you untared the software and execute the installation script
./install
- Follow the instructions to complete the default installation. If you decide to do a custom installation, read
readme.txt
or the installation script help
./install --help
- If you are using USB Blaster to connect the Altera device to the host computer, you will need to enable usbfs, which is disabled by default on Ubuntu 8.04 (Hardy Heron). Follow this instructions to do so. If you want to enable USB access to your VirtualBox installation (currently not available for OSE version) follow the instructions as is. Otherwise, change the group vboxusers for a group you'd like to provide the access to usbfs.
Test your installation
Connect and turn on the Altera device to the host computer. Follow the instructions according to the connection cable you are using:
- USB Blaster - USB cable connection is automatically detected when connected to the host computer, so executing jtagconfig should list the available Altera devices currently connected
$ALTERA_HOME/quartus/bin/jtagconfig
1) USB-Blaster [USB 3-1.2] 020B40DD
- LPT cable - (instructions for LPT1 cable missing)
You should now be able to execute jtagd and jtagconfig, that should be found in $ALTERA_HOME/quartus/bin
. You will also be able to execute Quartus II IDE with free 30 day trial. In this version, binary compilation and design loading into Altera devices are disabled.
$ALTERA_HOME/quartus/bin/quartus
Create a service for jtagd
jtagd should be run as a service to be able to work as a JTAG server. The correct way to do this is installing jtagd in the system run levels mechanism:
- Download jtagd init script from here
- Place the script in
/etc/init.d/
directory - Create
/etc/rcn.d
symbolic links
sudo update-rc.d jtagd defaults
The defaults option will create links to start service in 2, 3, 4 and 5 run levels and links to stop service in 0, 1 and 6 run levels
- Create
/etc/jtagd
directory - Create an empty file called
/etc/jtagd/jtagd.conf
(needed to store jtagd configuration, which is managed by jtagconfig) - Create the following symbolic link
sudo ln -s $ALTERA_HOME/quartus/linux/pgm_parts.txt /etc/jtagd/
- Start jtagd service
sudo invoke-rc.d jtagd
If everything is going ok you'll be able to connect successfully with your Altera device as [[UbuntuHelp:[test your installation|before]]]
- Configure jtagd service to act as a JTAG server. A password is required for the server. This password should be used by JTAG clients that want to connect to this server.
sudo $ALTERA_HOME/quartus/bin/jtagconfig --enableremote <password>
If your setup was successful, you should have a jtagd process listening in port 1309
sudo lsof -i :1309
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME jtagd 5568 root 4u IPv4 14518 TCP *:1309 (LISTEN)
Create a virtual network between guest and host systems
In this section we will create a simple virtual network between guest virtual machine and host computer using VirtualBox's HIC Networking. In order to keep this how-to as simple as possible, the network will just allow communication between guest, host and other computers connected to the same network. No bridge configuration will be covered here. If you would like to setup a different type of virtual network, please refeer to VirtualBox|networking howto. Just make sure that the configuration you choose allows communication between guest and host systems (you should be able to ping the guest from the host and viceversa). In order to create the virtual network, we will provide two scripts to VirtualBox: onen will create and setup a temporal virtual network interface (so-called TAP interface), and the other one will shutdown and remove the created interface from the host system. The following hipothetic settings will be used to setup the virtual network configuration:
- Host computer
- Network id: 192.168.1.0/24
- Network DHCP range: 192.168.1.2-100
- Network default gateway: 192.168.1.1
- User running VirtualBox: vboxuser
- Guest Computer
- IP: 192.168.1.200 (static ip outside DHCP range to avoid conflicts)
- DNS server: Any DNS server
- Network default gateway: 192.168.1.1 (same value that host computer)
Setting up VirtualBox HIC Network
- Create the virtual interface setup script.
#!/bin/bash # Create a new TAP interface for the user 'vboxuser' and remember its name. interface=`VBoxTunctl -b -u vboxuser` # If for some reason the interface could not be created, return 1 to # tell this to VirtualBox. if [ -z "$interface" ]; then exit 1 fi # Write the name of the interface to the standard output. echo $interface # Bring up the interface. /sbin/ifconfig $interface up # Add information to kernel routing tables. route add -host 192.168.1.200 dev $interface
The script shown above creates and sets up a temporal TAP interface in the host system. It also adds routing information that allows the kernel to identify the created interface (using the IP 192.168.1.200). Save it in a location of your choice and make it executable.
- Create the virtual interface deletion script
#!/bin/bash # Bring down the interface. The second script parameter is # the interface name. /sbin/ifconfig $2 down # Remove information from kernel routing tables. route del -host 192.168.1.200 dev $2 # And use VBoxTunctl to remove the interface. VBoxTunctl -d $2
The script shown above tears down and removes the temporal TAP interface created by the script shown in the previous step. It also removes the routing information assigned to that interface. Save the script in a location of your choice and make it executable.
- Configure HCI networking in VirtualBox using the start up and teardown scripts
- On VirtualBox's main screen, select the Windows guest virtual machine
- Go to Machine->Settings->Network
- Select a the network adapter of your choice and enable networking on that adapter by clicking on the "Enable network Adapter" checkbox
- In the "Attached to" combo, select the "Host Interface" option
- In the "Host Interface Settings" section, insert
gksudo full_path_to_creation_script/creation_script_name.sh
in the Setup Application text field andgksudo full_path_to_deletion_script/deletion_script_name.sh
in the Terminate Application text field
- Press OK button
- Start Windows guest virtual machine
- Configure the network interface from windows to use 192.168.1.200 as static ip and 192.168.1.1 as default gateway
You should now be able to ping the host machine from the windows guest and viceversa
Test configuration
- Start jtagd if is not already running in the host
- Turn on and connect an Altera device to the host computer
- Start Windows guest and Quartus II software
- In Quartus II IDE, go to Tools->Programmer
- In the programmer window, go to "Hardware Setup" and select the "JTAG Settings" tab
- Insert the host computer's IP and the password you used when setting up the JTAG server. Press OK button
- You should see the host's IP and the name of the Altera device that is connected to the host computer
- Go back to "Hardware Settings" tab and select the Altera device from "Currently Selected Hardware" combo
- Close the "Hardware Setup" Dialog
Now you should be able to load a compiled digital circuit by using Quartus II programmer
External Links
Sites
- [1] - Altera's user community forum
- [2] - A Nios II development Wiki
- [3] - Public GIT server created to host open-source projects of soft-core FPGA processors
Forum threads and tutorials this document was based on
- [4] - Installation of Altera Complete Design Suite v8.0 for Linux under Ubuntu 8.04 (Hardy Heron)
- [5] - Installation of Quartus II 7.2 under Ubuntu 7.2 (Gutsy Gibbon)
- [6] - Virtualization and the USB ByteBlaster.
- [7] - Short tutorial about setting up jtagd
- [8] - Tutorial about setting up TCP/IP in Linux
- [9] - A long thread about setting up jtagd