diff --git a/configure.py b/configure.py index e49fc26..03c30d1 100755 --- a/configure.py +++ b/configure.py @@ -231,7 +231,13 @@ if __name__ == "__main__": ) parser.add_argument( "--create-efabless-submission", - help="create efabless submission files", + help="create efabless submission directory", + action="store_const", + const=True, + ) + parser.add_argument( + "--create-ihp-submission", + help="create ihp submission directory", action="store_const", const=True, ) @@ -319,7 +325,10 @@ if __name__ == "__main__": shuttle.copy_final_results() if args.create_efabless_submission: - shuttle.create_efabless_submission() + shuttle.create_foundry_submission("efabless", True) + + if args.create_ihp_submission: + shuttle.create_foundry_submission("ihp", False) if args.update_image: docs.update_image() diff --git a/shuttle.py b/shuttle.py index 8610442..15af6b3 100644 --- a/shuttle.py +++ b/shuttle.py @@ -257,21 +257,26 @@ class ShuttleConfig: f"verilog/gl/{macro}.v", ) - def create_efabless_submission(self): - logging.info("creating efabless submission directory:") + def create_foundry_submission(self, foundry_name: str, copy_user_defines: bool): + logging.info(f"creating {foundry_name} submission directory:") + target_dir = foundry_name lastrun = self.find_last_run("tt_top") - copy_print("shuttle_index.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("shuttle_index.md", f"{target_dir}/README.md") + copy_print("shuttle_index.json", f"{target_dir}/shuttle_index.json") + if copy_user_defines: + copy_print( + f"verilog/rtl/user_defines.v", + f"{target_dir}/verilog/rtl/user_defines.v", + ) copy_print( f"{lastrun}/final/pnl/{self.tt_top_macro}.pnl.v", - f"efabless/verilog/gl/{self.tt_top_macro}.v", + f"{target_dir}/verilog/gl/{self.tt_top_macro}.v", ) copy_print( f"{lastrun}/final/nl/{self.tt_top_macro}.nl.v", - f"efabless/verilog/gl/{self.tt_top_macro}.nl.v", + f"{target_dir}/verilog/gl/{self.tt_top_macro}.nl.v", ) copy_print( f"{lastrun}/final/gds/{self.tt_top_macro}.gds", - f"efabless/gds/{self.tt_top_macro}.gds", + f"{target_dir}/gds/{self.tt_top_macro}.gds", )