diff options
author | 2014-05-15 22:50:40 +0000 | |
---|---|---|
committer | 2014-05-15 22:50:40 +0000 | |
commit | f3cf3a8e78a00abacbbb645332f12da18af9cda5 (patch) | |
tree | a7a6e4c42ab99a970fd638856e6f0e2bae8d520a /nl_examples/cdelay.c | |
parent | 3b5b4fd0eae0ab2f30cf9482aa33a7e41da7f747 (diff) |
Preliminary support for LTE dynamic time-stepping based on Local truncation error. This enables the possibility to connect a capacitor between ground and a TTL output and get a e.g. 100 ns delay with a 1nF capacitor.
Added an example circuit (cdelay.c)
Changed the log device to support nano-second granularity.
LTE is not yet enabled due to it's ugly test-state.
Diffstat (limited to 'nl_examples/cdelay.c')
-rw-r--r-- | nl_examples/cdelay.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nl_examples/cdelay.c b/nl_examples/cdelay.c new file mode 100644 index 00000000000..9a6bdcc1aff --- /dev/null +++ b/nl_examples/cdelay.c @@ -0,0 +1,31 @@ +/* + * cdelay.c + * + */ + +#include "netlist/devices/net_lib.h" + +NETLIST_START(7400_astable) + + /* + * delay circuit + * + */ + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-20) + CLOCK(clk, 5000) + + TTL_7400_NAND(n1,clk,clk) + CAP(C, 1e-9) + 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) + +NETLIST_END() |