Stefan Schippers
07/02/2022, 7:53 AMtop.sch
file (the welcome schematic that xschem loads on startup, showing all the primitives and test circuits) gets processed and changed (my guess is to remove reram instances). Unfortunately deletion of lines is not correct and some devices get partially deleted, xschem does not understand the remaining lines and writes some warnings.
I have attached the original top.sch (as it is in the xschem_sky130 github repo) and the installed sky130A top.sch. Image shows a side by side diff of one of the two modified sections of the file.
If you point me to the file doing the change i can help.
If you want to make things simpler i can remove all reram stuff from the welcome page (but still leaving the reram symbols and testbenches), so no processing is needed. This sounds the simplest thing to do.
Let me know, i can do the change immediately.Tim Edwards
07/02/2022, 1:59 PMopen_pdks/sky130/Makefile.in
lines 957 to 967:
# In the sky130A variant, remove the reram schematic/symbol and references
if test "x${XSCHEM_PATH}" != "x" ; then \
if test "x$*" == "xA" ; then \
rm -f ${XSCHEM_STAGING_$*}/sky130_tests/tb_reram* ; \
rm -f ${XSCHEM_STAGING_$*}/sky130_fd_pr/reram* ; \
cat ${XSCHEM_STAGING_$*}/sky130_tests/top.sch | \
${SED} -e "/reram/,+7d" \
> ${XSCHEM_STAGING_$*}/temp ; \
mv ${XSCHEM_STAGING_$*}/temp ${XSCHEM_STAGING_$*}/sky130_tests/top.sch ; \
fi ; \
fi
What works best for open_pdks is to have a file with #ifdef RERAM ... #endif
blocks around the RERAM parts, and then use the common/preproc.py
script in open_pdks (called in the Makefile as ${CPP}
) to process the file with the definitions specific to each process variant (so for sky130B the preprocessor is called with -DRERAM
). But if you're using the file for something other than open_pdks, then that may not work so well.Stefan Schippers
07/02/2022, 5:12 PM${SED} -e "/^C.*{.*reram.*}.*{.*[^}] *$/,/.*} *$/d" -e "/^C.*{.*reram.*}.*{.*} *$/d" \
Above line deletes all components (C.* lines) that contain reram, and works if component spans multiple lines (first -e script) as well as single line instances (second -e script).
The general syntax for components in sch files is:
C {<symbol reference>} x y rot flip {<attribute list>}
and <attribute list>
can be on multiple lines in general.
May be a single script can delete both one-liners and multiple line components. I didn't find a safe one.Tim Edwards
07/02/2022, 9:18 PM$
has to be written $$
or else it is interpreted as a variable name.
Also, there are test_reram
files in addition to the tb_reram
files that need to be removed from the A version.
That sed script excises the reram-related symbols from the page, which is sufficient, although there is still some text remaining on the page that references "RERAM".Stefan Schippers
07/04/2022, 6:39 AM