Quartus (简体中文)

From ArchWiki

Jump to: navigation, search


i18n
English
简体中文


Contents

Quartus什么

Quartus是[altera]公司推出的,针对Altera公司的可编程器件设计套件。可针对Altera全系列产品综合、适配、仿真、下载。 当前最新版本是9.0SP1,适用于Windows、Linux、SunOS等平台。针对Windows平台有免费的网络版,针对所有平台有可免费适用一个月的订购版。具体可参考其官方网站!

下载安装

Quartus II 可以从Altera官方网站下载,下载地址: [[1]]

  • 准备一个空闲空间大于7G的空间,用于下载和解压Quartus:
$mkdir ~/quartus
  • 下载Quartus II 9.0 For Linux
$wget ftp://ftp.altera.com/outgoing/release/90_quartus_linux.tar

这里会下载很长很长很长一段时间,想一想普通的ADSL上线300K Vs 3000MB,所以这个时候你可以出去吃饭了,吃完回来差不多该下载完了。

  • 依赖关系,Quartus使用的是tcsh,所以需要先安装tcsh
#pacman -S tcsh
  • 安装
$cd ~/quartus
#./install
  • 注意这里安装需要用root权限,安装过程很简单,需要回答三个问题:
  1. 安装位置,默认是/opt/altera9.0/
  2. 器件仿真库选择,默认是全部库,你可以选择其中一个或者几个,比如cycii cyciii代表选择cyclone II和cyclone III
  3. 阅读授权文件

到这里,就安装完成了,但是这时还不能立即使用。必须作下一步的处理,如果不处理,就会出现[莫名其妙的错误]

安装后的处理

  • 首先,去掉/etc/issue中为inputrc设置的特殊字符(用于agent启动的自动清屏的):
echo "Arch Linux  \r  (\n) (\l)" > /etc/issue
  • 然后,检查一下你的主机名是否已经添加到/etc/hosts了,如果没有一定要加上
echo "127.0.0.1 myhost.localdomain myhost" >> /etc/hosts

用你自己的IP地址和主机名替换掉上面的127.0.0.1和myhost

常见问题

Current module quartus_map ended unexpectedly

出现这个问题,主要是因为没有去掉/etc/issue里的inputrc的特殊字符,造成quartus在读取Linux版本的时候出错。去掉这些字符即可。

PS:这个问题困扰我很久(差不多3个礼拜),后来慢慢才发现问题的所在,这里说一下这个过程。 首先我按部就班的安装好,然后运行quartus,图形界面打开后,我就随便写了一个HDL源文件,然后综合适配,结果就出现了这个错误提示。分析不出来,只能Google,结果基本上没有什么有用的信息。然后就尝试用命令行直接运行quartus_map,结果出现如下提示:

Info: *******************************************************************
Info: Running Quartus II Analysis & Synthesis
   Info: Version 9.0 Build 132 02/25/2009 SJ Full Version
   Info: Copyright (C) 1991-2009 Altera Corporation. All rights reserved.
   Info: Your use of Altera Corporation's design tools, logic functions 
   Info: and other software and tools, and its AMPP partner logic 
   Info: functions, and any output files from any of the foregoing 
   Info: (including device programming or simulation files), and any 
   Info: associated documentation or information are expressly subject 
   Info: to the terms and conditions of the Altera Program License 
   Info: Subscription Agreement, Altera MegaCore Function License 
   Info: Agreement, or other applicable license agreement, including, 
   Info: without limitation, that your use is for the sole purpose of 
   Info: programming logic devices manufactured by Altera and sold by 
   Info: Altera or its authorized distributors.  Please refer to the 
   Info: applicable agreement for further details.
   Info: Processing started: Sun May 31 14:20:31 2009
Info: Command: quartus_map /tmp/test/test.v
Warning: Using design file test.v, which is not specified as a design file for the current project, but contains definitions for 1 design units and 1 entities in project
   Info: Found entity 1: test
Info: Elaborating entity "test" for the top level hierarchy

*** Fatal Error: Unhandled exception
0x7385    : ERR_STACKWALKER::get_stack_trace(void const**, int, int, void*) + 0xAD (ccl_err)
0x9E22    : err_terminator() + 0x60 (ccl_err)
0x17A0E   : std::terminate() + 0x1E (dinkum_alt) 

0x2A6F3   : _Dinkum_std::_String_base::_Xran() const + 0x1A3 (dinkum_alt)
0x1573C   : GEN_MACHINE_INFO::get_os_name(_Dinkum_std::basic_string<char, _Dinkum_std::char_traits<char>, MEM_STL_ALLOCATOR<char> >*) + 0x60C (ccl_gen)
0x26D50   : qcu_report_operating_system(QCU_FRAMEWORK*) + 0x43C (comp_qcu)
0x58DA9   : qcu_add_common_panels(QCU_FRAMEWORK*, ACF_FILE_CATEGORY_ENUM*, ACF::REPORT_TYPES::TYPE*, bool, bool) + 0xD5 (comp_qcu)
0x2AA2C   : QSYN_FRAMEWORK::write_reports(bool, char const*) + 0xEC (quartus_map)
0xB42D    : qexe_do_normal(QEXE_FRAMEWORK*, char const*) + 0x5A9 (comp_qexe)
0x16FA6   : qexe_standard_main(QEXE_FRAMEWORK*, QEXE_OPTION_DEFINITION const**, int, char const**) + 0x330 (comp_qexe)
0x1EB31   : qsyn_main(int, char const**) + 0x71 (quartus_map)
0x1C1D6   : msg_main_thread(void*) + 0x16 (ccl_msg)
0x4CD8    : thr_final_wrapper + 0xE (ccl_thr)
0x1DB02   : msg_thread_wrapper(void* (*)(void*), void*) + 0x72 (ccl_msg)
0x53E12   : mem_thread_wrapper(void* (*)(void*), void*) + 0xD2 (quartus_map)
0x61C7    : err_thread_wrapper(void* (*)(void*), void*) + 0x29 (ccl_err)
0x4D05    : thr_thread_wrapper + 0x29 (ccl_thr)
0x2F9D6   : msg_exe_main(int, char const**, int (*)(int, char const**)) + 0x9E (ccl_msg)
0x11CEF   : main + 0x4F (quartus_map)
0x16396   : __libc_start_main + 0xE6 (c.so.6)

Exiting...

猛一看就吓住了,但是慢慢读还是有线索的,看上面有一行:

0x1573C   : GEN_MACHINE_INFO::get_os_name(_Dinkum_std::basic_string<char, _Dinkum_std::char_traits<char>, MEM_STL_ALLOCATOR<char> >*) + 0x60C (ccl_gen)

因为我曾进在多个发行版(gentoo、CentOS、Ubuntu)上测试,结果就只有Arch不行,所以我想会不会是这里的问题。

在确认问题不是内核之后,我就把注意力放在了发行版标识上了,因为get_os_name()这里都出错了,肯定不只是发行版之间的二进制包兼容问题,而只是发行版自我标识的地方。于是就顺利的找到了/etc/issue,一开始我是直接把这个文件咔嚓了,没问题之后。再一看内容,才估计应该是inputrc所用的特殊字符(还得感谢以前LFS时的收获呢)

Abort(已中止)

这是因为你的主机名无法解析到IP地址造成的。这种情况下可以在命令行下继续编译,没问题。不过GUI启动就会失败了。按照上文所说的将你的主机名和IP地址记录加到/etc/hosts即可。

Personal tools