From ca31c844cde7f54a285e3b9da358989e42258f5b Mon Sep 17 00:00:00 2001 From: couriersud Date: Sun, 6 Sep 2020 23:24:21 +0200 Subject: netlist: move to generated header and link support files files. * Removed device and macro header files. * All of those can be generated automatically so going forward there is no need for these any longer. * Introduced the modules concept. Modules are netlists for which automatic lib entries are generated. * Going forward you just store them in macro/modules and they will be automatically registered as device elements. * You need to do a "make generated" is src/lib/netlist/build * Some_device.cpp still needs to be added to netlist.lua * Added documentation on how to add devices to netlist. * Please refer to adding_devices.md for more information. --- src/lib/netlist/examples/cmos_inverter.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/lib/netlist/examples/cmos_inverter.cpp') diff --git a/src/lib/netlist/examples/cmos_inverter.cpp b/src/lib/netlist/examples/cmos_inverter.cpp index 9261a1e5919..022da27d23d 100644 --- a/src/lib/netlist/examples/cmos_inverter.cpp +++ b/src/lib/netlist/examples/cmos_inverter.cpp @@ -6,20 +6,27 @@ */ -#include "netlist/devices/net_lib.h" #include "netlist/devices/net_lib.h" NETLIST_START(cmos_inverter) /* Standard stuff */ + //EXTERNAL_SOURCE(modules_lib) + + //INCLUDE(modules_lib) + SOLVER(Solver, 48000) PARAM(Solver.ACCURACY, 1e-7) - PARAM(Solver.NR_LOOPS, 5000) + PARAM(Solver.NR_LOOPS, 50) PARAM(Solver.METHOD, "MAT_CR") ANALOG_INPUT(V5, 5) + RTEST(X) + NET_C(X.1, V5) + NET_C(X.2, GND) + VS(IN, 5) - PARAM(IN.FUNC, "T 5 *") + PARAM(IN.FUNC, "T * 5") MOSFET(P, "PMOS(VTO=-1.0 KP=2e-3 LAMBDA=2E-2)") MOSFET(M, "NMOS(VTO=1.0 KP=2e-3 LAMBDA=2E-2)") -- cgit v1.2.3-70-g09d2