update docs about parametrized subcircuits, add braces around parameters (some ngspice version require them, some other can live without for simple non expression params), Update text example comp_ngspice.sch
This commit is contained in:
parent
ff66a48df0
commit
19fbba5c60
|
|
@ -31,6 +31,9 @@ p{padding: 15px 30px 10px;}
|
|||
<li>ROUT: the output resistance.</li>
|
||||
<li>COUT: the output capacitance. Together with ROUT defines a RC time constant (dominant pole).</li>
|
||||
</ul>
|
||||
<p> Parameters and expressions should be enclosed in curly braces or single quotes:<br>
|
||||
<kbd>value={ROUT}</kbd> or <kbd>value='ROUT'</kbd>
|
||||
</p>
|
||||
<p>
|
||||
The image below shows the circuit. A 'B' voltage-type source with an hyperbolic tangent
|
||||
function is used because it has continuous derivative and a realistic shape.
|
||||
|
|
@ -107,8 +110,8 @@ x1 REFD DRIVED IN comp_ngspice OFFSET=5 AMPLITUDE=10 GAIN=100 ROUT=1000 COUT=1p
|
|||
*.ipin MINUS
|
||||
*.opin OUT
|
||||
B1 IOUT 0 V = {OFFSET + AMPLITUDE/2*(tanh(V(IPLUS,IMINUS)*GAIN*2/AMPLITUDE))}
|
||||
R1 OUT IOUT ROUT m=1
|
||||
C3 OUT 0 COUT m=1
|
||||
R1 OUT IOUT {ROUT} m=1
|
||||
C3 OUT 0 {COUT} m=1
|
||||
V1 IPLUS PLUS 0
|
||||
.save i(v1)
|
||||
V2 IMINUS MINUS 0
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 42 KiB |
|
|
@ -1,4 +1,4 @@
|
|||
v {xschem version=3.4.0 file_version=1.2
|
||||
v {xschem version=3.4.1 file_version=1.2
|
||||
}
|
||||
G {}
|
||||
K {}
|
||||
|
|
@ -9,6 +9,8 @@ T {( @#0:resolved_net )} 440 -265 0 1 0.2 0.2 {name=l2 layer=15}
|
|||
T {( @#0:resolved_net )} 100 -285 0 1 0.2 0.2 {name=p1 layer=15}
|
||||
T {( @#0:resolved_net )} 100 -235 0 1 0.2 0.2 {name=p2 layer=15}
|
||||
T {( @#0:resolved_net )} 690 -265 0 1 0.2 0.2 {name=p3 layer=15}
|
||||
T {( @#0:resolved_net )} 250 -285 0 1 0.2 0.2 {name=l6 layer=15}
|
||||
T {( @#0:resolved_net )} 250 -235 0 1 0.2 0.2 {name=l1 layer=15}
|
||||
N 450 -240 450 -180 { lab=IOUT}
|
||||
N 450 -240 540 -240 { lab=IOUT}
|
||||
N 600 -240 680 -240 { lab=OUT}
|
||||
|
|
@ -23,8 +25,8 @@ C {bsource.sym} 450 -150 0 1 {name=B1 VAR=V FUNC="\{OFFSET + AMPLITUDE/2*(tanh(V
|
|||
}
|
||||
C {title.sym} 160 -30 0 0 {name=l3 author="Stefan Schippers"}
|
||||
C {res.sym} 570 -240 1 0 {name=R1
|
||||
value='ROUT'
|
||||
value=\{ROUT\}
|
||||
m=1}
|
||||
C {parax_cap.sym} 630 -230 0 0 {name=C3 gnd=0 value='COUT' m=1}
|
||||
C {parax_cap.sym} 630 -230 0 0 {name=C3 gnd=0 value=\{COUT\} m=1}
|
||||
C {vsource.sym} 150 -260 1 0 {name=V1 value=0}
|
||||
C {vsource.sym} 150 -210 1 0 {name=V2 value=0}
|
||||
|
|
|
|||
Loading…
Reference in New Issue