blob: 2b5ba415940887c7df8ffb2898ac04a16c144d5e (
plain) (
blame)
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
|
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
* nld_74192.h
*
* DM74192: Synchronous 4-Bit Binary Counter with Dual Clock
* Decade counter
*
* FIXME: This should be merged with the 74193 which counts to 16
*
* +--------------+
* B |1 ++ 16| VCC
* QB |2 15| A
* QA |3 14| CLEAR
* CD |4 74192 13| BORROWQ
* CU |5 12| CARRYQ
* QC |6 11| LOADQ
* QD |7 10| C
* GND |8 9| D
* +--------------+
*
* CD: Count up
* CU: Count down
*
* Naming conventions follow National Semiconductor datasheet
*
*/
#ifndef NLD_74192_H_
#define NLD_74192_H_
#include "../nl_base.h"
#include "nld_9316.h"
#define TTL_74192(_name) \
NET_REGISTER_DEV(74192, _name)
#define TTL_74192_DIP(_name) \
NET_REGISTER_DEV(74192_dip, _name)
NETLIB_DEVICE(74192,
ATTR_HOT void update_outputs();
NETLIB_NAME(9316_subABCD) m_ABCD;
netlist_ttl_input_t m_CLEAR;
netlist_ttl_input_t m_LOADQ;
netlist_ttl_input_t m_CU;
netlist_ttl_input_t m_CD;
netlist_state_t<INT8> m_cnt;
netlist_state_t<UINT8> m_last_CU;
netlist_state_t<UINT8> m_last_CD;
netlist_ttl_output_t m_Q[4];
netlist_ttl_output_t m_BORROWQ;
netlist_ttl_output_t m_CARRYQ;
);
NETLIB_DEVICE_DERIVED(74192_dip, 74192,
);
#endif /* NLD_74192_H_ */
|