Questions tagged [spice]

A famous textual circuit simulator with a number of graphic front-ends. Please tag with the precise flavor used (e.g. Pspice, LTspice, ngspice, Multisim, Proteus, Qucs) whenever appropriate (e.g. syntax or debugging) because there are substantive differences between implementations.

SPICE stands for "Simulation Program with Integrated Circuit Emphasis" and is an analog circuit simulator. It was originally written at UC Berkeley and published under a permissive license. There are a lot of (free and paid) forks/flavors of SPICE available today. The Wikipedia article is a good starting point to learn more. This tag should be used to mark general questions related to circuit simulations with SPICE.

related tags:

Further reading:

674 questions
4
votes
1 answer

.SUBCKT command in SPICE

In the User’s Guide and Reference of SPICE I see this definition of .SUBCKT command .SUBCKT SubcircuitName N1 [N2 N3 ... NN ] As I can understand SubcircuitName and the first node of the subcircuit are mandatory. I have a spice file which is valid…
Ashot
  • 143
  • 1
  • 1
  • 4
4
votes
1 answer

Difference between .MACRO and .SUBCKT in SPICE

What is the difference between .MACRO and .SUBCKT in SPICE simulators, such as HSPICE?
Kit
  • 309
  • 2
  • 9
3
votes
1 answer

Convert SPICE Model Netlist to Schematics

Is there any software to convert SPICE Models to a schematics? In other terms, I am looking for an alternatif of SpiceVision PRO
hiak
  • 95
  • 1
  • 7
3
votes
4 answers

Exporting LTspice waveforms to txt or csv

I have used the file _>export facility to generate txt /csv file for subsequent analysis in Matlab. The problem is that the exported waveform time steps are not uniform and the waveform is quantized. Is there a way to avoid this happening to get…
George
  • 31
  • 1
  • 1
  • 2
3
votes
3 answers

Convert .s2p file to spice model?

Is there a way to convert .s2p (touchStone) files to spice models? I have checked with various sites like www.emwonder.com and www.spice-club.com suggested in some forums but they didn't help me.
2
votes
1 answer

Plot value of resistor in electrothermal circuit

I want to plot the "equivalent" value of a resistor that uses electrothermal model * Dummy SPICE netlist R1 net1 net2 1 TC = -0.01 I can do it with a .defwave, but this is prone to numerical errors if V or I are small, close to 0. * Dummy SPICE…
PTRK
  • 141
  • 5
2
votes
1 answer

Negative time measurement with hspice?

I was wondering what the best way to measure the standard tPHL, tPLH parameters was in HSPICE. Specifically I was wondering the best way to address the negative values I am getting. I have a circuit with 2 connected inverters terminating a…
Mikhail
  • 303
  • 1
  • 5
  • 18
2
votes
1 answer

Spice : Error Message: Note: No ".plot", ".print", or ".fourier" lines; no simulations run

I try to run a simple RLC circuit under ngspice in batch mode and the netlist is written as follows: Series RLC Circuit V1 1 0 ac 100 0 R1 1 2 200 L1 2 3 0.125 C1 3 0 1U .ac LIN 10 10 100 print ac v(1) i(V1) .END I run this netlist by giving the…
user18231
  • 57
  • 1
  • 5
2
votes
2 answers

How do I prevent line wrapping in HSPICE output tables?

For example, I have the following .measure lines in my HSPICE netlist: .measure a1 .measure a2 .measure a3 .measure a4 It annoys me that HSPICE outputs the table (with the .mt0 extension)…
Kit
  • 309
  • 2
  • 9
2
votes
1 answer

spice plot resolution - sinusoid does not look continuous

Problem How does one increase the resolution of a SPICE plot? My sinusoidal signal doesn't look continuous, it looks very 'pointy'. I am using MACSPICE3 to simulate a non-inverting op-amp by using a dependent source (VCVS). Changing the step…
DWD
  • 323
  • 1
  • 2
  • 11
1
vote
1 answer

gnetlist Cannot Find Symbol

I am trying to use gschem/gnetlist/ngspice to do some circuit simulations. I have a subcircuit schematic and have created a symbol. I am able to add the symbol into the higher level schematic in gschem but when run gnetlist I get the following…
kyp4
  • 121
  • 3
1
vote
2 answers

Why ngspice doesn't accept UIC for TRAN?

I'm using ngspice and trying to add UIC at the end of the TRAN statement, but I get an error: $ ngspice 1 -> tran 10m 5 UIC Warning: Error: unknown parameter on .tran - ignored Why does this happen and how can I make it work? ngspice compiled from…
Dor
  • 1,165
  • 2
  • 11
  • 16
1
vote
1 answer

How to create encrypted spice subcircuit/schematic and use it as symbol in other schematics?

In LTspice XVIIx64 I want to create a subcircuit and use it in other schematics but the content of the subcircuit should not be visible to other users. The users are students who are advised to find out the content/components of a filter or resonant…
hendrik2k1
  • 129
  • 10
1
vote
2 answers

Replacement for SPICE 2g6

I am currently learning the basics of electronics using the website allaboutcircuits.com. I find this site a huge help and I can recommend it to anyone trying to get into electronics. There is only one problem however: the tutorial uses spice 2g6,…
Luke
  • 11
  • 1
1
vote
1 answer

Are dependent resistor values possible in Xyce?

I need my resistor to be a function of a node voltage in order to simulate a battery. I can do this is ngspice by setting R=2*v(1), for example. Is this possible in Xyce (or is there a workaround)?
Sonny
  • 61
  • 1
  • 1
  • 4
1
2 3