|
From: Clint K. <cli...@gm...> - 2005-08-18 17:53:29
|
Hello everybody. I am having problems with nodes with slashes in their names. If I do something like the following: .print tran v(x/1) I get an error from ngspice: "Error: x: no such vector." But I have no other problems with having slashes in the node names (if I don't print out the node with the slash in its name, the simulation proceeds fine). I have similar problems if I say something like: .ic v(x/1) =3D 0 These commands seems to work fine in hspice... Am I doing something stupid? Is this a bug in ngspice? Or is there some kind of spice3 formatting rule that says that slashes are interpreted differently within v(...) expressions? -Clint |
|
From: Clint K. <cli...@gm...> - 2005-08-18 18:14:17
|
BTW I also have a similar problem if I have brackets in node names: .print tran v(l[1]___e) gives me: Syntax error: parsing expression 'v(l[1]___e)'. But if I rename "l[1]___e" as "xxx", then I don't have any problems... -Clint On 8/18/05, Clint Kelly <cli...@gm...> wrote: > Hello everybody. I am having problems with nodes with slashes in > their names. If I do something like the following: >=20 > .print tran v(x/1) >=20 > I get an error from ngspice: >=20 > "Error: x: no such vector." >=20 > But I have no other problems with having slashes in the node names (if > I don't print out the node with the slash in its name, the simulation > proceeds fine). I have similar problems if I say something like: >=20 > .ic v(x/1) =3D 0 >=20 > These commands seems to work fine in hspice... >=20 > Am I doing something stupid? Is this a bug in ngspice? Or is there > some kind of spice3 formatting rule that says that slashes are > interpreted differently within v(...) expressions? >=20 > -Clint > |
|
From: <sd...@cl...> - 2005-08-18 18:27:14
|
You can use almost any arbitrary character in a node name, with some exceptions. The problem you are experiencing is that in SPICE directives the "/" char is interpreted as "division". Thus, .print tran v(x/1) will try to figure out the value of the vector x divided by 1. As for brackets in node names, the SPICE parser ignores brackets, or rather, treats them as whitespace IIRC. Please keep in mind that ngspice is not hspice, so you can't expect exact ngspice <-> hspice compatibility. Finally, your question does raise the question "is there a document anywhere describing valid ngspice syntax?" The answer is "no". Stuart > > BTW I also have a similar problem if I have brackets in node names: > > .print tran v(l[1]___e) > > gives me: > > Syntax error: parsing expression 'v(l[1]___e)'. > > But if I rename "l[1]___e" as "xxx", then I don't have any problems... > > -Clint > > On 8/18/05, Clint Kelly <cli...@gm...> wrote: > > Hello everybody. I am having problems with nodes with slashes in > > their names. If I do something like the following: > >=20 > > .print tran v(x/1) > >=20 > > I get an error from ngspice: > >=20 > > "Error: x: no such vector." > >=20 > > But I have no other problems with having slashes in the node names (if > > I don't print out the node with the slash in its name, the simulation > > proceeds fine). I have similar problems if I say something like: > >=20 > > .ic v(x/1) =3D 0 > >=20 > > These commands seems to work fine in hspice... > >=20 > > Am I doing something stupid? Is this a bug in ngspice? Or is there > > some kind of spice3 formatting rule that says that slashes are > > interpreted differently within v(...) expressions? > >=20 > > -Clint > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Ngspice-users mailing list > Ngs...@li... > https://lists.sourceforge.net/lists/listinfo/ngspice-users > |
|
From: Clint K. <cli...@gm...> - 2005-08-18 18:58:33
|
Aaaah, thanks a lot. I suppose I will add something to my preprocessing script to change [, ], and / to other characters. Are there any other characters in node names that get interpreted as white space? What about "#"? Is that okay? On 8/18/05, Stuart Brorson <sd...@cl...> wrote: > Finally, your question does raise the question "is there a document > anywhere describing valid ngspice syntax?" The answer is "no". Ha ha ha ha, that was going to be my next question... Cheers, Stuart, thank you for your help! -Clint |