Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Modelsim refusing to start gui when launching from SVEditor (eclipse).

Status
Not open for further replies.

mrflibble

Advanced Member level 5
Advanced Member level 5
Joined
Apr 19, 2010
Messages
2,720
Helped
679
Reputation
1,360
Reaction score
652
Trophy points
1,393
Visit site
Activity points
19,551
Alright, both problem and solution. Normally I wouldn't bother posting something like this (after I find the solution :p ), but some parts of it are sufficiently non-obvious that this may help future googlers.

The problem:
Starting modelsim (vsim) gui from an environment that vsim decides just is not interactive enough for some reason or another. The environment in particular is SVEditor (eclipse based). I could start simulation jobs just fine using the External Tools Configuration. That even gives you a nice interactive console inside the sveditor/eclipse console. In fact, it is exactly like vsim interactive mode. Even when you don't specify interactive mode (-c option). I suspected it had something to do with the eclipse console just not implementing some ioctl that vsim is using to figure out the capabilities of the interactive terminal. In fact, using plain vsim (default gui mode) is exactly the same as vsim -c (interactive mode) when fired from eclipse. And on the other side of things I tested starting from a real terminal. With standard flags ==> get gui. With -c flag ==> get interactive console. All as expected. Okay, start it using nohup. That way you deprive it from anything remotely acting like an interactive terminal. Sure enough, that runs the sim, but this time as if it were batch mode. MMmh, okay, so if that behaviour is as expected then hopefully the other way around also works. Provide it with a nice fake terminal and see if we get a gui. So I did a nohup script vsim, and tadaaa we have gui. The nohup is of course not needed, but just to see if all my guesses were correct. So now ...

The solution:
The external script you use from eclipse normally would have something like this in it:

Code:
vsim  -do my_fav_script.do
Using that would give you the above problems .. no gui. One small change required...

Code:
script -c "vsim  -do my_fav_script.do" /dev/null
The script command will start vsim, only this time providing it with a "proper" fake terminal and now you will get your default gui again.

Does anyone "in the know" happen to know what could cause vsim to behave like this? I suspect an unimplemented ioctl that vsim is expecting to be there, but it'd be nice to know for sure. I did check DISPLAY variables and such, and they were all properly propagated, so that wasn't the issue.

Anyways, hope this is of help to future victims.
 

No I did not. I did look for a way to explicitly specify using gui mode instead of relying on the default, but I couldn't find it. :( Only thing I found was how to do command line mode (-c switch) and batch mode. What page of what manual should I have been looking, because I suspect I must have been blind. :-?

And I did try the -i switch now, and that does the trick as well.Thanks! :thumbsup:

This is a bit nicer, since I now get the Reading .../pref.tcl message in the eclipse console as well. Job control still doesn't work, but that's no big issue. Job control does work in command line mode, so that's good enough for me.

Since you mention cygwin, I gather that you have experience with similar problems only then in relation to cygwin. Do you happen to have any relevant links for that? Always handy to be prepared for the next randomly appointed oddity that is bound to happen sometimes.

- - - Updated - - -

Well, damn! Just googling on "modelsim cygwin gui" gets me to the vsim -i solution on the first hit. XD

- - - Updated - - -

Right, found it. I was reading the User's Manual, while I should have been reading the Command Reference Manual. Commands => vsim => Arguments, all languages. Which just goes to show that "when in doubt, drink more coffee". Doh!

- - - Updated - - -

Double doh! Even running "vsim -help" shows the flags for interactive.
Code:
[B]%[/B] vsim -help | grep -i '\(interactive\|gui\)'

   -gui                    Open the GUI without loading a design
   -i                      Force interactive mode
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top