<@U016EM8L91B> when installing open_pdks the sky13...
# xschem
s
@Tim Edwards when installing open_pdks the sky130A version of the
top.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.
t
I just hacked the behavior into the Makefile but it would probably be better served as a python script.
open_pdks/sky130/Makefile.in
lines 957 to 967:
Copy code
# 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.
s
I suggest using this sed line in code above
${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.
t
That works, except that within a Makefile the
$
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".
s
@Tim Edwards thank you for pointing out this. I have removed test_reram, as it was a duplicate (of tb_reram) There is still a 'link' type symbol (that points to a reram related URL). A 3rd sed command could get rid of this (the reram word is in the attribute list, not in the symbol reference).