GitHub
10/15/2024, 3:34 PMopen_pdk
copies the sources to the staging area the files are still read-only and the following scripts fail to open some files for writing:
• rename_models.py
• rename_cells.py
• inc_verilog.py
• fix_io_lef.py
• inc_verilog.py
• foundry_instal.py
All of the above can be fixed by including
import stat
def makeuserwritable(filepath):
if os.path.exists(filepath):
st = os.stat(filepath)
os.chmod(filepath, st.st_mode | stat.S_IWUSR)
and before opening for write
try:
+ makeuserwritable(outname)
with open(outname, 'w') as outFile:
for i in fixedlines:
print(i, file=outFile)
The same problem affects sky130/Makefile.in
and can be corrected by
# then remove the larger of the two example directories
if test "x${XSCHEM_PATH}" != "x" ; then \
cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_$*} ; \
+ chmod -R u+w ${XSCHEM_STAGING_$*}; \
rm -rf ${XSCHEM_STAGING_$*}/decred_hash_macro ; \
fi
# xschem setup is for sky130A. Fix for the given target variant.
The full patches can be inspected in fbe-flakes. If there is interest I can prepare a PR.
RTimothyEdwards/open_pdksGitHub
10/17/2024, 7:00 AM