// license:BSD-3-Clause // copyright-holders:Couriersud /* * nld_9316.cpp * * DM9316: Synchronous 4-Bit Counters * * +--------------+ * /CLEAR |1 ++ 16| VCC * CLOCK |2 15| RC (Ripple Carry) * A |3 14| QA * B |4 9316 13| QB * C |5 12| QC * D |6 11| QD * Enable P |7 10| Enable T * GND |8 9| /LOAD * +--------------+ * * Counter Sequence * * +-------++----+----+----+----+----+ * | COUNT || QD | QC | QB | QA | RC | * +=======++====+====+====+====+====+ * | 0 || 0 | 0 | 0 | 0 | 0 | * | 1 || 0 | 0 | 0 | 1 | 0 | * | 2 || 0 | 0 | 1 | 0 | 0 | * | 3 || 0 | 0 | 1 | 1 | 0 | * | 4 || 0 | 1 | 0 | 0 | 0 | * | 5 || 0 | 1 | 0 | 1 | 0 | * | 6 || 0 | 1 | 1 | 0 | 0 | * | 7 || 0 | 1 | 1 | 1 | 0 | * | 8 || 1 | 0 | 0 | 0 | 0 | * | 9 || 1 | 0 | 0 | 1 | 0 | * | 10 || 1 | 0 | 1 | 0 | 0 | * | 11 || 1 | 0 | 1 | 1 | 0 | * | 12 || 1 | 1 | 0 | 0 | 0 | * | 13 || 1 | 1 | 0 | 1 | 0 | * | 14 || 1 | 1 | 1 | 0 | 0 | * | 15 || 1 | 1 | 1 | 1 | 1 | * +-------++----+----+----+----+----+ * * Reset count function: Please refer to * National Semiconductor datasheet (timing diagram) * * Naming conventions follow National Semiconductor datasheet * * DM9310: Synchronous 4-Bit Counters * * +--------------+ * CLEAR |1 ++ 16| VCC * CLOCK |2 15| RC (Ripple Carry) * A |3 14| QA * B |4 9310 13| QB * C |5 12| QC * D |6 11| QD * Enable P |7 10| Enable T * GND |8 9| LOAD * +--------------+ * * Counter Sequence * * +-------++----+----+----+----+----+ * | COUNT || QD | QC | QB | QA | RC | * +=======++====+====+====+====+====+ * | 0 || 0 | 0 | 0 | 0 | 0 | * | 1 || 0 | 0 | 0 | 1 | 0 | * | 2 || 0 | 0 | 1 | 0 | 0 | * | 3 || 0 | 0 | 1 | 1 | 0 | * | 4 || 0 | 1 | 0 | 0 | 0 | * | 5 || 0 | 1 | 0 | 1 | 0 | * | 6 || 0 | 1 | 1 | 0 | 0 | * | 7 || 0 | 1 | 1 | 1 | 0 | * | 8 || 1 | 0 | 0 | 0 | 0 | * | 9 || 1 | 0 | 0 | 1 | 0 | * +-------++----+----+----+----+----+ * * Reset count function: Please refer to * National Semiconductor datasheet (timing diagram) * * Naming conventions follow National Semiconductor datasheet * */ #include "nl_base.h" #include "nl_factory.h" #include "nld_9316_base.hxx" // FIXME: All detail can be found in nld_9316_base.hxx // At least gcc-7.x needs the implementations of the base device // in different compilation units. If created in the same file // performance degrades horrible. // FIXME: this file could be created programmatically namespace netlist::devices { NETLIB_DEVICE_IMPL(9316, "TTL_9316", "+CLK,+ENP,+ENT,+CLRQ,+LOADQ,+A,+B,+C,+D,@VCC,@GND") } // namespace netlist::devices