Ejemplo n.º 1
0
 public param_str_t(netlist_state_t state, string name, string val)
     : base(name)
 {
     // deviceless parameter, no registration, owner is responsible
     m_param = val;                                                   //m_param = plib::make_unique<pstring, host_arena>(val);
     m_param = state.setup().get_initial_param_val(this.name(), val); //*m_param = state.setup().get_initial_param_val(this->name(),val);
 }
Ejemplo n.º 2
0
        void core_device_t_after_ctor(netlist_state_t owner, string name)
        {
            m_hint_deactivate = false;
            m_active_outputs  = new state_var_s32(this, "m_active_outputs", 1);


            if (exec().stats_enabled())
            {
                m_stats = new stats_t();  //m_stats = owner.make_pool_object<stats_t>();
            }
        }
Ejemplo n.º 3
0
        public void device_t_after_ctor(netlist_state_t owner, string name, string model)
        //: base(owner, name)
        {
            m_model = new param_model_t(this, "MODEL", model);


            set_logic_family(state().setup().family_from_model(m_model.op()));
            if (logic_family() == null)
            {
                throw new nl_exception(MF_NULLPTR_FAMILY(this.name(), m_model.op()));
            }
        }
Ejemplo n.º 4
0
        // only needed by proxies
        public void device_t_after_ctor(netlist_state_t owner, string name, logic_family_desc_t desc)
        //: base(owner, name)
        {
            m_model = new param_model_t(this, "MODEL", "");


            set_logic_family(desc);
            if (logic_family() == null)
            {
                throw new nl_exception(MF_NULLPTR_FAMILY(this.name(), "<pointer provided by constructor>"));
            }
        }
Ejemplo n.º 5
0
        // performance
        //plib::pperftime_t<true>             m_stat_mainloop;
        //plib::pperfcount_t<true>            m_perf_out_processed;


        public netlist_t(netlist_state_t state, string aname)
        {
            m_state     = state;
            m_solver    = null;
            m_time      = netlist_time_ext.zero();
            m_mainclock = null;
            m_use_stats = false;
            m_queue     = new queue_t(config.MAX_QUEUE_SIZE,
                                      (net) => { return(state.find_net_id(net)); }, //detail::queue_t::id_delegate(&netlist_state_t :: find_net_id, &state),
                                      (id) => { return(state.net_by_id(id)); });    //detail::queue_t::obj_delegate(&netlist_state_t :: net_by_id, &state))


            state.save(this, (plib.state_manager_t.callback_t)m_queue, aname, "m_queue");
            state.save(this, m_time, aname, "m_time");
        }
Ejemplo n.º 6
0
        public override devices.nld_base_a_to_d_proxy create_a_d_proxy(netlist_state_t anetlist, string name, logic_input_t proxied)  //device_arena::unique_ptr<devices::nld_base_a_to_d_proxy> create_a_d_proxy(netlist_state_t &anetlist, const pstring &name, const logic_input_t *proxied) const override
        {
            switch (m_family_type)
            {
            case family_type.CUSTOM:
            case family_type.TTL:
            case family_type.MOS:
            case family_type.CMOS:
            case family_type.NMOS:
            case family_type.PMOS:
                return(new devices.nld_a_to_d_proxy(anetlist, name, proxied));     //return anetlist.make_pool_object<devices::nld_a_to_d_proxy>(anetlist, name, proxied);
            }

            return(new devices.nld_a_to_d_proxy(anetlist, name, proxied));  //return anetlist.make_pool_object<devices::nld_a_to_d_proxy>(anetlist, name, proxied);
        }
Ejemplo n.º 7
0
        //using detail::net_t::Q;
        //using detail::net_t::initial;
        //using detail::net_t::set_Q_and_push;
        //using detail::net_t::set_Q_time;


        public logic_net_t(netlist_state_t nl, string aname, detail.core_terminal_t railterminal = null)
            : base(nl, aname, railterminal)
        {
        }
Ejemplo n.º 8
0
 // ----------------------------------------------------------------------------------------
 // analog_net_t
 // ----------------------------------------------------------------------------------------
 public analog_net_t(netlist_state_t nl, string aname, detail.core_terminal_t railterminal = null)
     : base(nl, aname, railterminal)
 {
     m_cur_Analog = new state_var <Pointer <nl_fptype> >(this, "m_cur_Analog", new Pointer <nl_fptype>(new std.vector <nl_fptype>(1)));  //, m_cur_Analog(*this, "m_cur_Analog", nlconst::zero())
     m_solver     = null;
 }
Ejemplo n.º 9
0
        public abstract devices.nld_base_d_to_a_proxy create_d_a_proxy(netlist_state_t anetlist, string name, logic_output_t proxied); //virtual device_arena::unique_ptr<devices::nld_base_d_to_a_proxy> create_d_a_proxy(netlist_state_t &anetlist, const pstring &name, const logic_output_t *proxied) const = 0;

        public abstract devices.nld_base_a_to_d_proxy create_a_d_proxy(netlist_state_t anetlist, string name, logic_input_t proxied);  //virtual device_arena::unique_ptr<devices::nld_base_a_to_d_proxy> create_a_d_proxy(netlist_state_t &anetlist, const pstring &name, const logic_input_t *proxied) const = 0;