diff options
author | 2020-09-06 23:24:21 +0200 | |
---|---|---|
committer | 2020-09-12 23:20:16 +0200 | |
commit | ca31c844cde7f54a285e3b9da358989e42258f5b (patch) | |
tree | f9e4a963b999e1352a4611a43a7c10c2d80957e7 /src/lib/netlist/examples | |
parent | cda35c94020dbcb8dad8309aba11374c356c501e (diff) |
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.
Diffstat (limited to 'src/lib/netlist/examples')
-rw-r--r-- | src/lib/netlist/examples/cmos_inverter.cpp | 13 | ||||
-rw-r--r-- | src/lib/netlist/examples/cmos_inverter_clk.cpp | 5 |
2 files changed, 12 insertions, 6 deletions
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 @@ -7,19 +7,26 @@ #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)") diff --git a/src/lib/netlist/examples/cmos_inverter_clk.cpp b/src/lib/netlist/examples/cmos_inverter_clk.cpp index 7429b077245..d115867d9ee 100644 --- a/src/lib/netlist/examples/cmos_inverter_clk.cpp +++ b/src/lib/netlist/examples/cmos_inverter_clk.cpp @@ -7,7 +7,6 @@ #include "netlist/devices/net_lib.h" -#include "netlist/devices/net_lib.h" #define USE_CLOCK (1) @@ -18,10 +17,10 @@ NETLIST_START(cmos_inverter_clk) SOLVER(Solver, 1e5) //SOLVER(Solver, 100000000000) PARAM(Solver.ACCURACY, 1e-6 ) - PARAM(Solver.NR_LOOPS, 500000) + PARAM(Solver.NR_LOOPS, 50) PARAM(Solver.DYNAMIC_TS, 1) PARAM(Solver.DYNAMIC_LTE, 1e-5) - PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 2e-9) + PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 2e-6) ANALOG_INPUT(V5, 5) // CLOCK(clk, 0.5e6) |