1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
// 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
|