summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/nl_base.h')
-rw-r--r--src/lib/netlist/nl_base.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index ba18104b2e4..53706060783 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -798,6 +798,8 @@ namespace netlist
const analog_net_t & net() const noexcept;
analog_net_t & net() noexcept;
+
+ solver::matrix_solver_t *solver() const noexcept;
};
// -----------------------------------------------------------------------------
@@ -834,7 +836,6 @@ namespace netlist
}
void solve_now();
- void schedule_solve_after(netlist_time after) noexcept;
void set_ptrs(nl_fptype *gt, nl_fptype *go, nl_fptype *Idr) noexcept(false);
@@ -945,6 +946,11 @@ namespace netlist
solver::matrix_solver_t *solver() const noexcept { return m_solver; }
void set_solver(solver::matrix_solver_t *solver) noexcept { m_solver = solver; }
+ friend constexpr bool operator==(const analog_net_t &lhs, const analog_net_t &rhs) noexcept
+ {
+ return &lhs == &rhs;
+ }
+
private:
state_var<nl_fptype> m_cur_Analog;
solver::matrix_solver_t *m_solver;
@@ -1940,6 +1946,13 @@ namespace netlist
return static_cast<analog_net_t &>(core_terminal_t::net());
}
+ inline solver::matrix_solver_t *analog_t::solver() const noexcept
+ {
+ if (this->has_net())
+ return net().solver();
+ return nullptr;
+ }
+
inline nl_fptype terminal_t::operator ()() const noexcept { return net().Q_Analog(); }
inline void terminal_t::set_ptrs(nl_fptype *gt, nl_fptype *go, nl_fptype *Idr) noexcept(false)