Fixed the preproc.py script to be able to handle non-ASCII data,
as some files like the klayout files are using UTF-8 encoding, and
the last update to a klayout file broke the open_pdks install. For
now, this is an option to the preprocessor script ('-utf'), but it
could and probably should just be the default setting. Likewise
modified the staging install script so that substitutions can be
made on files containing the occasional non-ASCII characters. Also
in this update: Corrections to the handling of RERAM in the magic
techfile.
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index c7b24b3..f4e7bb3 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -732,9 +732,12 @@
mkdir -p ${KLAYOUT_STAGING_A}
rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
- ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
- ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
- cp klayout/${TECH}.lydrc ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc
+ ${CPP} -utf8 ${SKY130A_DEFS} klayout/${TECH}.lyp \
+ ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
+ ${CPP} -utf8 ${SKY130A_DEFS} klayout/${TECH}.lyt \
+ ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
+ ${CPP} -utf8 ${SKY130A_DEFS} klayout/${TECH}.lydrc \
+ ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc
#./custom/scripts/gen_run_drc.py -l ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc \
# -o ${KLAYOUT_STAGING_A}/${SKY130A}.drc
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech
index 7289548..74c730b 100644
--- a/sky130/magic/sky130.tech
+++ b/sky130/magic/sky130.tech
@@ -661,10 +661,31 @@
compose pfet poly pdiff
compose var poly nsd
+ decompose npass poly ndiff
+ decompose npd poly ndiff
+ decompose scnfet poly ndiff
+ decompose nfetlvt poly ndiff
+ decompose nsonos poly ndiff
+
+ decompose ppu poly pdiff
+ decompose scpfet poly pdiff
+ decompose scpfethvt poly pdiff
+ decompose pfethvt poly pdiff
+ decompose pfetlvt poly pdiff
+ decompose pfetmvt poly pdiff
+ decompose corenvar poly nsd
+ decompose corepvar poly psd
+ decompose varhvt poly nsd
+
compose mvnfet poly mvndiff
compose mvpfet poly mvpdiff
compose mvvar poly mvnsd
+ decompose nnfet poly mvndiff
+ decompose mvnfetesd poly mvndiff
+ decompose mvnnfet poly mvndiff
+ decompose mvpfetesd poly mvpdiff
+
paint obsmcon locali via1
paint obsmcon obsm1 obsli,obsm1
@@ -698,6 +719,10 @@
paint coreli psc psc
paint coreli viali viali
+#ifdef RERAM
+ paint reram metal2 reram
+#endif (RERAM)
+
#ifdef METAL5
paint m4 obsm4 m4
paint m5 obsm5 m5
@@ -1235,6 +1260,18 @@
squares-grid 55 150 170
calma 68 44
+#ifdef RERAM
+#undef RERAM
+ layer VIA1 reram
+ squares-grid 55 150 170
+ calma 68 44
+
+ layer RERAM reram
+ squares-grid 55 230 230
+ calma 201 20
+#define RERAM
+#endif (RERAM)
+
#----------------------------------------------------------------
# MET2
#----------------------------------------------------------------
@@ -1264,14 +1301,6 @@
squares-grid 40 200 200
calma 69 44
-#ifdef RERAM
-#undef RERAM
- layer RERAM reram
- squares-grid 55 230 230
- calma 201 20
-#define RERAM
-#endif (RERAM)
-
#----------------------------------------------------------------
# MET3
#----------------------------------------------------------------
@@ -4568,7 +4597,7 @@
# ReRAM
#--------------------------------------------------
- width reram 340 "ReRAM width < %d (rr1.1)"
+ width reram 260 "ReRAM width < %d (rr1.1)"
spacing reram reram 55 touching_illegal "ReRAM spacing < %d (rr1.2)"
surround reram *m1,rm1 30 directional \
"Metal1 overlap of ReRAM < %d in one direction (via.5a - via.4a)"