HSpice Tutorial 4 - Some syntax for writing a netlist

Tuesday 1 April 2014

Writing a netlist means describing the circuit in terms of nodes in it. I would Prefer a structure to do so. The following gives you the structure for a net list(its not mandatory to follow the same):

*<TITLE> (must have at the first line of your script)
( information you want to contain - usually title, author and revision information )
<declaration> $ declare global variables
<NETLIST> $ specify of your circuit
<SOURCES> $ stimulus
<options and misc> $ options, temperature and so on
<ANALYSIS> $ specify which analysis you want to perform (AC, DC, TRAN, etc.)
<MODELS> $ device model description
<measure> $ measurement statement ( '.measure', '.plot' )
<alter> $ alternative conditions you wish to run
.END


Note '*<TITLE>' always comes first and '.end' always comes last. For the rest of the script, the order among items does not matter. You may need to contain items which contain capital letters. For example, we may not be able to run simulation without netlist or component model.


Description of each Sub Fields are as follows:

<TITLE> The First Line of your netlist file containing description of the File source, Version, Author, Etc,.
Ex: EE105 SPICE Tutorial Example 1 - Simple RC Circuit

 <declaration> Any declarations needed for net list like parameters etc.

<NETLIST> The main description of your Circuit

<SOURCE> The soures like ac, dc, pulse source are mentioned which excite the circuit

<ANALYSIS> The required DC, AC, transient, Bitwise and many Such Analysis are described here

<MODELS> The type of model of the component is mentioned. For example MOSFET has 60 different models in this current version called Levels which are in-built, or it can be described custom by the user.

.end - Marks end of netlist, and must be present at the end of the listing.


Some naming Conventions for nodes:

Every node and element within the HSPICE netlist must have its own unique name. Node and Element can be named using following rules:
  1.  Either letters and numbers (e.g. ab, a1, 1a, 10)
  2. Nodes with the same numbers treated as the same (e.g. 1a, 1b are the same)
  3. 0 is ALWAYS ground
  4. Case insensitive
  5. Designated initial characters
  6. resistor : Rxxx N1 N2 Value
  7. capacitor : Cxxx N1 N2 Value
  8. inductor : Lxxx N1 N2 Value
  9. bjt : Qxxx C B E Model
  10. mosfet : Mxxx D G S B Model
  11. diode : Dxxx N+
  12. independent voltage source : Vxxx N+ N- (DC) Value
  13. independent current source : Ixxx N+ N- (DC) Value


  •   full line comment : *
  •  end of the line comment : $
  •  continuation of the line : +


 Simple Syntax References:

Any bracketed labels must be replaced entirely (i.e. if you want a value of 5 V, you should replace <value> with 5V).

• Independent voltage source
       v<name> <+ terminal> <- terminal> <value>
• Independent current source
      i<name> <+ terminal> <- terminal> <value>
• Voltage-controlled voltage source
      E<name> <+ terminal> <- terminal> <+ control> <- control> <gain>
• Current-controlled voltage source (vcontrol refers to the voltage source which the controlling current
flows through)
      H<name> <+ terminal> <- terminal> <vcontrol> <gain>
• Voltage-controlled current source
      G<name> <+ terminal> <- terminal> <+ control> <- control> <gain>
• Current-controlled current source (vcontrol refers to the voltage source which the controlling current
flows through)
     F<name> <+ terminal> <- terminal> <vcontrol> <gain>
• Sinusoidal source (used as a <value>)
      sin(<offset> <amplitude> <frequency> <delay> <damping> <phase>)
• Square wave source (used as a <value>)
     pulse(<vmin> <vmax> <delay> <rise time> <fall time> <pulse width> <period>)
• Piece-wise linear source (used as a <value>)
      pwl(<t0> <v0> <t1> <v1> <t2> <v2> ...)
• Resistor
      r<name> <terminal 1> <terminal 2> <value>
• Capacitor
      c<name> <terminal 1> <terminal 2> <value>
• Inductor
      l<name> <terminal 1> <terminal 2> <value>



Continue Reading. Tutorial 5 Click Here. 

Visit HSpice Tutorial Page(Click Here) 

No comments:

Post a Comment

ElectroWeb embedded views

Contact Form

Name

Email *

Message *

Google+