Magic Mailing List |
|
From: cfk (cfk AT pacbell DOT net) Date: Sun Jun 08 2003 - 15:06:50 EDT
So, DAC is over and I'm trying to get things working again with magic and tclspice. I must be dense or something, as I cannot seem to get the plot running in magic now. Let me start with our last e-mail exchange back a month or so ago, which is below. Basically, from within magic, I can go "package require spice" and the tk shell returns 0.2.9 as I would expect. But the troubles begin with the next line "spice_init_gui example.cir". At this point, I get a message saying that spice couldnt load "/usr/lib/tclX8.3../libtclx8.3.so". Now the curious part, is the installation I am testing on has a "/usr/lib/tclX8.3" and there is a libtclx.so soft link to libtclx.so.0. This is all default RH8 stuff. I am trying to keep my magic & tclspice contained within a default RH8 installation and it used to work just fine. I can see that the statement in tclspice_source.tcl at line 22 saying "package require Tclx" appears to be the culprit, but my lack of tcl knowledge precludes me from going much further. On the good news side, I can run my circuit with "spice::run" from within magic and I can do a "spice::asciiplot" from with magic. As you might recall, the issue is plotting from within magic as when I do a "spice::plot", I get a "cant open viewport for graphics" for error. I am basically thinking that tclspice and magic are making two different assumptions about the tcl/tk environment here and we have the two assumptions battling with each other for control of the screen, viewport or *something*. I dont want to cause a great amount of effort for anyone, either on the tclspice or the magic side, but I keep coming back to this one and it just seems to be in the way again. I am hoping that we can get the two codebases playing a bit more nicely with each other. With highest regards, Charles > > The problems start when I attempt to plot. The invocation of plot is > > different in order to avoid namespace collision with magic's plot > command. > > Unfortunately, I dont quite grok the new one. 'spice::plot in out' says > > "Cant open viewport for graphics", spice_init_gui testx_trans.cir > clears the > > magic window and the layout is gone. Invoking 'spice::spicetoblt in' > begets > > 'Wrong no of args', "spice::spicetoblt in out" says out is a bad blt > vector. > > > I think some proper documentation needs to be written and/or some > integration clean-ups. > > Now the answer: > > spice::plot is the old plot command from spice which uses X11, this has > been deprecated / disabled in tclspice, but the command is still there. > ( All it does now is to try and emulate a X11 window though Tk function > calls, see the spice_gr_* callback functions in > /usr/lib/spice/pkgIndex.tcl ) > > > I have played with spice_init_gui and I haven't seen this error before. > This command should be the first spice command you run. ( it sources the > given circuit file ). > After you have run this command you will have the spicewish::plot > command and you are in business! > > Example: (run from magic ) > ------------ > package require spice > spice_init_gui example.cir > spice::step 50 > spicewish::plot a0 > ------------- > > "spice::spicetoblt <in> <out>" : <in> is a spice variable, Vdd#branch, > etc. <out> is the name of a preexisting BLT vector, there is a bug in > BLT or something, and I cannot create the BLT vector in the C-code. Your > second "bad blt vector" error is because the BLT vector didn't already > exist.
|
|