Skip to content

Commit 59e1573

Browse files
committed
add parser arguments for skipping or adding stages in the pipeline and create json argument file
1 parent f9857c3 commit 59e1573

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

PCI_Pipeline/Pipeline_config.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"default_options": {
3+
"cleanup": true,
4+
"verify_versions": true,
5+
"skip_config_generation": false,
6+
"skip_rtl_generation": false,
7+
"skip_simulation": false,
8+
"skip_synthesis": false
9+
},
10+
11+
"cores": {
12+
"RVX": {
13+
"name": "RVX",
14+
"github": "https://github.com/rafaelcalcada/rvx",
15+
"pipeline_options": {
16+
"cleanup": false,
17+
"skip_simulation": true
18+
}
19+
}
20+
}
21+
}

PCI_Pipeline/flows/main_flow.py

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def simulation_flow(processor_name: str):
77
create_makefile(processor_name)
88

9-
def main_flow(repo_url: str):
9+
def main_flow(repo_url: str, cleanup: bool, verify_updates: bool, skip_config: bool, skip_rtl: bool, skip_simulation: bool, skip_synthesis: bool) -> None:
1010
repo = RepoStruct(repo_url, base_dir="processors")
1111
repo_path = repo.repo_path
1212

@@ -17,16 +17,34 @@ def main_flow(repo_url: str):
1717
simulation_flow(repo_path.split('/')[-1])
1818

1919

20-
def main():
20+
def main(
21+
repo_url: str,
22+
cleanup: bool,
23+
verify_updates: bool,
24+
skip_config: bool,
25+
skip_rtl: bool,
26+
skip_simulation: bool,
27+
skip_synthesis: bool) -> None:
28+
# Clone the repository and generate config and shell files
29+
main_flow(repo_url, cleanup, verify_updates, skip_config, skip_rtl, skip_simulation, skip_synthesis)
30+
return None
31+
32+
if __name__ == "__main__":
2133
# Set up argument parsing
2234
parser = argparse.ArgumentParser(description="Clone a Git repository.")
2335
parser.add_argument("--repo-url", type=str, required=True,
2436
help="The URL of the Git repository to clone.")
37+
parser.add_argument("--cleanup", "-c", action="store_true",
38+
help="Clean up the cloned repository after processing.")
39+
parser.add_argument("--verify-updates", "-v", action="store_true",
40+
help="Verify if there are updates in the repository.")
41+
parser.add_argument("--skip-config", action="store_true",
42+
help="Skip configuration file generation.")
43+
parser.add_argument("--skip-rtl", action="store_true",
44+
help="Skip RTL file generation.")
45+
parser.add_argument("--skip-simulation", action="store_true",
46+
help="Skip simulation setup.")
47+
parser.add_argument("--skip-synthesis", action="store_true",
48+
help="Skip synthesis setup.")
2549
args = parser.parse_args()
26-
27-
# Clone the repository and generate config and shell files
28-
main_flow(args.repo_url)
29-
return 0
30-
31-
if __name__ == "__main__":
32-
main()
50+
main(args.repo_url, args.cleanup, args.verify_updates, args.skip_config, args.skip_rtl, args.skip_simulation, args.skip_synthesis)

0 commit comments

Comments
 (0)