From 380407258424a7e911be8115a14c681b515dd9eb Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 16 Mar 2018 21:26:58 +0100 Subject: [PATCH] admsva/bsim6.va, workaround adms issue, (beware of `<+ ddt(...)') if there is a ddt() expression in the rhs lhs <+ rhs then adms might not set the matrix correctly. It seems to work though, if ddt() is the only expression in rhs. Note, in bsim6.va the matrix slot [temp-node][temp-node] would need to be populated with the `gth' term. (see mdump) with the original expression this term disappeared. --- src/spicelib/devices/adms/bsim6/admsva/bsim6.va | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spicelib/devices/adms/bsim6/admsva/bsim6.va b/src/spicelib/devices/adms/bsim6/admsva/bsim6.va index 2a107c008..2e30174a4 100755 --- a/src/spicelib/devices/adms/bsim6/admsva/bsim6.va +++ b/src/spicelib/devices/adms/bsim6/admsva/bsim6.va @@ -4475,10 +4475,11 @@ end `ifdef __SHMOD__ if (SHMOD !=0 && RTH0 > 0) begin if (RDSMOD != 2) begin - Pwr(t) <+ -(devsign * sigvds * ids * V(`IntrinsicDrain, `IntrinsicSource) + V(d,`IntrinsicDrain) * V(d,`IntrinsicDrain) / Rdrain + V(s,`IntrinsicSource) * V(s,`IntrinsicSource) / Rsource) + ddt(delTemp1 * cth) + delTemp1 * gth; + Pwr(t) <+ -(devsign * sigvds * ids * V(`IntrinsicDrain, `IntrinsicSource) + V(d,`IntrinsicDrain) * V(d,`IntrinsicDrain) / Rdrain + V(s,`IntrinsicSource) * V(s,`IntrinsicSource) / Rsource) + delTemp1 * gth; end else begin - Pwr(t) <+ -(devsign * sigvds * ids * V(`IntrinsicDrain, `IntrinsicSource)) + ddt(delTemp1 * cth) + delTemp1 * gth; + Pwr(t) <+ -(devsign * sigvds * ids * V(`IntrinsicDrain, `IntrinsicSource)) + delTemp1 * gth; end + Pwr(t) <+ ddt(delTemp1 * cth); end `endif