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

时间:2014-02-08 19:25:31

标签: ubuntu vhdl verilog

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

我使用的是Quartus 2 v12.0SP2的64位Ubuntu 12.04计算机。

1 个答案:

答案 0 :(得分:2)

有点谷歌搜索说它可能是一个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

似乎没有很多Linux用户可以使用QSIM,或者Altera期望他们使用 自给自足。 (引用论坛帖子作为代码比完全更容易 重新格式化它们。)

通过谷歌翻译运行http://wiki.sj.ifsc.edu.br/wiki/index.php/Uso_do_Quartus_II_nos_Labs_do_IFSC让我们在同一个Altera论坛主题中获得了另一个点击,但修复略有不同:

修复Qsim中的BUG。

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