diff options
author | 2014-02-09 22:43:58 +0000 | |
---|---|---|
committer | 2014-02-09 22:43:58 +0000 | |
commit | 534348f6a96f09d4642d1eabb53ab7607b5674d5 (patch) | |
tree | 16509726366e2ab25bb5ddfe6f734a7fc02299e8 /nl_examples/vccs.c | |
parent | ee7c90c3a462ea9556f259ee17d08e4b2a324eb2 (diff) |
Commit current state of netlist examples. Later, these are intended as a basis for regression tests.
Diffstat (limited to 'nl_examples/vccs.c')
-rw-r--r-- | nl_examples/vccs.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nl_examples/vccs.c b/nl_examples/vccs.c new file mode 100644 index 00000000000..73cefd15fb1 --- /dev/null +++ b/nl_examples/vccs.c @@ -0,0 +1,28 @@ +/* + * vccs.c + * + */ + + +#include "netlist/devices/net_lib.h" + +NETLIST_START(vccs) + + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-12) + PARAM(Solver.RESCHED_LOOPS, 10000) + + NETDEV_VCCS(VV) + PARAM(VV.G, 100) // typical OP-AMP amplification + RES(R2, 1) + + NET_C(clk, VV.IN) + NET_C(R2.1, VV.OP) + NET_C(R2.2, GND) + NET_C(VV.ON, GND) + NET_C(VV.IP, GND) + LOG(logX, VV.OP) + LOG(logY, clk) + +NETLIST_END() |