Пример #1
0
logic_output_t::logic_output_t(core_device_t &dev, const pstring &aname)
	: logic_t(dev, aname, STATE_OUT)
	, m_my_net(dev.state(), name() + ".net", this)
{
	this->set_net(&m_my_net);
	state().register_net(pool_owned_ptr<logic_net_t>(&m_my_net, false));
	set_logic_family(dev.logic_family());
	state().setup().register_term(*this);
}
Пример #2
0
logic_output_t::logic_output_t(core_device_t &dev, const pstring &aname)
	: logic_t(dev, aname, OUTPUT)
	, m_my_net(dev.netlist(), name() + ".net", this)
{
	set_state(STATE_OUT);
	this->set_net(&m_my_net);
	set_logic_family(dev.logic_family());
	netlist().setup().register_term(*this);
}
Пример #3
0
core_device_t::core_device_t(core_device_t &owner, const pstring &name)
	: object_t(owner.name() + "." + name)
	, logic_family_t()
	, netlist_ref(owner.state())
	, m_hint_deactivate(false)
	, m_active_outputs(*this, "m_active_outputs", 1)
{
	set_logic_family(owner.logic_family());
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
	state().add_dev(this->name(), pool_owned_ptr<core_device_t>(this, false));
}
Пример #4
0
core_device_t::core_device_t(core_device_t &owner, const pstring &name)
	: object_t(owner.name() + "." + name)
	, logic_family_t()
	, netlist_ref(owner.netlist())
	, m_hint_deactivate(false)
#if (NL_PMF_TYPE > NL_PMF_TYPE_VIRTUAL)
	, m_static_update()
#endif
{
	set_logic_family(owner.logic_family());
	if (logic_family() == nullptr)
		set_logic_family(family_TTL());
	owner.netlist().m_devices.push_back(plib::owned_ptr<core_device_t>(this, false));
}
Пример #5
0
logic_input_t::logic_input_t(core_device_t &dev, const pstring &aname)
		: logic_t(dev, aname, INPUT)
{
	set_state(STATE_INP_ACTIVE);
	set_logic_family(dev.logic_family());
	netlist().setup().register_term(*this);
}
Пример #6
0
detail::core_terminal_t::core_terminal_t(core_device_t &dev, const pstring &aname, const type_t atype)
: device_object_t(dev, dev.name() + "." + aname, atype)
, plib::linkedlist_t<core_terminal_t>::element_t()
, m_net(nullptr)
, m_state(*this, "m_state", STATE_NONEX)
{
}
Пример #7
0
logic_input_t::logic_input_t(core_device_t &dev, const pstring &aname,
		nldelegate delegate)
		: logic_t(dev, aname, STATE_INP_ACTIVE, delegate)
{
	set_logic_family(dev.logic_family());
	state().setup().register_term(*this);
}
Пример #8
0
analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname)
	: analog_t(dev, aname, OUTPUT)
	, m_my_net(dev.netlist(), name() + ".net", this)
{
	this->set_net(&m_my_net);
	set_state(STATE_OUT);

	net().m_cur_Analog = NL_FCONST(0.0);
	netlist().setup().register_term(*this);
}
Пример #9
0
analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname)
	: analog_t(dev, aname, STATE_OUT)
	, m_my_net(dev.state(), name() + ".net", this)
{
	state().register_net(pool_owned_ptr<analog_net_t>(&m_my_net, false));
	this->set_net(&m_my_net);

	//net().m_cur_Analog = NL_FCONST(0.0);
	state().setup().register_term(*this);
}
Пример #10
0
ATTR_COLD analog_output_t::analog_output_t(core_device_t &dev, const pstring &aname)
	: analog_t(OUTPUT), m_proxied_net(nullptr)
{
	this->set_net(m_my_net);
	set_state(STATE_OUT);

	net().m_cur_Analog = NL_FCONST(0.99);

	analog_t::init_object(dev, aname);
	net().init_object(dev.netlist(), aname + ".net");
	net().register_railterminal(*this);
}
Пример #11
0
detail::core_terminal_t::core_terminal_t(core_device_t &dev, const pstring &aname,
		const state_e state, nldelegate delegate)
: device_object_t(dev, dev.name() + "." + aname)
, plib::linkedlist_t<core_terminal_t>::element_t()
, m_delegate(delegate)
#if USE_COPY_INSTEAD_OF_REFERENCE
, m_Q(*this, "m_Q", 0)
#endif
, m_net(nullptr)
, m_state(*this, "m_state", state)
{
}
Пример #12
0
ATTR_COLD void analog_output_t::init_object(core_device_t &dev, const pstring &aname)
{
	analog_t::init_object(dev, aname);
	net().init_object(dev.netlist(), aname + ".net");
	net().register_railterminal(*this);
}
Пример #13
0
ATTR_COLD void device_object_t::init_object(core_device_t &dev,
		const pstring &aname)
{
	object_t::init_object(dev.netlist(), aname);
	m_device = &dev;
}
Пример #14
0
detail::family_setter_t::family_setter_t(core_device_t &dev, const logic_family_desc_t *desc)
{
	dev.set_logic_family(desc);
}
Пример #15
0
detail::family_setter_t::family_setter_t(core_device_t &dev, const char *desc)
{
	dev.set_logic_family(dev.netlist().setup().family_from_model(desc));
}
Пример #16
0
detail::family_setter_t::family_setter_t(core_device_t &dev, const pstring &desc)
{
	dev.set_logic_family(dev.setup().family_from_model(desc));
}