尝试在 Ubuntu 12.04LTS 上运行 Qsim 时出现"bad option -readonly"错误



我正在尝试在Qsim上测试我的Verilog代码。当我打开 Qsim 并尝试打开我的项目时,它给了我一个错误 bad option "-readonly": must be -group, -owner, or -permissions .我不知道这个错误是什么意思,也不知道如何解决它。如果有人能帮助我,那就太神奇了。

我在一台使用 Quartus 2 v12.0SP2 的 64 位 Ubuntu 12.04 计算机上。

谷歌搜索说这可能是TCL脚本错误消息。 添加 QSIM 和报价我受到了打击,但可以访问 Altera 论坛档案(关于数据库错误)。

我从谷歌缓存中得到了这个[Qsim Linux?[存档] - Altera论坛](http://www.alteraforum.com/forum/archive/index.php/t-32358.html .

gPaiva
October 20th, 2011, 08:53 PM
Hi i am new to FPGAs , and tried to install it on linux , quartus runs fine,
but i need a simulation . i tried type at shell quartus_sh -qsim , the qsim 
opened but when i try open a project i get this result:
img820.imageshack.us/img820/673/capturadetelaf.png (not allowed to post 
links, lol :()
if u cant see the image it says : bad option "-readonly": must be -group, 
-owner or -permissions
...
AnthonyWBrown
March 30th, 2012, 09:25 AM
Have you found a cure for this yet?
Actually, I found a workaround. Looks like there is a syntax problem with 
the tcl script, it appears to try to clear the -readonly permissions on
the various files. My knowledge of tcl would fit on the head of a pin, but 
according to the tcl documentation I found you can only do that on a Mac. 
Linux allows you to do -owner and -group and -permissions, which makes 
sense for linux filesystems, I guess. Anyhow, hence the error.
This -readonly thing is done in several places, but the one that causes the
problem you describe is in the "qsim:open_project" procedure. If you edit 
the file quartus/common/tcl/apps/qsim/qsim_script.tcl and go down to line 
1413 or so you should find:
file attributes db -readonly 0
comment this out by putting a # in front and save it and you're good to go. 
If you feel keen, you could find the other places the file attributes 
-readonly function is called and comment them out, too. If you were feeling 
super keen, you could fix the tcl to use something cross-platform compatible
and submit a patch to Altera.....
Hope this helps.
A/B
nigelg
August 17th, 2012, 07:04 AM
thanks for the workaround, just got clobbered by it.
something like this works as a patch, a bit long winded.
#######################################
set my_plat [lindex $tcl_platform(os) 0]
if {[string equal $my_plat "Linux"]} {
if {[file writable db] == 0} {
# not writable so get current permissions
set myperms [file attributes db -permissions]
#set user write permissions leaving rest unchanged
set myperms [expr $myperms | 0200]
file attributes db -permissions $myperms
}
} else {
# hopefully it's windoze
file attributes db -readonly 0
}
########################################
My tcl is fairly limited so there are probably better ways to do it.
nigelg
August 17th, 2012, 07:16 AM
oops, wrong draft,
set myperms [expr $myperms | 0200]
should read
set myperms [expr $myperms + 0200]
haulisson
September 18th, 2012, 03:46 PM
Hi guys,
Its solutions were very ingenious, but I do not know much Tcl script. So,
could someone tell where I put this patch proposed by nigelg.
Best Regards
nigelg
October 15th, 2012, 08:13 AM
Hi,
find the lines containing
file attributes db -readonly 0
as described in an earlier post, comment out the line and replace with the
correct version of my patch. You will need to do this for each original 
occurence of the line.
HTH
Nigel

似乎QSIM的Linux用户并不多,或者Altera希望他们这样做。自给自足。 (引用论坛帖子作为代码比完全容易重新格式化它们)。

通过谷歌翻译运行 http://wiki.sj.ifsc.edu.br/wiki/index.php/Uso_do_Quartus_II_nos_Labs_do_IFSC,为我们提供了相同的 Altera 论坛线程的另一个打击,但修复略有不同:

修复 Qsim 中的错误。

When installing Qsim an error (bad option "-readonly": must be-group, or-permissions-owner) can occur when opening the project file generated in Quartus II. The fix is to open the file quartus / common / tcl / apps / Qsim / qsim_script.tcl and comment lines:
  699 # file attributes $ Qsim :: project_dir / Qsim / $ Qsim :: project_name.sim.vwf-readonly 1
  812 # file attributes $ Qsim :: project_dir / Qsim / $ Qsim :: project_name.sim.vwf-readonly 1
 1413 # file attributes db-readonly 0
SOURCE: http://www.alteraforum.com/forum/archive/index.php/t-32358.html 

相关内容

最新更新