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
a9e01189
Commit
a9e01189
authored
Nov 22, 2022
by
Dinple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates
parent
3b030ffd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
7 deletions
+86
-7
.gitignore
+13
-1
CodeElements/FDPlacement/fd_placement_final.py
+0
-0
CodeElements/Plc_client/plc_client_os.py
+0
-0
CodeElements/Plc_client/plc_client_os_test.py
+54
-2
CodeElements/StatTest/proxy_corr_test.py
+19
-4
No files found.
.gitignore
View file @
a9e01189
...
...
@@ -19,4 +19,16 @@ CodeElements/EvalCT/saved_policy/run_00/111/train/*
CodeElements/EvalCT/saved_policy/run_00/111/snapshot*.plc
CodeElements/EvalCT/saved_policy/run_00/111/rl*.plc
CodeElements/EvalCT/saved_policy/run_os_64128_g657_ub5_nruns10_c5_r3_v3_rc1
CodeElements/epoch_*.plc
CodeElements/FDPlacement/test/*
CodeElements/Plc_client/placement_util*.py
CodeElements/StatTest/test/ariane/*_vs_*
CodeElements/StatTest/test/flow2_68_1.3_ct/*
CodeElements/StatTest/test/ariane/*.plc
CodeElements/*/__pycache__/*
CodeElements/*.png
CodeElements/StatTest/*.csv
CodeElements/os.txt
CodeElements/EvalCT/test/ariane/*.plc
CodeElements/FDPlacement/fd.txt
CodeElements/StatTest/test/ariane/*.pb.txt
CodeElements/FDPlacement/fd_placement_final.py
0 → 100755
View file @
a9e01189
This diff is collapsed.
Click to expand it.
CodeElements/Plc_client/plc_client_os.py
View file @
a9e01189
This diff is collapsed.
Click to expand it.
CodeElements/Plc_client/plc_client_os_test.py
View file @
a9e01189
...
...
@@ -79,6 +79,18 @@ Example:
--marv 5
\
--smooth 2
$ python3 -m Plc_client.plc_client_os_test --netlist ./Plc_client/test/ariane_fd/ariane.pb.txt
\
--plc ./Plc_client/test/ariane_fd/ariane.plc
\
--width 1599.99
\
--height 1598.8
\
--col 27
\
--row 23
\
--rpmh 70.330
\
--rpmv 74.510
\
--marh 51.790
\
--marv 51.790
\
--smooth 2
Todo:
* Clean up code
* Extract argument from command line
...
...
@@ -247,6 +259,7 @@ class PlacementCostTest():
self
.
plc_os
.
set_canvas_size
(
self
.
CANVAS_WIDTH
,
self
.
CANVAS_HEIGHT
)
self
.
plc_os
.
set_placement_grid
(
self
.
GRID_COL
,
self
.
GRID_ROW
)
# show canvas
self
.
plc_os
.
make_soft_macros_square
()
self
.
plc_os
.
display_canvas
(
annotate
=
False
,
amplify
=
False
)
...
...
@@ -854,6 +867,42 @@ class PlacementCostTest():
self
.
plc_util_os
.
display_canvas
(
annotate
=
False
)
def
test_fd
(
self
):
print
(
"############################ TEST GOOGLE's FD Placer ############################"
)
self
.
plc_util
=
placement_util
.
create_placement_cost
(
plc_client
=
plc_client
,
netlist_file
=
self
.
NETLIST_PATH
,
init_placement
=
self
.
PLC_PATH
)
self
.
plc_util_os
=
placement_util
.
create_placement_cost
(
plc_client
=
plc_client_os
,
netlist_file
=
self
.
NETLIST_PATH
,
init_placement
=
self
.
PLC_PATH
)
self
.
plc_util
.
set_routes_per_micron
(
self
.
RPMH
,
self
.
RPMV
)
self
.
plc_util_os
.
set_routes_per_micron
(
self
.
RPMH
,
self
.
RPMV
)
self
.
plc_util
.
set_macro_routing_allocation
(
self
.
MARH
,
self
.
MARV
)
self
.
plc_util_os
.
set_macro_routing_allocation
(
self
.
MARH
,
self
.
MARV
)
self
.
plc_util
.
set_congestion_smooth_range
(
self
.
SMOOTH
)
self
.
plc_util_os
.
set_congestion_smooth_range
(
self
.
SMOOTH
)
self
.
plc_util
.
set_canvas_size
(
self
.
CANVAS_WIDTH
,
self
.
CANVAS_HEIGHT
)
self
.
plc_util
.
set_placement_grid
(
self
.
GRID_COL
,
self
.
GRID_ROW
)
self
.
plc_util_os
.
set_canvas_size
(
self
.
CANVAS_WIDTH
,
self
.
CANVAS_HEIGHT
)
self
.
plc_util_os
.
set_placement_grid
(
self
.
GRID_COL
,
self
.
GRID_ROW
)
placement_util
.
fd_placement_schedule
(
self
.
plc_util
)
for
node_index
in
placement_util
.
nodes_of_types
(
self
.
plc_util
,
[
'MACRO'
]):
x_pos
,
y_pos
=
self
.
plc_util
.
get_node_location
(
node_index
)
self
.
plc_util_os
.
set_soft_macro_position
(
node_index
,
x_pos
,
y_pos
)
self
.
plc_util_os
.
display_canvas
(
annotate
=
False
,
amplify
=
False
)
def
test_environment
(
self
):
print
(
"############################ TEST ENVIRONMENT ############################"
)
env
=
environment
.
CircuitEnv
(
...
...
@@ -942,6 +991,8 @@ class PlacementCostTest():
placement_util
.
fd_placement_schedule
(
self
.
plc_util_os
)
self
.
plc_util_os
.
display_canvas
(
annotate
=
False
,
amplify
=
False
)
def
parse_flags
(
argv
):
parser
=
argparse_flags
.
ArgumentParser
(
description
=
'An argparse + app.run example'
)
...
...
@@ -1007,9 +1058,10 @@ def main(args):
# PCT.test_place_node()
# PCT.test_miscellaneous()
# PCT.test_observation_extractor()
PCT
.
view_canvas
()
# PCT.view_canvas()
# PCT.test_fd()
# PCT.test_environment()
#
PCT.test_fd_placement()
PCT
.
test_fd_placement
()
if
__name__
==
'__main__'
:
...
...
CodeElements/StatTest/proxy_corr_test.py
View file @
a9e01189
...
...
@@ -10,7 +10,22 @@ import pandas as pd
SHEET_ID
=
'1dtG4uHzdw-Lfe_Vcm5uBRNjjxXNA4gmVarTr86hjYVo'
SHEET_NAME
=
'Proxy_Cost_Comparison'
url
=
f
'https://docs.google.com/spreadsheets/d/{SHEET_ID}/gviz/tq?tqx=out:csv&sheet={SHEET_NAME}'
df
=
pd
.
read_csv
(
url
)
print
(
df
.
head
())
proxy_df
=
pd
.
read_csv
(
url
)
proxy_df
=
proxy_df
.
loc
[:,
~
proxy_df
.
isnull
()
.
all
()]
print
(
proxy_df
.
columns
)
proxy_df
[
'postCTS_Congestion (V)'
]
=
proxy_df
[
'postCTS_Congestion (V)'
]
.
str
.
rstrip
(
'
%
'
)
.
astype
(
'float'
)
/
100.0
# compute correlation between postRouteOpt_std_cell_area and density_cost
print
(
"postRoute_std_cell_area VS. Density_Cost"
,
proxy_df
[
"postRoute_std_cell_area (um^2)"
]
.
corr
(
proxy_df
[
"Density_Cost"
]))
print
(
"postRouteOpt_std_cell_area VS. Density_Cost"
,
proxy_df
[
"postRouteOpt_std_cell_area (um^2)"
]
.
corr
(
proxy_df
[
"Density_Cost"
]))
# compute correlation between ???
\ No newline at end of file
# compute correlation between postRouteOpt_wirelength (um) and wirelength_cost
print
(
"postRoute_wirelength VS. Wirelength_Cost"
,
proxy_df
[
"postRoute_wirelength (um)"
]
.
corr
(
proxy_df
[
"Wirelength_Cost"
]))
print
(
"postRouteOpt_wirelength VS. Wirelength_Cost"
,
proxy_df
[
"postRouteOpt_wirelength (um)"
]
.
corr
(
proxy_df
[
"Wirelength_Cost"
]))
# compute correlation between postCTS_Congestion and congestion_cost
print
(
"postCTS_Congestion VS. Congestion_Cost"
,
proxy_df
[
"postCTS_Congestion (V)"
]
.
corr
(
proxy_df
[
"Congestion_Cost"
]))
\ No newline at end of file
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