summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/examples
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2020-04-30 17:01:11 -0700
committer couriersud <couriersud@gmx.org>2020-05-01 10:08:40 +0200
commit2b0aaee3ed4b85803e23d2f594728686107122bf (patch)
tree2e2c40342be7ad51adc3a4f36ba5c30bb7e5acce /src/lib/netlist/examples
parent13f6e92cec9bba6a96464e382f97d14e28628290 (diff)
Add 74393 device and unit test.
Diffstat (limited to 'src/lib/netlist/examples')
-rw-r--r--src/lib/netlist/examples/nld_74393_test.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/netlist/examples/nld_74393_test.c b/src/lib/netlist/examples/nld_74393_test.c
new file mode 100644
index 00000000000..5dd33c6fce3
--- /dev/null
+++ b/src/lib/netlist/examples/nld_74393_test.c
@@ -0,0 +1,32 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
+/*
+ * cdelay.c
+ *
+ */
+
+#include "netlist/devices/net_lib.h"
+
+NETLIST_START(perf)
+
+ SOLVER(Solver, 48000)
+
+ ANALOG_INPUT(V5, 5)
+
+ CLOCK(CLK, 100) // clock for driving the 74393
+ CLOCK(CLK2, 3) // off-beat clock for master reset
+ TTL_74393_DIP(TESTCHIP)
+
+ NET_C(V5, CLK.VCC, CLK2.VCC, TESTCHIP.14)
+ NET_C(GND, CLK.GND, CLK2.GND, TESTCHIP.7)
+
+ NET_C(CLK, TESTCHIP.1, TESTCHIP.13)
+ NET_C(CLK2, TESTCHIP.2, TESTCHIP.12)
+
+ LOG(logclk, CLK)
+ LOG(logQ0, TESTCHIP.3)
+ LOG(logQ1, TESTCHIP.4)
+ LOG(logQ2, TESTCHIP.5)
+ LOG(logQ3, TESTCHIP.6)
+
+NETLIST_END()