summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_7427.cpp
blob: fb193f746790f7f5bb6c8ece0c626f8a9c8dc5d6 (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
63
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
 * nld_7427.c
 *
 */

#include "nld_7427.h"

#include "nld_7402.h"

NETLIB_NAMESPACE_DEVICES_START()

#if (USE_TRUTHTABLE)
nld_7427::truthtable_t nld_7427::m_ttbl;
const char *nld_7427::m_desc[] = {
		"A,B,C|Q ",
		"0,0,0|1|22",
		"1,X,X|0|15",
		"X,1,X|0|15",
		"X,X,1|0|15",
		""
};
#endif

NETLIB_START(7427_dip)
{
	register_sub("1", m_1);
	register_sub("2", m_2);
	register_sub("3", m_3);

	register_subalias("1", m_1.m_I[0]);
	register_subalias("2", m_1.m_I[1]);
	register_subalias("3", m_2.m_I[0]);
	register_subalias("4", m_2.m_I[1]);
	register_subalias("5", m_2.m_I[2]);
	register_subalias("6", m_2.m_Q[0]);

	register_subalias("8", m_3.m_Q[0]);
	register_subalias("9", m_3.m_I[0]);
	register_subalias("10", m_3.m_I[1]);
	register_subalias("11", m_3.m_I[2]);

	register_subalias("12", m_1.m_Q[0]);
	register_subalias("13", m_1.m_I[2]);
}

NETLIB_UPDATE(7427_dip)
{
	/* only called during startup */
	m_1.update_dev();
	m_2.update_dev();
	m_3.update_dev();
}

NETLIB_RESET(7427_dip)
{
	m_1.do_reset();
	m_2.do_reset();
	m_3.do_reset();
}

NETLIB_NAMESPACE_DEVICES_END()