summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/netlist/analog/nlid_fourterm.h2
-rw-r--r--src/lib/netlist/examples/cccs.cpp (renamed from src/lib/netlist/examples/cccs.c)16
-rw-r--r--src/lib/netlist/macro/nlm_other.cpp4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/netlist/analog/nlid_fourterm.h b/src/lib/netlist/analog/nlid_fourterm.h
index 862fe8f79e5..6d5dadd8e08 100644
--- a/src/lib/netlist/analog/nlid_fourterm.h
+++ b/src/lib/netlist/analog/nlid_fourterm.h
@@ -128,7 +128,7 @@ namespace analog {
public:
NETLIB_CONSTRUCTOR_DERIVED_PASS(CCCS, VCCS, nlconst::one())
{
- m_gfac = plib::reciprocal(m_RI());
+ m_gfac = -plib::reciprocal(m_RI());
}
NETLIB_RESETI();
diff --git a/src/lib/netlist/examples/cccs.c b/src/lib/netlist/examples/cccs.cpp
index 2c7833b19f3..02cccd1736e 100644
--- a/src/lib/netlist/examples/cccs.c
+++ b/src/lib/netlist/examples/cccs.cpp
@@ -1,7 +1,7 @@
-// license:GPL-2.0+
+// license:CC0
// copyright-holders:Couriersud
/*
- * cccs.c
+ * cccs.cpp
*
*/
@@ -15,19 +15,19 @@ NETLIST_START(cccs)
PARAM(Solver.ACCURACY, 1e-12)
PARAM(Solver.METHOD, "MAT_CR")
- CCCS(VV)
- PARAM(VV.G, 1)
+ ANALOG_INPUT(V5,5)
+ CCCS(VV, 0.9)
PARAM(VV.RI, 1e-3)
RES(R2, 1000)
RES(R1, 1000)
+
+ NET_C(V5, clk.VCC)
NET_C(clk, VV.IP)
NET_C(VV.IN, R1.1)
- NET_C(R1.2, GND)
+ NET_C(GND, R1.2, R2.2, VV.OP, clk.GND)
- NET_C(R2.1, VV.OP)
- NET_C(R2.2, GND)
- NET_C(VV.ON, GND)
+ NET_C(R2.1, VV.ON)
/* Simple current source */
diff --git a/src/lib/netlist/macro/nlm_other.cpp b/src/lib/netlist/macro/nlm_other.cpp
index 2a2478341ad..401fe7fc172 100644
--- a/src/lib/netlist/macro/nlm_other.cpp
+++ b/src/lib/netlist/macro/nlm_other.cpp
@@ -86,8 +86,8 @@ NETLIST_END()
static NETLIST_START(NE566_DIP)
VCVS(VI, 1)
- CCCS(CI1, 1)
- CCCS(CI2, -1)
+ CCCS(CI1, -1)
+ CCCS(CI2, 1)
SYS_COMPD(COMP)
SYS_DSW2(SW)
VCVS(VO, 1)