summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/core/device.h
blob: 241325970d29a6911d4d423d1c23b296f4d354cb (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
// license:GPL-2.0+
// copyright-holders:Couriersud

///
/// \file device.h
///

#ifndef NL_DEVICE_H_
#define NL_DEVICE_H_

#include "core_device.h"
#include "param.h"

namespace netlist
{
	// -----------------------------------------------------------------------------
	// device_t
	// -----------------------------------------------------------------------------

	class device_t : public base_device_t,
					 public logic_family_t
	{
	public:
		device_t(netlist_state_t &owner, const pstring &name);
		device_t(netlist_state_t &owner, const pstring &name,
			const pstring &model);
		// only needed by proxies
		device_t(netlist_state_t &owner, const pstring &name,
			const logic_family_desc_t *desc);

		device_t(device_t &owner, const pstring &name);
		// pass in a default model - this may be overwritten by PARAM(DEVICE.MODEL, "XYZ(...)")
		device_t(device_t &owner, const pstring &name,
			const pstring &model);

		PCOPYASSIGNMOVE(device_t, delete)

		~device_t() noexcept override = default;

	protected:

		//NETLIB_UPDATE_TERMINALSI() { }
	private:
		param_model_t m_model;
	};

} // namespace netlist


#endif // NL_DEVICE_H_