Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Qsim Linux?

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

8 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hie,

    Didi you find the solution for this problem.

    I am facing a similar issue.

    I feel there should be a place where the options can be set.

    Still trying

    let me know if you get a solution.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i don't see that error in 11.0, 11.0sp1, or 11.1, though i am running CentOS 5

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    oops, wrong draft,

    set myperms [expr $myperms | 0200]

    should read

    set myperms [expr $myperms + 0200]
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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