diff options
author | 2016-07-01 02:09:14 +0200 | |
---|---|---|
committer | 2016-07-01 02:09:14 +0200 | |
commit | caafc0f7823054c21a67f096650b2f4a333469c3 (patch) | |
tree | bff4849aa0c539fa0cc06ed630f83fd949e37ebc /nl_examples/cdelay.c | |
parent | 1f0dc8903f8b865107af2e74758b0ad042c2a8b5 (diff) |
Netlist improvements:
- nltool now accepts -Ddefine=value to pass on to netlists
- improved option handling and added "dummy" options to add grouping and
examples in help output.
- improved --cmd=listdevices output
- Fix dynamic timestepping. This will work with breakout using real
capacitor modelling instead of delay devices. Really slow, but very
useful to calibrate timings.
- Fix an awful bug in timing for delay devices.
- Switched to clang 3.8 and made code compile with
-Weverything -Werror -Wno-old-style-cast -Wno-padded -Wno-weak-vtables
-Wno-missing-variable-declarations -Wno-conversion -Wno-c++98-compat
-Wno-float-equal -Wno-cast-align -Wno-global-constructors
-Wno-c++98-compat-pedantic -Wno-exit-time-destructors
-Wno-format-nonliteral -Wno-weak-template-vtables
This was a helpful exercise since it brought forward some
serious issues with implicit constructors.
[Couriersud]
Diffstat (limited to 'nl_examples/cdelay.c')
-rw-r--r-- | nl_examples/cdelay.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nl_examples/cdelay.c b/nl_examples/cdelay.c index 927a7cfe0a4..d6d3f614478 100644 --- a/nl_examples/cdelay.c +++ b/nl_examples/cdelay.c @@ -17,8 +17,15 @@ NETLIST_START(perf) NETLIST_END() +#ifndef P_FREQ +#define P_FREQ 4800 +#endif -NETLIST_START(7400_astable) +#ifndef P_DTS +#define P_DTS 1 +#endif + +NETLIST_START(cap_delay) /* * delay circuit @@ -27,18 +34,20 @@ NETLIST_START(7400_astable) /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, P_FREQ) PARAM(Solver.ACCURACY, 1e-20) + PARAM(Solver.DYNAMIC_TS, P_DTS) + PARAM(Solver.MIN_TIMESTEP, 1e-6) CLOCK(clk, 5000) TTL_7400_NAND(n1,clk,clk) - CAP(C, 1e-9) + CAP(C, 1e-6) NET_C(n1.Q, C.2) NET_C(GND, C.1) TTL_7400_NAND(n2,n1.Q, n1.Q) LOG(logclk, clk) LOG(logn1Q, C.2) - LOG(logn2Q, n2.Q) + LOG(logn2Q, n1.Q) NETLIST_END() |