1
\$\begingroup\$

I know "*" comments the line. Is there any way to select a group and comment the whole block in HSPICE?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

*Any line starting with * or $ is considered a comment.

*HSPICE also treats things after "*" or "$" as comments. The dollar sign ($) must be used for comments that do not begin in the first character position on a line For example,

* RF=1K GAIN SHOULD BE 100
$ MAY THE FORCE BE WITH MY CIRCUIT
VIN 1 0 PL 0 0 5V 5NS $ 10v 50ns
R12 1 0 1MEG $ FEED BACK
.PARAM a=1w$comment a=1, w treated as a space and ignored
.PARAM a=1k$comment a=1e3, k is a scale factor

For multi-line comments there is no way but to add $ or * at start of each line.

An .END statement is the last statement in the input netlist file. Text that follows the .END statement is a comment, and has no effect on the simulation thus the code which is needed to be ignored can also be placed there.

for more details https://cseweb.ucsd.edu/classes/wi10/cse241a/assign/hspice_sa.pdf

\$\endgroup\$
2
  • \$\begingroup\$ Yes, I mean is there anything for block comments, for example, /* lines of code */? Otherwise, I have to manually comment each line. \$\endgroup\$
    – Shannon
    Commented Apr 25, 2020 at 3:55
  • 1
    \$\begingroup\$ @Shabnam I don't have HSPICE but I don't think there is such a feature, since the language was not meant to be a programming language like C/C++/etc. That is, you don't spend time writing lines of code with added comments, as much as adding parts, wiring them, running the simulation, with an occasional line commented out. The netlist reflects this. \$\endgroup\$ Commented Apr 25, 2020 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.