Universal "Comment" Character

Is there a universal character in ALL variations of "Spice" netlists that designates that the following text is a comment only?

(Trying to adjust my LVS templates so that ALL layout editors will recognize comments.)

...Jim Thompson

-- | James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | |

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson
Loading thread data ...

So far it looks like ONLY a newline beginning "*" works for ALL cases :-(

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

mite want to try these ;comments, //comments , {comments }

--
"I am never wrong, once i thought i was, but i was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

All of the model files I have collected use the '*' cahracter.

Cheers

Reply to
Martine Riddle

That (*) only applies at the beginning of a _new_line_.

Looks like both PSpice and HSpice use ";" for comments _in-line_.

But my real need is talking to chip layout tools...

IC Editor

Tanner Tools

etc.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Hey Jim, have you started programming yet?

John

Reply to
John Larkin

Not yet. But I'm thinking about starting a second life writing engineering tools ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Don't you have a son who is a programmer? A text pre-processor that substitutes one code for the others would be pretty easy. It could have an option to choose the code for the output file.

--

Reply in group, but if emailing add another
zero, and remove the last word.
Reply to
Tom Del Rosso

He's so busy at his own work he has no time for Dad anymore :-(

So I'm going to have to learn/refresh... I used to do Pascal OK.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Maybe something could easily be thrown together in Perl (or even simple-Simon awk).

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Yes, here's a Perl script that does just that. Enjoy! It does semicolon and double-slash comments, but you should be able to see how to extend it.

--- cut here --- #!/usr/bin/perl -p # Takes end-of-line comments in SPICE files and puts them in before the lines # in which they appeared as regular SPICE asterisk comments. # Usage: # # perl -p spicecomments.pl originalfile > newfile # # or (to do an in-place edit): # # perl -pi spicecomments.pl originalfile

# semicolon end-of-line comments s#^([^;]+)\\s*;(.*)#*$2\\n$1#; s#^\\s*;(.*)#*$1#; # double-slash end-of-line comments s#^(.+)\\s*//(.*)#*$2\\n$1#; s#^\\s*//(.*)#*$1#;

Reply to
Ned Konz

You can use SED to alter text strings in an ASCII file. Incorporate SED into a batch file to make life easier. It will take a file, process, then write it out to another file leaving the original alone. SED can use reg ex for those really sticky issues. SED can be daunting, but you will quickly appreciate what it can do.

formatting link
For Windoze, download the "bin" and "dep" zip files.

--
Mark
Reply to
qrk

On thinking about it a bit the only relatively reliable one is likely to be Asterisk in column 1, required for backward compatibility from the old Fortran days.

--
 JosephKK
 Gegen dummheit kampfen die Gotter Selbst, vergebens.  
  --Schiller
Reply to
joseph2k

That's my suspicion also. Since my netlister can insert a newline that's what I'll probably settle on.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

Sometimes, you can use cpp for hacks like this. It often works very well if you are using make.

(cpp is the c preprocessor that processes things like #define and #if.)

--
The suespammers.org mail server is located in California.  So are all my
other mailboxes.  Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer\'s.  I hate spam.
Reply to
Hal Murray

sed probably can be made to do it all.

Any sed masochists out there?

--
"Electricity is of two kinds, positive and negative. The difference
is, I presume, that one comes a little more expensive, but is more
durable; the other is a cheaper thing, but the moths get into it."
                                             (Stephen Leacock)
Reply to
Fred Abse

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.