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/opamp.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/opamp.c')
-rw-r--r-- | nl_examples/opamp.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nl_examples/opamp.c b/nl_examples/opamp.c index 2d960888f2e..57daf960e9c 100644 --- a/nl_examples/opamp.c +++ b/nl_examples/opamp.c @@ -19,10 +19,8 @@ NETLIST_START(opamp) /* Standard stuff */ - CLOCK(clk) - PARAM(clk.FREQ, 1000) // 1000 Hz - SOLVER(Solver) - PARAM(Solver.FREQ, 48000) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) PARAM(Solver.ACCURACY, 1e-6) /* Wiring up the opamp */ @@ -40,9 +38,9 @@ NETLIST_START(opamp) PARAM(EBUF.RO, 50) PARAM(EBUF.G, 1) - NET_ALIAS(PLUS, G1.IP) // Positive input - NET_ALIAS(MINUS, G1.IN) // Negative input - NET_ALIAS(OUT, EBUF.OP) // Opamp output ... + ALIAS(PLUS, G1.IP) // Positive input + ALIAS(MINUS, G1.IN) // Negative input + ALIAS(OUT, EBUF.OP) // Opamp output ... NET_C(EBUF.ON, GND) @@ -55,6 +53,10 @@ NETLIST_START(opamp) NET_C(CP1.1, RP1.1) NET_C(EBUF.IP, RP1.1) + RES(RL, 1000) + NET_C(RL.2, GND) + NET_C(RL.1, OUT) + //LOG(logX, OUT) - //LOG(logY, 4V) + //LOG(logY, clk) NETLIST_END() |