[Action] Updated action script for local run

This commit is contained in:
Ganesh Gore 2020-12-14 12:08:16 -07:00
parent 13fc082cb3
commit 3c174619b0
2 changed files with 22 additions and 14 deletions

View File

@ -19,6 +19,7 @@ sed -i "s/<< properties >>/${AddLine}\n<< properties >>/" ./mag/user_project_wra
echo "[Info] Merged with user_project_wrapper"
# = = = Running magic to merge fpga_top with user_project_wrapper = = = = = = =
[ ! -d "/usr/local/workspace/${DEST_DIR}/checks" ] && mkdir /usr/local/workspace/${DEST_DIR}/checks
MAGTYPE=mag \
magic -rcfile ${PDK_ROOT}/sky130A/libs.tech/magic/current/sky130A.magicrc \
-noconsole -dnull \
@ -43,18 +44,24 @@ mv ./gds/caravel_merged.gds ./gds/caravel.gds
# rm -f gds/caravel.old.gds
# = = = = = = = = = = = = = Perform Open MPW Checks = = = = = = = = = = = = = =
cd /usr/local/bin
python3 open_mpw_prechecker.py \
--target_path /usr/local/workspace/${DEST_DIR} \
--pdk_root $PDK_ROOT
echo "[Info] Finished MPW Prechecker"
if [[ ! -n "$SKIP_PRECHECK" ]]; then
echo $SKIP_PRECHECK
echo "[Info] Running MPW Prechecker"
cd /usr/local/bin
python3 open_mpw_prechecker.py \
--target_path /usr/local/workspace/${DEST_DIR} \
--pdk_root $PDK_ROOT
echo "[Info] Finished MPW Prechecker"
else
echo "[Info] Skipped MPW Prechecker"
fi
# = = = = = = = Convert DRC Errors to RDB = = = = = = = = = = = = = = = = = = =
cd /usr/local/workspace/${DEST_DIR}
if test -f "./checks/caravel.magic.drc"; then
python3 ../SOFA-Chips/SCRIPT/magic_drc_to_rdb.py \
-magic_drc_in ./checks/caravel.magic.drc
-rdb_out ./checks/caravel.magic.rdb
--magic_drc_in ./checks/caravel.magic.drc \
--rdb_out ./checks/caravel.magic.rdb
echo "[Info] Converted errors in RDB format"
fi

View File

@ -35,18 +35,19 @@ def main():
drcRule = line.strip().split("(")
drcRule = [drcRule,"UnknownRule"] if len(drcRule) <2 else drcRule
fpw.write(f"r_0_{drcRule[1][:-1]}\n")
fpw.write(f"5000 5000 2 Nov 29 03:26:39 2020\n")
fpw.write(f"1000 1000 2 Nov 29 03:26:39 2020\n")
fpw.write(f"Rule File Pathname: {args.magic_drc_in}\n")
fpw.write(f"{drcRule[1][:-1]}: {drcRule[0]}\n")
drcNumber = 1
elif (lineType==data):
cord = [int(float(i))*100 for i in line.strip().split(" ")]
fpw.write(f"p {drcNumber} 4\n")
fpw.write(f"{cord[0]} {cord[1]}\n")
fpw.write(f"{cord[2]} {cord[1]}\n")
fpw.write(f"{cord[2]} {cord[3]}\n")
fpw.write(f"{cord[0]} {cord[3]}\n")
drcNumber+=1
if cord[0]>32638 and cord[1]>138201 and drcNumber<900:
fpw.write(f"p {drcNumber} 4\n")
fpw.write(f"{cord[0]} {cord[1]}\n")
fpw.write(f"{cord[2]} {cord[1]}\n")
fpw.write(f"{cord[2]} {cord[3]}\n")
fpw.write(f"{cord[0]} {cord[3]}\n")
drcNumber+=1
print(f"Generated RDB at {args.rdb_out}")