mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat: add --create-efabless-submission option
This commit is contained in:
+11
@@ -7,6 +7,7 @@ import shutil
|
||||
import git
|
||||
|
||||
def copy_print(src: str, dest: str):
|
||||
os.makedirs(os.path.dirname(dest), exist_ok=True)
|
||||
logging.info(f" -> {dest}")
|
||||
shutil.copy2(src, dest)
|
||||
|
||||
@@ -129,3 +130,13 @@ class CaravelConfig():
|
||||
f"{lastrun}/final/spef", f"spef/", copy_function=copy_print, dirs_exist_ok=True
|
||||
)
|
||||
copy_print(f"{lastrun}/final/spef/nom_/{macro_name}.nom.spef", f"spef/{macro_name}.spef")
|
||||
|
||||
def create_efabless_submission(self):
|
||||
logging.info("creating efabless submission directory:")
|
||||
lastrun = self.find_last_run("tt_top")
|
||||
copy_print("README.md", "efabless/README.md")
|
||||
copy_print("shuttle_index.json", "efabless/shuttle_index.json")
|
||||
copy_print("verilog/rtl/user_defines.v", "efabless/verilog/rtl/user_defines.v")
|
||||
copy_print(f"{lastrun}/final/pnl/user_project_wrapper.pnl.v", f"efabless/verilog/gl/user_project_wrapper.v")
|
||||
copy_print(f"{lastrun}/final/gds/user_project_wrapper.magic.gds", f"efabless/gds/user_project_wrapper.gds")
|
||||
copy_print(f"{lastrun}/final/lef/user_project_wrapper.lef", f"efabless/lef/user_project_wrapper.gds")
|
||||
|
||||
@@ -165,6 +165,7 @@ if __name__ == '__main__':
|
||||
parser.add_argument('--update-caravel', help='configure caravel for build', action='store_const', const=True)
|
||||
parser.add_argument('--copy-macros', help='copy macros for building the tt_top project', action='store_const', const=True)
|
||||
parser.add_argument('--copy-final-results', help='copy final project files to gds/lef directories', action='store_const', const=True)
|
||||
parser.add_argument('--create-efabless-submission', help='create efabless submission files', action='store_const', const=True)
|
||||
parser.add_argument('--harden', help="harden project", action="store_const", const=True)
|
||||
parser.add_argument('--test', help='use test projects', action='store_const', const=True)
|
||||
parser.add_argument('--sta-projects', help='use sta projects', action='store_const', const=True)
|
||||
@@ -225,6 +226,9 @@ if __name__ == '__main__':
|
||||
if args.copy_final_results:
|
||||
caravel.copy_final_results()
|
||||
|
||||
if args.create_efabless_submission:
|
||||
caravel.create_efabless_submission()
|
||||
|
||||
if args.update_image:
|
||||
docs.update_image()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user