diff options
author | 2019-11-25 22:28:41 +0100 | |
---|---|---|
committer | 2019-11-25 22:28:41 +0100 | |
commit | c50bf9a698c8dc3e99ab6f703fc8bb9d1da41ad6 (patch) | |
tree | 96f0910ad76c2ef23d87f5626f3c30768ec04c3e /src/lib/netlist/examples/cs.cpp | |
parent | ceae2fdc3ebbd1c54e21190aa16957af8724b4b5 (diff) |
netlist: move nl_examples to src/lib/netlist/examples. (nw)
One folder less in the top-level.
Diffstat (limited to 'src/lib/netlist/examples/cs.cpp')
-rw-r--r-- | src/lib/netlist/examples/cs.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/netlist/examples/cs.cpp b/src/lib/netlist/examples/cs.cpp new file mode 100644 index 00000000000..8229c5bc032 --- /dev/null +++ b/src/lib/netlist/examples/cs.cpp @@ -0,0 +1,27 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * cs.c + * + */ + + +#include "netlist/devices/net_lib.h" + +NETLIST_START(cs) + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-12) + PARAM(Solver.METHOD, "MAT_CR") + + /* Positive current flows into pin 1 of the current source + * Thus we observe a negative voltage on R1.1 ! + */ + CS(CS1, 1e-3) + RES(R1, 1000) + + NET_C(CS1.1, R1.1) + NET_C(GND, CS1.2, R1.2) + + LOG(log_P, R1.1) +NETLIST_END() |