feat(configure): add --create-ihp-submission command

similar to create-efabless-submission, but uses the ihp directory and skips copying user_defines.v
This commit is contained in:
Uri Shaked
2024-10-21 21:53:54 +03:00
parent 0c16b17395
commit d1e8e31569
2 changed files with 24 additions and 10 deletions
+11 -2
View File
@@ -231,7 +231,13 @@ if __name__ == "__main__":
) )
parser.add_argument( parser.add_argument(
"--create-efabless-submission", "--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", action="store_const",
const=True, const=True,
) )
@@ -319,7 +325,10 @@ if __name__ == "__main__":
shuttle.copy_final_results() shuttle.copy_final_results()
if args.create_efabless_submission: 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: if args.update_image:
docs.update_image() docs.update_image()
+13 -8
View File
@@ -257,21 +257,26 @@ class ShuttleConfig:
f"verilog/gl/{macro}.v", f"verilog/gl/{macro}.v",
) )
def create_efabless_submission(self): def create_foundry_submission(self, foundry_name: str, copy_user_defines: bool):
logging.info("creating efabless submission directory:") logging.info(f"creating {foundry_name} submission directory:")
target_dir = foundry_name
lastrun = self.find_last_run("tt_top") lastrun = self.find_last_run("tt_top")
copy_print("shuttle_index.md", "efabless/README.md") copy_print("shuttle_index.md", f"{target_dir}/README.md")
copy_print("shuttle_index.json", "efabless/shuttle_index.json") copy_print("shuttle_index.json", f"{target_dir}/shuttle_index.json")
copy_print("verilog/rtl/user_defines.v", "efabless/verilog/rtl/user_defines.v") if copy_user_defines:
copy_print(
f"verilog/rtl/user_defines.v",
f"{target_dir}/verilog/rtl/user_defines.v",
)
copy_print( copy_print(
f"{lastrun}/final/pnl/{self.tt_top_macro}.pnl.v", 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( copy_print(
f"{lastrun}/final/nl/{self.tt_top_macro}.nl.v", 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( copy_print(
f"{lastrun}/final/gds/{self.tt_top_macro}.gds", 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",
) )