gnucap and related work development status Felix Salfelder FOSDEM - - PowerPoint PPT Presentation

gnucap and related work development status
SMART_READER_LITE
LIVE PREVIEW

gnucap and related work development status Felix Salfelder FOSDEM - - PowerPoint PPT Presentation

gnucap and related work development status Felix Salfelder FOSDEM 2016 About gnucap GNU Circuit Analysis Package Quick History 1983. First traces (Albert Davis) 1990. ACS , Als Circuit Simulator 1992. GPL 2001.


slide-1
SLIDE 1

gnucap and related work – development status

Felix Salfelder FOSDEM 2016

slide-2
SLIDE 2

About gnucap – GNU Circuit Analysis Package

◮ Quick History

◮ 1983. First traces (Albert Davis) ◮ 1990. ACS, Al’s Circuit Simulator ◮ 1992. GPL ◮ 2001. Renamed to gnucap, a GNU project ◮ 2013. Source repos at git.savannah.gnu.org

slide-3
SLIDE 3

About gnucap – GNU Circuit Analysis Package

◮ Quick History

◮ 1983. First traces (Albert Davis) ◮ 1990. ACS, Al’s Circuit Simulator ◮ 1992. GPL ◮ 2001. Renamed to gnucap, a GNU project ◮ 2013. Source repos at git.savannah.gnu.org

◮ featuring

◮ (single engine) mixed signal kernel ◮ efficient algorithms (sparse matrix, bypassing, etc.) ◮ interactive user interface ◮ modelgen, a model compiler of the early days ◮ a spice wrapper, support for spice-style models (C). ◮ lots of semiconductor device models available ◮ shared library

slide-4
SLIDE 4

gnucap – pluggability

◮ What is a ”Plugin”?

◮ Run time extension (see dlopen(3)) ◮ Register to dispatcher (dictionary) upon loading

slide-5
SLIDE 5

gnucap – pluggability

◮ What is a ”Plugin”?

◮ Run time extension (see dlopen(3)) ◮ Register to dispatcher (dictionary) upon loading ◮ Contributions without forking ◮ Avoid combinatorial explosion

slide-6
SLIDE 6

gnucap – pluggability

◮ What is a ”Plugin”?

◮ Run time extension (see dlopen(3)) ◮ Register to dispatcher (dictionary) upon loading ◮ Contributions without forking ◮ Avoid combinatorial explosion

◮ Plugin classes

◮ Components, models ◮ Commands, algorithms ◮ Functions ◮ Netlist/schematic languages ◮ Interactive help

slide-7
SLIDE 7

gnucap – pluggability

◮ What is a ”Plugin”?

◮ Run time extension (see dlopen(3)) ◮ Register to dispatcher (dictionary) upon loading ◮ Contributions without forking ◮ Avoid combinatorial explosion

◮ Plugin classes

◮ Components, models ◮ Commands, algorithms ◮ Functions ◮ Netlist/schematic languages ◮ Interactive help ◮ data output (under construction) ◮ Nodes (maybe)

slide-8
SLIDE 8

gnucap-uf, an experimental fork

◮ Playground for unstable features/plugins

slide-9
SLIDE 9

gnucap-uf, an experimental fork

◮ Playground for unstable features/plugins

◮ More SPICE support and components (poly(k)) ◮ Some (*IR) filter models ◮ Transient noise model

slide-10
SLIDE 10

gnucap-uf, an experimental fork

◮ Playground for unstable features/plugins

◮ More SPICE support and components (poly(k)) ◮ Some (*IR) filter models ◮ Transient noise model ◮ Sensitivity analysis ◮ Wave stash (a dictionary for post processing) ◮ Operating point stack ◮ Enhanced module loading (compile-on-demand)

slide-11
SLIDE 11

gnucap-uf, an experimental fork

◮ Playground for unstable features/plugins

◮ More SPICE support and components (poly(k)) ◮ Some (*IR) filter models ◮ Transient noise model ◮ Sensitivity analysis ◮ Wave stash (a dictionary for post processing) ◮ Operating point stack ◮ Enhanced module loading (compile-on-demand)

◮ Incompatible changes

◮ Changes in parameter processing, logic evaluation etc. ◮ GNU build system, automated test suite, ... ◮ Various fancy ideas, partly half-baked, partly obsolete. ◮ API converging back to upstream

slide-12
SLIDE 12

gnucap-uf, benefits

◮ Sometimes

slide-13
SLIDE 13

gnucap-uf, benefits

◮ Sometimes

◮ Fixes apply to the upstream project

slide-14
SLIDE 14

gnucap-uf, benefits

◮ Sometimes

◮ Fixes apply to the upstream project ◮ Extensions are portable.

slide-15
SLIDE 15

gnucap-uf, benefits

◮ Sometimes

◮ Fixes apply to the upstream project ◮ Extensions are portable.

◮ Platform for some research.

◮ State space inspection ◮ Ageing effects simulation

slide-16
SLIDE 16

gnucap-uf, state space inspection

S C V L R

slide-17
SLIDE 17

gnucap-uf, state space inspection

S C V L R

  • 0.04
  • 0.03
  • 0.02
  • 0.01

0.01 0.02 0.03 0.04 0.05

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2 2.5

l [V] coil current [A]

slide-18
SLIDE 18

gnucap-uf, state space inspection

S C V L R

  • 0.04
  • 0.03
  • 0.02
  • 0.01

0.01 0.02 0.03 0.04 0.05

  • 1.5
  • 1
  • 0.5

0.5 1 1.5 2 2.5

l [V] coil current [A]

slide-19
SLIDE 19

gnucap-uf, state space of a trigger

− +

OP

  • ut

in

slide-20
SLIDE 20

gnucap-uf, state space of a trigger

−Vth Vth Vlo Vhi

  • utput [V]

input [V]

slide-21
SLIDE 21

gnucap-uf sram cell discretization

WL BL /BL y x

slide-22
SLIDE 22

gnucap-uf sram cell discretization

slide-23
SLIDE 23

Ageing simulation with gnucap-uf

sine 2 4 6 8 1 v(nout)

  • utput [V]

time [µs]

slide-24
SLIDE 24

Ageing simulation with gnucap-uf

sine 2 4 6 8 1

  • utput [V]

new

  • lder

time [µs]

slide-25
SLIDE 25

gnucap-adms

◮ Turns verilog-a models into component plugins ◮ Uses admsXml ◮ Based on a student project (A. Fr¨

  • se)

◮ Derived from gnucap-mot-adms (G. Serdyuk) ◮ Derived from several mot-adms templates ◮ .. including (ng?)spice adaptions

slide-26
SLIDE 26

gnucap-adms

◮ Turns verilog-a models into component plugins ◮ Uses admsXml ◮ Based on a student project (A. Fr¨

  • se)

◮ Derived from gnucap-mot-adms (G. Serdyuk) ◮ Derived from several mot-adms templates ◮ .. including (ng?)spice adaptions

◮ Implementation goals/motivation (roughly)

◮ (earlier) mixed signal simulation and compact modelling ◮ Multiple disciplines simulation ◮ Formal verification, ’equivalence’ checking etc. ◮ Circuit level ageing models and simulation

slide-27
SLIDE 27

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines

slide-28
SLIDE 28

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines ◮ Subcircuit component instanciation ◮ Linear operators (idt, ddx)

slide-29
SLIDE 29

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines ◮ Subcircuit component instanciation ◮ Linear operators (idt, ddx) ◮ bsim6 works (partially)

slide-30
SLIDE 30

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines ◮ Subcircuit component instanciation ◮ Linear operators (idt, ddx) ◮ bsim6 works (partially) ◮ sensitivity, noise, switching branches, events, ...

slide-31
SLIDE 31

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines ◮ Subcircuit component instanciation ◮ Linear operators (idt, ddx) ◮ bsim6 works (partially) ◮ sensitivity, noise, switching branches, events, ...

◮ Refactoring in progress

slide-32
SLIDE 32

gnucap-adms today

◮ More standard support

◮ Voltage sources, current probes ◮ Verilog style disciplines ◮ Subcircuit component instanciation ◮ Linear operators (idt, ddx) ◮ bsim6 works (partially) ◮ sensitivity, noise, switching branches, events, ...

◮ Refactoring in progress

◮ Bug reports/fixes, ◮ Feature additions, ◮ Unit tests are welcome.

slide-33
SLIDE 33

gnucap-adms inline example

load lang_adms.so adms ‘include "discipline.h" module pid(sp,sn,cp,cn); in sp,sn,cp,cn; electrical sp,sn,cp,cn; parameter real p = 1 from [0:inf); parameter real i = 1 from [0:inf); parameter real d = 1 from [0:inf); analog begin V(sp,sn) <+ p * V(cp,cn); V(sp,sn) <+ i * idt(V(cp,cn)); V(sp,sn) <+ d * ddt(V(cp,cn)); end endmodule endadms [..] instance, testbench, sim command

slide-34
SLIDE 34

gnucap-adms inline example

  • 1

1 2 3 20 40 60 80 100 input

  • utput

time [s] voltage [V]

slide-35
SLIDE 35

gnucap-adms ageing extension

module ageing_component(a, b, c); electrical a, b, c; degradational d0, .., dk; [ parameters, variables, functions .. ] ageing_process_subdevice_0 AP0(d0); .. ageing_process_subdevice_k APk(dk); analog begin param = f_p(State(d0), + [..] + State(dk)); I(a,b) <+ f_bm(param,V(a,b),V(b,c)); Level(d0) <+ f_L0(V(a), V(b), V(c)); [..] Level(dk) <+ f_Lk(V(a), V(b), V(c)); end endmodule

slide-36
SLIDE 36

gnucap-geda

◮ originally a GSoC project (2012?, Savant Krishna)

◮ idea: schematic representation using generic component

patterns

◮ implementation: gEDA schematic parser (gnucap plugin)

◮ convert schematic (nets, symbols) to any format ◮ convert anything to gEDA schematics (needs work) ◮ analyse/simulate (hierarchical) schematic + component library ◮ provide component library supplementing gEDA symbols

(stub)

slide-37
SLIDE 37

gnucap-geda, example

◮ Simple geda schematic (rc.sch)

FILE: REVISION: DRAWN BY: PAGE OF TITLE

net= INPUT:1 port INPUT net= nout port OUTPUT R1 value= 4k net= PASSIVE:1 PASSIVE CAPACITOR C1 value= 1u teetop RC proof of concept Felix 1

slide-38
SLIDE 38

gnucap-geda, example

◮ Simple geda schematic (rc.sch)

FILE: REVISION: DRAWN BY: PAGE OF TITLE net= INPUT:1 port INPUT net= nout port OUTPUT R1 value= 4k net= PASSIVE:1 PASSIVE CAPACITOR C1 value= 1u teetop RC proof of concept Felix 1

◮ Verilog netlist representation

module rc.sch (INPUT:1,nout,PASSIVE:1); //v 20130925 2 net #() net0 (.p(x_nn_0),.n(x_nn_1)); place #(.x(47300),.y(46600)) 47300:46600 (.port(x_nn_0)); place #(.x(47300),.y(47300)) 47300:47300 (.port(x_nn_1)); port #(.basename(input-2.sym),.net(INPUT:1)) INPUT:1 (.int(x_cn_2),.ext(INPUT:1)); place #(.x(44900),.y(47300)) 44900:47300 (.port(x_cn_2)); port #(.basename(output-2.sym),.net(nout)) nout (.int(x_cn_3),.ext(nout)); place #(.x(53500),.y(47300)) 53500:47300 (.port(x_cn_3)); RESISTOR #(.basename(resistor-2.sym),.value(4k)) R1 (.1(x_cn_4),.2(x_cn_5)); place #(.x(45500),.y(47300)) 45500:47300 (.port(x_cn_4)); place #(.x(46400),.y(47300)) 46400:47300 (.port(x_cn_5)); net #() net1 (.p(x_cn_4),.n(x_cn_2)); net #() net2 (.p(x_nn_6),.n(x_nn_7)); place #(.x(47300),.y(45200)) 47300:45200 (.port(x_nn_6)); place #(.x(47300),.y(45700)) 47300:45700 (.port(x_nn_7)); port #(.basename(passive-1.sym),.net(PASSIVE:1)) PASSIVE:1 (.int(x_nn_6),.ext(PASSIVE:1)); CAPACITOR #(.basename(capacitor-1.sym),.description(capacitor), .numslots(0),.symversion(0.1),.value(1u)) C1 (.1(x_nn_7),.2(x_nn_0)); net #() teetop (.p(x_cn_5),.n(x_cn_3)); net #() extranet4 (.p(x_cn_5),.n(x_nn_1)); endmodule // rc.sch

slide-39
SLIDE 39

gnucap-geda, example

◮ Simple geda schematic (rc.sch)

FILE: REVISION: DRAWN BY: PAGE OF TITLE net= INPUT:1 port INPUT net= nout port OUTPUT R1 value= 4k net= PASSIVE:1 PASSIVE CAPACITOR C1 value= 1u teetop RC proof of concept Felix 1

◮ Verilog netlist representation

module rc.sch (INPUT:1,nout,PASSIVE:1); net #() net0 (.p(x_nn_0),.n(x_nn_1)); place #(.x(47300),.y(46600)) 47300:46600 (.port(x_nn_0)); RESISTOR #(.basename(resistor-2.sym),.value(4k)) R1 (.1(x_cn_4),.2(x_cn_5)); [..] endmodule;

◮ Ready for simulation

geda rc.sch module verilog rc.sch sch1(n1 n2 n0); spice V1 n1 n0 pulse iv=0 pv=1 delay=0 width=10m R1 n0 0 1 .print tran v(nodes) .tran 0 20m .1m basic trace=n

slide-40
SLIDE 40

gnucap-geda, example

◮ Simple geda schematic (rc.sch)

FILE: REVISION: DRAWN BY: PAGE OF TITLE net= INPUT:1 port INPUT net= nout port OUTPUT R1 value= 4k net= PASSIVE:1 PASSIVE CAPACITOR C1 value= 1u teetop RC proof of concept Felix 1

◮ Verilog netlist representation

module rc.sch (INPUT:1,nout,PASSIVE:1); net #() net0 (.p(x_nn_0),.n(x_nn_1)); place #(.x(47300),.y(46600)) 47300:46600 (.port(x_nn_0)); RESISTOR #(.basename(resistor-2.sym),.value(4k)) R1 (.1(x_cn_4),.2(x_cn_5)); [..] endmodule;

◮ Ready for simulation

geda rc.sch module .spice [..] .print tran v(nodes) .tran 0 20m .1m basic trace=n

0.2 0.4 0.6 0.8 1 0.005 0.01 0.015 0.02 v(n1) v(n2)

slide-41
SLIDE 41

gnucap-qucs

◮ Proof of concept initiated after FOSDEM 2015

(based on old code fragments by Fabian Vallon)

◮ a qucsator replacement by means of

◮ Input deck parser (some SPICE/ADS inspired format) ◮ Compatible components (names, pins, parameters...) ◮ Emulate commands and semantics (noninteractive, one-shot,

probe-placement)

◮ Turn results into ”qucs dataset” format (’.dat’) ◮ Infinite possibilities.

slide-42
SLIDE 42

gnucap-qucs demo

$ QUCSATOR=qucsator qucs -i rc.sch

slide-43
SLIDE 43

gnucap-qucs demo

$ QUCSATOR=gnucsator.sh qucs -i rc.sch

slide-44
SLIDE 44

gnucap-qucs roadmap

◮ What we have

slide-45
SLIDE 45

gnucap-qucs roadmap

◮ What we have

◮ few components (just wrapped) ◮ transient command wrapper ◮ intermediate output (plus suboptimal conversion) ◮ parameters are incomplete

slide-46
SLIDE 46

gnucap-qucs roadmap

◮ What we have

◮ few components (just wrapped) ◮ transient command wrapper ◮ intermediate output (plus suboptimal conversion) ◮ parameters are incomplete ◮ works with unmodified QUCS (simple patch already merged) ◮ should work with unmodified gnucap

slide-47
SLIDE 47

gnucap-qucs roadmap

◮ What we have

◮ few components (just wrapped) ◮ transient command wrapper ◮ intermediate output (plus suboptimal conversion) ◮ parameters are incomplete ◮ works with unmodified QUCS (simple patch already merged) ◮ should work with unmodified gnucap

◮ Proper integration: more work (on all ends)

◮ Output plugins (hdf? shm?) ◮ More modular QUCS

slide-48
SLIDE 48

gnucap-qucs roadmap

◮ What we have

◮ few components (just wrapped) ◮ transient command wrapper ◮ intermediate output (plus suboptimal conversion) ◮ parameters are incomplete ◮ works with unmodified QUCS (simple patch already merged) ◮ should work with unmodified gnucap

◮ Proper integration: more work (on all ends)

◮ Output plugins (hdf? shm?) ◮ More modular QUCS ◮ Needs your help.

slide-49
SLIDE 49

Thank You.