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
cce1fd51
Commit
cce1fd51
authored
Aug 21, 2022
by
Dinple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added congestion testing
parent
0173d080
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1174 additions
and
10 deletions
+1174
-10
CodeElements/Plc_client/plc_client_os_test.py
+33
-9
CodeElements/Plc_client/test/0P1M1m/netlist.pb.txt
+154
-0
CodeElements/Plc_client/test/0P2M0m/netlist.pb.txt
+250
-0
CodeElements/Plc_client/test/0P3M0m/netlist.pb.txt
+329
-0
CodeElements/Plc_client/test/0P4M0m/netlist.pb.txt
+408
-0
CodeElements/Plc_client/test/sample_clustered_nomacro/netlist.pb.txt
+0
-1
No files found.
CodeElements/Plc_client/plc_client_os_test.py
View file @
cce1fd51
...
...
@@ -15,9 +15,13 @@ class CircuitDataBaseTest():
# NETLIST_PATH = "./Plc_client/test/ariane_soft2hard/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane_port2soft/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/sample_clustered_nomacro/netlist.pb.txt"
NETLIST_PATH
=
"./Plc_client/test/sample_clustered_macroxy/netlist.pb.txt"
#
NETLIST_PATH = "./Plc_client/test/sample_clustered_macroxy/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/ariane133/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/0P2M0m/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/0P1M1m/netlist.pb.txt"
# NETLIST_PATH = "./Plc_client/test/0P3M0m/netlist.pb.txt"
NETLIST_PATH
=
"./Plc_client/test/0P4M0m/netlist.pb.txt"
# Google's Ariane
# CANVAS_WIDTH = 356.592
...
...
@@ -32,21 +36,38 @@ class CircuitDataBaseTest():
# GRID_ROW = 21
# Sample clustered
CANVAS_WIDTH
=
500
CANVAS_HEIGHT
=
500
# CANVAS_WIDTH = 700
# CANVAS_HEIGHT = 700
# GRID_COL = 4
# GRID_ROW = 4
# PMm
CANVAS_WIDTH
=
400
CANVAS_HEIGHT
=
400
GRID_COL
=
4
GRID_ROW
=
4
def
test_proxy_co
st
(
self
):
def
test_proxy_co
ngestion
(
self
):
# Google's Binary Executable
self
.
plc
=
plc_client
.
PlacementCost
(
self
.
NETLIST_PATH
)
print
(
"start timing"
)
start
=
time
.
time
()
print
(
self
.
plc
.
get_congestion_cost
())
self
.
plc
.
set_canvas_size
(
self
.
CANVAS_WIDTH
,
self
.
CANVAS_HEIGHT
)
self
.
plc
.
set_placement_grid
(
self
.
GRID_COL
,
self
.
GRID_ROW
)
self
.
plc
.
set_routes_per_micron
(
10
,
10
)
self
.
plc
.
set_macro_routing_allocation
(
10
,
10
)
self
.
plc
.
set_congestion_smooth_range
(
0.0
)
print
(
"H Congestion: "
,
self
.
plc
.
get_horizontal_routing_congestion
())
print
(
"V Congestion: "
,
self
.
plc
.
get_vertical_routing_congestion
())
print
(
"Congestion: "
,
self
.
plc
.
get_congestion_cost
())
print
(
"Congestion Smoothing"
,
self
.
plc
.
get_congestion_smooth_range
())
print
(
"Density: "
,
self
.
plc
.
get_density_cost
())
end
=
time
.
time
()
print
(
"time elapsed:"
,
end
-
start
)
print
(
"end timing"
)
def
test_proxy_cost
(
self
):
# Google's Binary Executable
self
.
plc
=
plc_client
.
PlacementCost
(
self
.
NETLIST_PATH
)
# Open-sourced Implementation
self
.
plc_os
=
plc_client_os
.
PlacementCost
(
netlist_file
=
self
.
NETLIST_PATH
,
macro_macro_x_spacing
=
50
,
...
...
@@ -57,9 +78,10 @@ class CircuitDataBaseTest():
self
.
plc_os
.
set_canvas_size
(
self
.
CANVAS_WIDTH
,
self
.
CANVAS_HEIGHT
)
self
.
plc_os
.
set_placement_grid
(
self
.
GRID_COL
,
self
.
GRID_ROW
)
#
print(self.plc_os.display_canvas())
print
(
self
.
plc_os
.
display_canvas
())
print
(
self
.
plc_os
.
get_wirelength
(),
self
.
plc
.
get_wirelength
())
assert
int
(
self
.
plc_os
.
get_wirelength
())
==
int
(
self
.
plc
.
get_wirelength
())
print
(
"os wl cost"
,
self
.
plc_os
.
get_cost
())
print
(
"gl wl cost"
,
self
.
plc
.
get_cost
())
...
...
@@ -135,8 +157,10 @@ class CircuitDataBaseTest():
macro_macro_x_spacing
=
50
,
macro_macro_y_spacing
=
50
)
def
main
(
argv
):
temp
=
CircuitDataBaseTest
()
temp
.
test_proxy_congestion
()
temp
.
test_proxy_cost
()
temp
.
test_metadata
()
temp
.
test_miscellaneous
()
...
...
CodeElements/Plc_client/test/0P1M1m/netlist.pb.txt
0 → 100644
View file @
cce1fd51
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "M0"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 350
}
}
attr {
key: "y"
value {
f: 350
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M0/P1"
input: "Grp_2/Pinput"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 25
}
}
}
node {
name: "Grp_2"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "type"
value {
placeholder: "macro"
}
}
attr {
key: "width"
value {
f: 50
}
}
attr {
key: "x"
value {
f: 150
}
}
attr {
key: "y"
value {
f: 50
}
}
}
node {
name: "Grp_2/Pinput"
attr {
key: "macro_name"
value {
placeholder: "Grp_2"
}
}
attr {
key: "type"
value {
placeholder: "macro_pin"
}
}
attr {
key: "x"
value {
f: 150
}
}
attr {
key: "x_offset"
value {
f: 0
}
}
attr {
key: "y"
value {
f: 50
}
}
attr {
key: "y_offset"
value {
f: 0
}
}
}
\ No newline at end of file
CodeElements/Plc_client/test/0P2M0m/netlist.pb.txt
0 → 100644
View file @
cce1fd51
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "M0"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 350
}
}
attr {
key: "y"
value {
f: 350
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M1"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 50
}
}
attr {
key: "y"
value {
f: 50
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M0/P1"
input: "M1/P1"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 325
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M0/P2"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 375
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M1/P1"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 25
}
}
}
node {
name: "M1/P2"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 75
}
}
}
\ No newline at end of file
CodeElements/Plc_client/test/0P3M0m/netlist.pb.txt
0 → 100644
View file @
cce1fd51
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "M0"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 350
}
}
attr {
key: "y"
value {
f: 350
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M1"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 50
}
}
attr {
key: "y"
value {
f: 50
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M2"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 150
}
}
attr {
key: "y"
value {
f: 250
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M0/P1"
input: "M1/P1"
input: "M2/P1"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 325
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M0/P2"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 375
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M1/P1"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 25
}
}
}
node {
name: "M1/P2"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 75
}
}
}
node {
name: "M2/P1"
attr {
key: "macro_name"
value {
placeholder: "M2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 175
}
}
attr {
key: "y"
value {
f: 225
}
}
}
\ No newline at end of file
CodeElements/Plc_client/test/0P4M0m/netlist.pb.txt
0 → 100644
View file @
cce1fd51
# proto-file: tensorflow/core/framework/graph.proto
# proto-message: tensorflow.GraphDef
node {
name: "M0"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 350
}
}
attr {
key: "y"
value {
f: 350
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M1"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 50
}
}
attr {
key: "y"
value {
f: 50
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M2"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 150
}
}
attr {
key: "y"
value {
f: 250
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M3"
attr {
key: "height"
value {
f: 50
}
}
attr {
key: "orientation"
value {
placeholder: "N"
}
}
attr {
key: "type"
value {
placeholder: "MACRO"
}
}
attr {
key: "x"
value {
f: 250
}
}
attr {
key: "y"
value {
f: 150
}
}
attr {
key: "width"
value {
f: 50
}
}
}
node {
name: "M0/P1"
input: "M1/P1"
input: "M2/P1"
input: "M3/P1"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 325
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M0/P2"
attr {
key: "macro_name"
value {
placeholder: "M0"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: -25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 325
}
}
attr {
key: "y"
value {
f: 375
}
}
attr {
key: "weight"
value {
f: 1000
}
}
}
node {
name: "M1/P1"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 25
}
}
}
node {
name: "M1/P2"
attr {
key: "macro_name"
value {
placeholder: "M1"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: 25
}
}
attr {
key: "x"
value {
f: 75
}
}
attr {
key: "y"
value {
f: 75
}
}
}
node {
name: "M2/P1"
attr {
key: "macro_name"
value {
placeholder: "M2"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 175
}
}
attr {
key: "y"
value {
f: 225
}
}
}
node {
name: "M3/P1"
attr {
key: "macro_name"
value {
placeholder: "M3"
}
}
attr {
key: "type"
value {
placeholder: "MACRO_PIN"
}
}
attr {
key: "x_offset"
value {
f: 25
}
}
attr {
key: "y_offset"
value {
f: -25
}
}
attr {
key: "x"
value {
f: 275
}
}
attr {
key: "y"
value {
f: 125
}
}
}
\ No newline at end of file
CodeElements/Plc_client/test/sample_clustered_nomacro/netlist.pb.txt
View file @
cce1fd51
...
...
@@ -3,7 +3,6 @@
node {
name: "P0"
input: "Grp_2/Pinput"
input: "P1"
attr {
key: "side"
value {
...
...
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