summaryrefslogtreecommitdiffstatshomepage
path: root/nl_examples/diode.c
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-12-24 01:01:17 +0100
committer couriersud <couriersud@arcor.de>2016-12-24 01:01:17 +0100
commit522362e2d26654b9736ea311ce91edf1e133f964 (patch)
tree19d7f7bda8c7567a85f2bb47fcc12259030366b0 /nl_examples/diode.c
parent3506240e198084966715e1dcbe3e74d9a6e100e4 (diff)
Add some files to nl_examples. (nw)
Diffstat (limited to 'nl_examples/diode.c')
-rw-r--r--nl_examples/diode.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/nl_examples/diode.c b/nl_examples/diode.c
new file mode 100644
index 00000000000..9a2196c6f24
--- /dev/null
+++ b/nl_examples/diode.c
@@ -0,0 +1,31 @@
+/*
+ * diode.c
+ *
+ */
+
+
+#include "netlist/devices/net_lib.h"
+
+NETLIST_START(diode)
+ /* Standard stuff */
+
+ CLOCK(clk, 1000) // 1000 Hz
+ SOLVER(Solver, 48)
+ ANALOG_INPUT(V5, 5)
+
+ //DIODE(D, "1N914")
+ DIODE(D, "D(IS=1e-15)")
+
+ RES(R, RES_K(10))
+ RES(R1, RES_K(10))
+
+ NET_C(clk, D.K)
+ NET_C(D.A, R.1)
+ NET_C(R.2, V5)
+ NET_C(R1.2, GND)
+ NET_C(R.1, R1.1)
+
+ LOG(logB, clk)
+ LOG(logC, D.A)
+
+NETLIST_END()