2
\$\begingroup\$

I am trying to simulate this circuit i want to know if the circuit i assembled is correct?

enter image description here

i want the current of VCCS element 1 and 2 plotted on a graph as i vary Vtun, Vsprog and Vdprog. I am using the following code is this correct?

CCapacitor_1 N_3 N_1  250f  
RResistor_1 Vsprog N_4  R=500  
MPMOS_1 N_3 N_1 N_2 Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
MPMOS_2 Vtun N_1 Vtun Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
MPMOS_3 N_4 N_1 Vdprog Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
GVCCS_G_Element_1 Vtun N_1 Vtun N_1  0.1  
GVCCS_G_Element_2 N_1 Vsprog Vsprog N_1 0.1 

v1 Vtun Gnd dc 0.01
v2 Vsprog Gnd dc 0.03
v3 Vdprog Gnd dc 0.02
.tran 1 10n
.print I(v1) I(v2) I(v3)
\$\endgroup\$
  • \$\begingroup\$ Your spice deck doesn't contain any VCCS at all, so it certainly doesn't match your schematic. \$\endgroup\$ – The Photon Mar 5 '13 at 18:35
  • \$\begingroup\$ @ThePhoton : is it correct now? i add the device order \$\endgroup\$ – Simon Mar 5 '13 at 18:37
  • \$\begingroup\$ The main issue I see is that the only nodes connected to ground are the body terminals of your FETs. SPICE likes every node to have a DC path to ground. Also, the answer will depend on exactly what version of SPICE you are using; they all have different syntax for things like VCCS's. Other than that, your schematic is too messy for me to bother trying to figure it out. \$\endgroup\$ – The Photon Mar 5 '13 at 18:42
  • \$\begingroup\$ @ThePhoton : it's a floating gate transistor which can be programmed using the variation of three voltages Vtun, Vsprog and Vdprog. \$\endgroup\$ – Simon Mar 5 '13 at 18:48
1
\$\begingroup\$

It's seem that you use conventional spice format. If your model "PMOS" is correct, then there are 3 error.

  1. First line is comment line
  2. There must be an .end at the end of file.
  3. The TSTEP must be smaller or equal to TSTOP

Here is the correct format:

****** Comment of this circuit
CCapacitor_1 N_3 N_1  250f  
RResistor_1 Vsprog N_4  R=500  
MPMOS_1 N_3 N_1 N_2 Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
MPMOS_2 Vtun N_1 Vtun Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
MPMOS_3 N_4 N_1 Vdprog Gnd PMOS W=2.5u L=250n AS=2.25p PS=6.8u AD=2.25p PD=6.8u  
GVCCS_G_Element_1 Vtun N_1 Vtun N_1  0.1  
GVCCS_G_Element_2 N_1 Vsprog Vsprog N_1 0.1 

v1 Vtun Gnd dc 0.01
v2 Vsprog Gnd dc 0.03
v3 Vdprog Gnd dc 0.02
.tran 1n 10n
.print I(v1) I(v2) I(v3)
.end
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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