Fix usage of "temp" instead of "temper" in spice models.
Fixes https://github.com/google/skywater-pdk/issues/171.
In ngspice (and also spectre), temperature that appears in a parameter
equation should use the name "temper", not "temp".
Signed-off-by: diadatp <admin@diadatp.com>
Signed-off-by: Stefan Schippers <schippes@mazinga.lan>
Signed-off-by: Tim Edwards <tim@opencircuitdesign.com>
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po.model.spice
new file mode 100644
index 0000000..6652ae1
--- /dev/null
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po.model.spice
@@ -0,0 +1,37 @@
+* Copyright 2020 The SkyWater PDK Authors
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* https://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+
+* SKY130 Spice File.
+* statistics {
+* mismatch {
+* }
+* }
+.subckt sky130_fd_pr__res_high_po r0 r1
++ w=1 l=1
+.param mult = 1.0
++ rsheet = 317.3885
++ rbody_dw = -0.001
++ rhead_ps = 345.8312
++ mm_const = {(w<0.69)?0.1:0.2}
++ body_pelgrom = 0.03552
++ head_pelgrom = 0.0761
++ num_con_row = {max(floor(0.5+(w-0.33)/0.36),1)}
++ rbody_match = {body_pelgrom/sqrt(w*l*mult)*sky130_fd_pr__res_high_po__slope_spectre}
++ rend_match = {head_pelgrom/sqrt((w+0.525)*num_con_row*mult)*sky130_fd_pr__res_high_po__con_slope_spectre}
++ weff = {w+rbody_dw-0.0672*max(0.69-w,0)}
++ rbody = {rsheet*(l+0.247)/weff*(1+rbody_match)}
++ rhead = {rhead_ps/(weff+0.1558)*(1+rend_match)}
+rbody r0 rb r = {rbody*(1+v(r0,r1))}
+rhead rb r1 r = {rhead}
+.ends sky130_fd_pr__res_high_po
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po_0p35.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po_0p35.model.spice
index 904e558..0792cae 100644
--- a/cells/res_high_po/sky130_fd_pr__res_high_po_0p35.model.spice
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po_0p35.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_high_po_0p35 r0 r1 b
+
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po_0p69.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po_0p69.model.spice
index 66b9e0e..5f5443f 100644
--- a/cells/res_high_po/sky130_fd_pr__res_high_po_0p69.model.spice
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po_0p69.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_high_po_0p69 r0 r1 b
+
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po_1p41.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po_1p41.model.spice
index f295eee..9d80694 100644
--- a/cells/res_high_po/sky130_fd_pr__res_high_po_1p41.model.spice
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po_1p41.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_high_po_1p41 r0 r1 b
+
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po_2p85.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po_2p85.model.spice
index 1787c39..9f167a4 100644
--- a/cells/res_high_po/sky130_fd_pr__res_high_po_2p85.model.spice
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po_2p85.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_high_po_2p85 r0 r1 b
+
diff --git a/cells/res_high_po/sky130_fd_pr__res_high_po_5p73.model.spice b/cells/res_high_po/sky130_fd_pr__res_high_po_5p73.model.spice
index 1789808..984823d 100644
--- a/cells/res_high_po/sky130_fd_pr__res_high_po_5p73.model.spice
+++ b/cells/res_high_po/sky130_fd_pr__res_high_po_5p73.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_high_po_5p73 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p35.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p35.model.spice
index 3a0a593..7de8040 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p35.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p35.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po_0p35 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p69.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p69.model.spice
index c7956dd..6e62c24 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p69.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p69.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po_0p69 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_1p41.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_1p41.model.spice
index fd6311f..5789252 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_1p41.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_1p41.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po_1p41 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_2p85.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_2p85.model.spice
index 69abb02..f1db674 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_2p85.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_2p85.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po_2p85 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_5p73.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_5p73.model.spice
index f7586fc..8cfb799 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_5p73.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_5p73.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po_5p73 r0 r1 b
+
diff --git a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po__base.model.spice b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po__base.model.spice
index c1f470e..9a27020 100644
--- a/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po__base.model.spice
+++ b/cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po__base.model.spice
@@ -14,8 +14,8 @@
* SKY130 Spice File.
* statistics {
-* mismatch {
-* }
+* mismatch {
+* }
* }
.subckt sky130_fd_pr__res_xhigh_po__base r1 r2 b
+
diff --git a/models/sky130_fd_pr__model__linear.model.spice b/models/sky130_fd_pr__model__linear.model.spice
index 3dbd8e8..c352622 100644
--- a/models/sky130_fd_pr__model__linear.model.spice
+++ b/models/sky130_fd_pr__model__linear.model.spice
@@ -16,11 +16,12 @@
.param sky130_fd_pr__res_high_po__slope_spectre = 0.0
.param sky130_fd_pr__res_high_po__con_slope_spectre = 0.0
* statistics {
-* mismatch {
-* vary sky130_fd_pr__res_high_po__slope_spectre dist=gauss std=1.0
-* vary sky130_fd_pr__res_high_po__con_slope_spectre dist=gauss std=1.0
-* }
+* mismatch {
+* vary sky130_fd_pr__res_high_po__slope_spectre dist=gauss std=1.0
+* vary sky130_fd_pr__res_high_po__con_slope_spectre dist=gauss std=1.0
+* }
* }
+.include "../cells/res_high_po/sky130_fd_pr__res_high_po.model.spice"
.include "../cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p35.model.spice"
.include "../cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_0p69.model.spice"
.include "../cells/res_xhigh_po/sky130_fd_pr__res_xhigh_po_1p41.model.spice"