summaryrefslogtreecommitdiffstatshomepage
path: root/nl_examples
diff options
context:
space:
mode:
author Couriersud <couriersud@users.noreply.github.com>2014-05-06 22:37:20 +0000
committer Couriersud <couriersud@users.noreply.github.com>2014-05-06 22:37:20 +0000
commit1f70685652ee48e3a1f978bc6cb52abaefbb13c8 (patch)
tree420a6993910a7187431a40af29ef582ac420a3d9 /nl_examples
parent6e59e2899653a39df1bee9571f18ee4f4d921025 (diff)
Added first draft of 74123 to netlist code.
Diffstat (limited to 'nl_examples')
-rw-r--r--nl_examples/74123_mstable.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/nl_examples/74123_mstable.c b/nl_examples/74123_mstable.c
new file mode 100644
index 00000000000..1cdd296e99a
--- /dev/null
+++ b/nl_examples/74123_mstable.c
@@ -0,0 +1,45 @@
+/*
+ * 74123_mstable.c
+ *
+ */
+
+#include "netlist/devices/net_lib.h"
+
+NETLIST_START(74123_mstable)
+
+ /*
+ * Monoflog
+ *
+ */
+
+ /* Standard stuff */
+
+ SOLVER(Solver, 48000)
+
+ ANALOG_INPUT(V5, 5) // 5V
+
+ /* Wiring up the 74123 */
+
+ CLOCK(clk, 500)
+ TTL_74123(mf)
+
+ RES(R, 1000)
+ CAP(C, 1e-6)
+
+ NET_C(GND, mf.GND)
+ NET_C(V5, mf.VCC)
+
+ NET_C(C.1, mf.C)
+ NET_C(mf.C, GND)
+ NET_C(C.2, mf.RC, R.2)
+ NET_C(R.1, V5)
+
+ NET_C(mf.CLRQ, V5)
+ NET_C(mf.B, V5)
+ NET_C(mf.A, clk.Q)
+
+ //LOG(logC, C.2)
+ //LOG(logQ, mf.Q)
+ //LOG(logX, clk.Q)
+
+NETLIST_END()