#!/bin/bash # Working directory in github workspace # Original repo is places ../SOFA-Chips # for conditional file copy use PROJ_SUFFIX (example SOFA_HD) cd ./${DEST_DIR} echo "[Info] Running in directory ${PWD}" cp ../SOFA-Chips/${SCAN_DIRECTORY}/fpga_top_icv_in_design.gds.gz ./gds/ make uncompress echo "[Info] All files are uncompressed" # = = = = = = = = = = = = Modify Merge Scripts = = = = = = = = = = = = = = = = AddLine="use fpga_top fpga_top_uut\n"\ "transform 1 0 0 0 1 0\n"\ "box 0 0 2500 3000" sed -i "s/<< properties >>/${AddLine}\n<< properties >>/" ./mag/user_project_wrapper.mag echo "[Info] Merged with user_project_wrapper" # = = = Running magic to merge fpga_top with user_project_wrapper = = = = = = = MAGTYPE=mag \ magic -rcfile ${PDK_ROOT}/sky130A/libs.tech/magic/current/sky130A.magicrc \ -noconsole -dnull \ ../SOFA-Chips/SCRIPT/merge_fpga_top.tcl