/// \brief logic output constructor /// /// The third parameter does nothing. It is provided only for /// compatibility with tristate_output_t in templatized device models /// /// \param dev Device owning this output /// \param aname The name of this output /// \param dummy Dummy parameter to allow construction like tristate output /// public logic_output_t(device_t dev, string aname, bool dummy = false) : base(dev, aname, state_e.STATE_OUT, null) //: logic_t(dev, aname, STATE_OUT, nldelegate()) { m_my_net = new logic_net_t(dev.state(), name() + ".net", this); //plib::unused_var(dummy); this.set_net(m_my_net); state().register_net(m_my_net); //state().register_net(device_arena::owned_ptr<logic_net_t>(&m_my_net, false)); state().setup().register_term(this); }
//void enable_stats(bool val) noexcept { m_use_stats = val; } //template <bool KEEP_STATS> void process_queue_stats(bool KEEP_STATS, netlist_time_ext delta) //void process_queue_stats(netlist_time_ext delta) noexcept; { netlist_time_ext stop = m_time + delta; qpush(new queue_t_entry_t(stop, null)); if (m_mainclock == null) { m_time = m_queue.top().exec_time(); detail.net_t obj = m_queue.top().object_(); m_queue.pop(); while (obj != null) { obj.update_devs(KEEP_STATS); //throw new emu_unimplemented(); #if false if (KEEP_STATS) { m_perf_out_processed.inc(); } #endif queue_t_entry_t top = m_queue.top(); m_time = top.exec_time(); obj = top.object_(); m_queue.pop(); } } else { logic_net_t mc_net = m_mainclock.m_Q.net(); netlist_time inc = m_mainclock.m_inc; netlist_time_ext mc_time = mc_net.next_scheduled_time(); do { queue_t_entry_t top = m_queue.top(); while (top.exec_time() > mc_time) { m_time = mc_time; mc_net.toggle_new_Q(); mc_net.update_devs(KEEP_STATS); top = m_queue.top(); mc_time += inc; } m_time = top.exec_time(); detail.net_t obj = top.object_(); m_queue.pop(); if (!!(obj == null)) { break; } obj.update_devs(KEEP_STATS); //throw new emu_unimplemented(); #if false if (KEEP_STATS) { m_perf_out_processed.inc(); } #endif } while (true); mc_net.set_next_scheduled_time(mc_time); } }