Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
macroplacement
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
macroplacement
Commits
1ff0c6d0
Commit
1ff0c6d0
authored
Jul 06, 2022
by
sakundu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Utility script to generate job list
Signed-off-by: sakundu <sakundu@ucsd.edu>
parent
939d058b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
Flows/util/genJobList.py
+40
-0
No files found.
Flows/util/genJobList.py
0 → 100644
View file @
1ff0c6d0
import
os
import
shutil
import
fileinput
import
re
testcases
=
[
'ariane136'
,
'ariane133'
,
'mempool_tile'
,
'nvdla'
]
enablements
=
[
'NanGate45'
,
'ASAP7'
]
job_file
=
"all_jobs"
flows
=
[
1
,
2
]
fp
=
open
(
job_file
,
"w"
)
for
enablement
in
enablements
:
for
testcase
in
testcases
:
for
flow
in
flows
:
## Check if the run directory exists
run_dir
=
f
"./{enablement}/{testcase}/run"
if
not
os
.
path
.
exists
(
run_dir
):
os
.
makedirs
(
run_dir
)
## Copy the scripts
scripts_src
=
f
"./{enablement}/{testcase}/scripts/cadence"
scripts_dst
=
f
"./{enablement}/{testcase}/run/flow{flow}"
if
os
.
path
.
exists
(
scripts_dst
):
print
(
f
"For TestCase:{testcase} Enablement:{enablement} Flow:{flow} already exists. So not generating job for this"
)
shutil
.
copytree
(
scripts_src
,
scripts_dst
)
## Update the run.sh for flow
flow_ip
=
0
if
flow
==
2
:
flow_ip
=
1
for
line
in
fileinput
.
input
(
f
"{scripts_dst}/run.sh"
,
inplace
=
True
):
#line.replace("export PHY_SYNTH.*", f"export PHY_SYNTH={flow_ip}")
line
=
re
.
sub
(
r"export\s+PHY_SYNTH\s*=.*"
,
f
"export PHY_SYNTH={flow_ip}"
,
line
)
print
(
line
,
end
=
""
)
## Add job to the job list
scripts_dst_abs_path
=
os
.
path
.
abspath
(
scripts_dst
)
fp
.
write
(
f
"cd {scripts_dst_abs_path}; sh run.sh;
\n
"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment