Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Aardvark Design Sweep
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mikael Henriksson
Aardvark Design Sweep
Commits
d544bbfe
Commit
d544bbfe
authored
3 years ago
by
Mikael Henriksson
Browse files
Options
Downloads
Patches
Plain Diff
Added support for conditionaly excluding sweep ponits with negative slack (UNTESTED).
parent
1328322f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sweep.bash
+18
-11
18 additions, 11 deletions
sweep.bash
with
18 additions
and
11 deletions
sweep.bash
+
18
−
11
View file @
d544bbfe
...
@@ -63,7 +63,7 @@ MAX_CONCURRENCY=12
...
@@ -63,7 +63,7 @@ MAX_CONCURRENCY=12
WAIT_FOR_LICENSE
=
"YES"
WAIT_FOR_LICENSE
=
"YES"
# String that will be appended to the top sweep directory name. Could, for
# String that will be appended to the top sweep directory name. Could, for
# example, be used to append technology, corrner or other vital info to the
# example, be used to append technology, corrner or other vital info to the
# sweep directory name. Leave blank if unused.
# sweep directory name. Leave blank if unused.
TOP_DIR_APPEND
=
""
TOP_DIR_APPEND
=
""
...
@@ -82,15 +82,19 @@ AREA_DIM="um^2"
...
@@ -82,15 +82,19 @@ AREA_DIM="um^2"
# Generate a CSV sweep result file from a sweep result. Only the sweeps whose
# Generate a CSV sweep result file from a sweep result. Only the sweeps whose
# slack where not violated are extracted.
# slack where not violated are extracted.
function
sweep_to_csv
()
{
function
sweep_to_csv
()
{
local
data_dir
=
"
${
1
}
"
local
sweep_
data_dir
=
"
${
1
}
"
local
csv_out
=
"
${
2
}
"
local
csv_out
=
"
${
2
}
"
# Extract non-slack violated resulting subdirectories and periods.
local
timing_files
local
non_violated_dirs
if
[
"
${
EXCLUDE_NEGATIVE_SLACK
}
"
-eq
"YES"
]
;
then
local
periods
# Extract non-slack violated 'timing.txt' files.
non_violated_dirs
=
$(
grep
-riL
"(VIOLATED)"
"
${
data_dir
}
"
/
*
/timing.txt
)
timing_files
=
$(
grep
-riL
"(VIOLATED)"
"
${
sweep_data_dir
}
"
/
*
/timing.txt
)
periods
=
$(
perl
-C
-lne
'print for /(\d+\.\d+?)\/timing\.txt/ig'
<<<
\
else
# ${EXCLUDE_NEGATIVE_SLACK} -eq "NO"
"
${
non_violated_dirs
}
"
|
sort
-rh
)
# Extract all all 'timing.txt' files.
timing_files
=
$(
echo
"
${
sweep_data_dir
}
"
/
*
/timing.txt
)
fi
local
periods
=
$(
perl
-C
-lne
'print for /(\d+\.\d+?)\/timing\.txt/ig'
<<<
\
"
${
timing_files
}
"
|
sort
-rh
)
# Create CSV file and write CSV header.
# Create CSV file and write CSV header.
touch
"
${
csv_out
}
"
touch
"
${
csv_out
}
"
...
@@ -101,7 +105,7 @@ function sweep_to_csv() {
...
@@ -101,7 +105,7 @@ function sweep_to_csv() {
# constraints met.
# constraints met.
while
IFS
=
''
read
-r
period
;
do
while
IFS
=
''
read
-r
period
;
do
# Extract data.
# Extract data.
cur_dir
=
"
${
data_dir
}
/
${
period
}
"
cur_dir
=
"
${
sweep_
data_dir
}
/
${
period
}
"
power
=
$(
awk
'/Total\s+[0-9\.e-]+\s[a-z]{0,1}W/{print $(NF-1)}'
\
power
=
$(
awk
'/Total\s+[0-9\.e-]+\s[a-z]{0,1}W/{print $(NF-1)}'
\
"
${
cur_dir
}
/power.txt"
)
"
${
cur_dir
}
/power.txt"
)
area
=
$(
awk
'/Total cell area:/{print $NF}'
"
${
cur_dir
}
/area.txt"
)
area
=
$(
awk
'/Total cell area:/{print $NF}'
"
${
cur_dir
}
/area.txt"
)
...
@@ -227,12 +231,15 @@ for file in "${DESIGN_FILES[@]}"; do
...
@@ -227,12 +231,15 @@ for file in "${DESIGN_FILES[@]}"; do
exit
1
exit
1
fi
fi
done
done
if
[[
"
${
EXCLUDE_NEGATIVE_SLACK
}
"
~
=
^
(
YES
)
|
(
NO
)
$
]]
;
then
echo
"Error:
\$
{EXCLUDE_NEGATIVE_SLACK} not in { 'YES', 'NO' };"
fi
if
!
[[
"
$RETIME_ENABLE
"
=
~ ^
(
YES
)
|
(
NO
)
$
]]
;
then
if
!
[[
"
$RETIME_ENABLE
"
=
~ ^
(
YES
)
|
(
NO
)
$
]]
;
then
echo
"Error:
\$
RETIME_ENABLE not in {
"
YES
"
,
"
NO
"
}."
echo
"Error:
\$
RETIME_ENABLE not in {
'
YES
'
,
'
NO
'
}."
exit
1
exit
1
fi
fi
if
!
[[
"
${
WAIT_FOR_LICENSE
}
"
=
~ ^
(
YES
)
|
(
NO
)
$
]]
;
then
if
!
[[
"
${
WAIT_FOR_LICENSE
}
"
=
~ ^
(
YES
)
|
(
NO
)
$
]]
;
then
echo
"Error:
\$
WAIT_FOR_LICENSE not in {
"
YES
"
,
"
NO
"
}."
echo
"Error:
\$
WAIT_FOR_LICENSE not in {
'
YES
'
,
'
NO
'
}."
exit
1
exit
1
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment