个人工具
登录
查看“UbuntuHelp:QuartusII”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:QuartusII”的源代码
来自Ubuntu中文
←
UbuntuHelp:QuartusII
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/QuartusII}} {{Languages|UbuntuHelp:QuartusII}} <<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 [[UbuntuHelp:VirtualBox|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: <ol><li>Quartus II Web Edition - Free version available only for Windows </li><li>Quartus II Subscription Edition - Free 30 day trial. After that period, subscription license is required. Available for Windows and Linux</li></ol> 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 [http://en.wikipedia.org/wiki/JTAG 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 [http://en.wikipedia.org/wiki/JTAG JTAG] server == Setting up configuration == The following is a big picture of the steps that will be explained in the following sections: <ol><li>Install Quartus II Web Edition in the guest system to be able to create, compile and load designs into Altera devices </li><li>Set up a [http://en.wikipedia.org/wiki/JTAG JTAG] server on host computer <ol><li>Install Quartus II Subscription Edition in the host machine to be able to use ''jtagd'' and ''jtagconfig'' </li><li>Use ''jtagd'' and ''jtagconfig'' to setup a [http://en.wikipedia.org/wiki/JTAG JTAG] server </li></ol></li><li>Communicate the Quartus II Web Edition installed in the guest system with the [http://en.wikipedia.org/wiki/JTAG JTAG] server running on the host via virtual networking </li><li>Test configuration by loading a compiled design into Altera device</li></ol> === Setting up Quartus II Web Edition 8.1 in the Windows guest === <ol><li>Install [[UbuntuHelp:VirtualBox|VirtualBox]] (either normal or OSE version) on the host computer. </li><li>[[UbuntuHelp:VirtualBox#Creating_a_new_Virtual_Machine|Create a new virtual machine]] and install WindowsXP or Windows Vista on it (only this versions of Windows are supported by Quartus II software) </li><li>Download [https://www.altera.com/support/software/download/altera_design/quartus_we/dnl-quartus_we.jsp Quartus II Web Edition Software v8.1] from Altera's site </li><li>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</li></ol> You should now be able to run Quartus II on your Windows guest: https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_windows_virtualbox.jpg === Setting up the JTAG server === ==== Setup environment for Quartus II installation script ==== <ol><li>Remove <code><nowiki>csh</nowiki></code> and install <code><nowiki>tcsh</nowiki></code> on the host system</li></ol> <pre><nowiki> sudo apt-get remove csh tcsh sudo apt-get install tcsh </nowiki></pre> <ol><li>Make sure that <code><nowiki>/bin/sh</nowiki></code> is pointing to <code><nowiki>bash</nowiki></code>.</li></ol> <pre><nowiki> ls -l /bin/sh </nowiki></pre> <pre><nowiki> lrwxrwxrwx 1 root root 4 2008-11-06 11:53 /bin/sh -> bash </nowiki></pre> If it is not pointing to <code><nowiki>bash</nowiki></code>, delete existing link and create a new one <pre><nowiki> sudo rm /bin/sh sudo ln -s bash /bin/sh </nowiki></pre> ==== Install Quartus II Subscription Edition ==== <ol><li>Download [https://www.altera.com/support/software/download/altera_design/quartus_sub/dnl-quartus_sub.jsp Quartus II Subscription Edition Software v8.1] for Linux from Altera's site </li><li>Untar <code><nowiki>81_quartus_linux.tar</nowiki></code> in the the host computer, in a directory of your choice </li><li>Go to the directory where you untared the software and execute the installation script</li></ol> <pre><nowiki> ./install </nowiki></pre> <ol><li>Follow the instructions to complete the default installation. If you decide to do a custom installation, read <code><nowiki>readme.txt</nowiki></code> or the installation script help</li></ol> <pre><nowiki> ./install --help </nowiki></pre> <ol><li>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 [[UbuntuHelp:VirtualBox#USB|this]] instructions to do so. If you want to enable USB access to your [[UbuntuHelp:VirtualBox|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.</li></ol> ==== 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 <pre><nowiki> $ALTERA_HOME/quartus/bin/jtagconfig </nowiki></pre> <pre><nowiki> 1) USB-Blaster [USB 3-1.2] 020B40DD </nowiki></pre> * LPT cable - (instructions for LPT1 cable missing) You should now be able to execute ''jtagd'' and ''jtagconfig'', that should be found in <code><nowiki>$ALTERA_HOME/quartus/bin</nowiki></code>. 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. <pre><nowiki> $ALTERA_HOME/quartus/bin/quartus </nowiki></pre> https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_ubuntu.jpg === 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'' in the system run levels mechanism: <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>Create <code><nowiki>/etc/rcn.d</nowiki></code> symbolic links</li></ol> <pre><nowiki> sudo update-rc.d jtagd defaults </nowiki></pre> 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 <ol><li>Create <code><nowiki>/etc/jtagd</nowiki></code> directory </li><li>Create an empty file called <code><nowiki>/etc/jtagd/jtagd.conf</nowiki></code> (needed to store ''jtagd'' configuration, which is managed by ''jtagconfig'') </li><li>Create the following symbolic link</li></ol> <pre><nowiki> sudo ln -s $ALTERA_HOME/quartus/linux/pgm_parts.txt /etc/jtagd/ </nowiki></pre> <ol><li>Start ''jtagd'' service</li></ol> <pre><nowiki> sudo invoke-rc.d jtagd </nowiki></pre> If everything is going ok you'll be able to connect successfully with your Altera device as [[UbuntuHelp:[test your installation|before]]] <ol><li>Configure ''jtagd'' service to act as a [http://en.wikipedia.org/wiki/JTAG JTAG] server. A password is required for the server. This password should be used by [http://en.wikipedia.org/wiki/JTAG JTAG] clients that want to connect to this server.</li></ol> <pre><nowiki> sudo $ALTERA_HOME/quartus/bin/jtagconfig --enableremote <password> </nowiki></pre> If your setup was successful, you should have a ''jtagd'' process listening in port 1309 <pre><nowiki> sudo lsof -i :1309 </nowiki></pre> <pre><nowiki> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME jtagd 5568 root 4u IPv4 14518 TCP *:1309 (LISTEN) </nowiki></pre> === 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 [[UbuntuHelp:VirtualBox|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 [[UbuntuHelp:VirtualBox#Networking|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 [[UbuntuHelp:VirtualBox|VirtualBox]]: onen will create and setup a temporal ''virtual network interface'' (so-called [http://en.wikipedia.org/wiki/TUN/TAP 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 [[UbuntuHelp:VirtualBox|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 ==== <ol><li>Create the virtual interface setup script.</li></ol> <pre><nowiki> #!/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 </nowiki></pre> The script shown above creates and sets up a temporal [http://en.wikipedia.org/wiki/TUN/TAP 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. <ol><li>Create the virtual interface deletion script</li></ol> <pre><nowiki> #!/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 </nowiki></pre> The script shown above tears down and removes the temporal [http://en.wikipedia.org/wiki/TUN/TAP 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. <ol><li>Configure HCI networking in [[UbuntuHelp:VirtualBox|VirtualBox]] using the start up and teardown scripts <ol><li>On [[UbuntuHelp:VirtualBox|VirtualBox]]'s main screen, select the Windows guest virtual machine </li><li>Go to Machine->Settings->Network </li><li>Select a the network adapter of your choice and enable networking on that adapter by clicking on the "Enable network Adapter" checkbox </li><li>In the "Attached to" combo, select the "Host Interface" option </li><li>In the "Host Interface Settings" section, insert <code><nowiki>gksudo full_path_to_creation_script/creation_script_name.sh</nowiki></code> in the ''Setup Application'' text field and <code><nowiki>gksudo full_path_to_deletion_script/deletion_script_name.sh</nowiki></code> in the ''Terminate Application'' text field</li></ol> https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=virtualbox_network_config.jpg <ol><li>Press OK button </li><li>Start Windows guest virtual machine </li><li>Configure the network interface from windows to use 192.168.1.200 as static ip and 192.168.1.1 as default gateway</li></ol> You should now be able to ping the host machine from the windows guest and viceversa https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=windows_ping.jpg https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=ubuntu_ping.jpg == Test configuration == <ol><li>Start ''jtagd'' if is not already running in the host </li><li>Turn on and connect an Altera device to the host computer </li><li>Start Windows guest and Quartus II software </li><li>In Quartus II IDE, go to Tools->Programmer</li></ol> https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_windows_programmer.jpg <ol><li>In the programmer window, go to "Hardware Setup" and select the "JTAG Settings" tab </li><li>Insert the host computer's IP and the password you used when setting up the [http://en.wikipedia.org/wiki/JTAG JTAG] server. Press OK button </li><li>You should see the host's IP and the name of the Altera device that is connected to the host computer </li><li>Go back to "Hardware Settings" tab and select the Altera device from "Currently Selected Hardware" combo</li></ol> https://help.ubuntu.com/community/QuartusII?action=AttachFile&do=get&target=quartus_remote_jtag.jpg <ol><li>Close the "Hardware Setup" Dialog</li></ol> Now you should be able to load a compiled digital circuit by using Quartus II programmer == External Links == ==== Sites ==== * [http://www.alteraforum.com] - Altera's user community forum * [http://nioswiki.jot.com] - A Nios II development Wiki * [http://sopc.et.ntust.edu.tw/] - Public GIT server created to host open-source projects of soft-core FPGA processors ==== Forum threads and tutorials this document was based on ==== * [http://www.alteraforum.com/forum/showthread.php?t=2824] - Installation of ''Altera Complete Design Suite v8.0 for Linux'' under ''Ubuntu 8.04 (Hardy Heron)'' * [http://www.alteraforum.com/forum/showthread.php?t=1724] - Installation of ''Quartus II 7.2'' under ''Ubuntu 7.2 (Gutsy Gibbon)'' * [http://www.alteraforum.com/forum/showthread.php?t=3823&highlight=jtagd] - Virtualization and the USB ByteBlaster. * [http://nioswiki.jot.com/WikiHome/JtagStandalone] - Short tutorial about setting up jtagd * [http://www.informit.com/articles/article.aspx?p=25845] - Tutorial about setting up TCP/IP in Linux * [http://sopc.et.ntust.edu.tw/pipermail/nios2-dev/2008-August/001709.html] - A long thread about setting up jtagd ---- [[category:CategoryHardware]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:QuartusII
。