Menu

How do you put these two on the same screen?

Help
WANG
2020-11-10
2020-11-10
  • WANG

    WANG - 2020-11-10

    I drew 2 graph using ngspice

    TDR Distributed circuit description

    .subckt myfilter in out
    R1 in p1 0.03264
    L p1 out 1.167e-10
    R2 out gnd 65369.47712
    C out gnd 4.98e-14
    .ends myfilter

    X1 1 2 myfilter
    X2 2 3 myfilter
    X3 3 4 myfilter
    X4 4 5 myfilter
    X5 5 6 myfilter
    X6 6 7 myfilter
    X7 7 8 myfilter
    X8 8 9 myfilter
    X9 9 10 myfilter
    X10 10 11 myfilter

    Vin p2 0 pulse 0 1 100p 28.2p
    Rin p2 1 50
    .tran 0.05ns 0.5ns 0ns
    .control
    run
    plot v(1)
    .endc
    .end


    *TDR Distributed circuit description


    .subckt myfilter in out
    R1 in p1 0.03264
    L p1 out 1.167e-10
    R2 p1 gnd 65369.47712
    C out gnd 4.98e-14
    .ends myfilter

    X1 1 2 myfilter
    X2 2 3 myfilter
    X3 3 4 myfilter
    X4 4 5 myfilter
    X5 5 6 myfilter
    X6 6 7 myfilter
    X7 7 8 myfilter
    X8 8 9 myfilter
    X9 9 10 myfilter
    X10 10 11 myfilter

    .Model N1 NMOS Level= 10
    .Model P1 PMOS Level= 10

    Vdd p3 gnd dc 5
    C1 11 p4 0.2p
    M1 p4 11 p3 p3 P1 W=80u L=0.18u
    M2 p4 11 gnd gnd N1 W=40u L=0.18u

    Vin p2 gnd pulse 0 1 100p 28.2p
    Rin 1 p2 50
    .tran 0.05ns 0.5ns 0ns
    .control
    run
    plot v(1)
    .endc
    .end

     
  • WANG

    WANG - 2020-11-10

    i attempt using this code, but this code not work!..

    *TDR Distributed circuit description


    .subckt myfilter1 in out
    R1 in1 p1 0.03264
    L p1 out1 1.167e-10
    R2 p1 gnd 65369.47712
    C out1 gnd 4.98e-14
    .ends myfilter1

    X1 1 2 myfilter1
    X2 2 3 myfilter1
    X3 3 4 myfilter1
    X4 4 5 myfilter1
    X5 5 6 myfilter1
    X6 6 7 myfilter1
    X7 7 8 myfilter1
    X8 8 9 myfilter1
    X9 9 10 myfilter1
    X10 10 11 myfilter1

    .subckt myfilter2 in out
    R3 in2 n1 0.3264
    L1 n1 out2 1.167e-9
    R4 n1 gnd 6536.947712
    C1 out2 gnd 4.98e-13
    .ends myfilter2
    *
    X11 101 102 myfilter2
    X12 102 103 myfilter2
    X13 103 104 myfilter2
    X14 104 105 myfilter2
    X15 105 106 myfilter2
    X16 106 107 myfilter2
    X17 107 108 myfilter2
    X18 108 109 myfilter2
    X19 109 110 myfilter2
    X20 110 111 myfilter2

    .Model N1 NMOS Level= 10
    .Model P1 PMOS Level= 10

    Vdd p3 gnd dc 5
    Cl 11 p4 0.2p
    M1 p4 11 p3 p3 P1 W=80u L=0.18u
    M2 p4 11 gnd gnd N1 W=40u L=0.18u

    • control voltage
      Vin1 p2 gnd pulse 0 1 100p 28.2p
      Rin1 1 p2 50
      Vin2 e1 gnd pulse 0 1 100p 28.2p
      Rin2 e1 in2 50

    .tran 0.05ns 0.5ns 0ns
    .control
    run
    plot v(p1) v(in)
    .endc
    .end

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.