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
1d8d3713
Commit
1d8d3713
authored
Aug 15, 2022
by
Dinple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clustered ports done
parent
d4d5de0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
CodeElements/Plc_client/plc_client_os.py
+13
-22
No files found.
CodeElements/Plc_client/plc_client_os.py
View file @
1d8d3713
...
...
@@ -761,31 +761,21 @@ class PlacementCost(object):
#[MACRO][macro][PORT]
module_indices
=
self
.
hard_macro_indices
+
self
.
soft_macro_indices
+
self
.
port_indices
#[Grid Cell] => [PORT]
clustered_ports
=
{}
for
port_idx
in
self
.
port_indices
:
port
=
self
.
modules_w_pins
[
port_idx
]
x_pos
,
y_pos
=
port
.
get_pos
()
for
row_idx
,
module_idx
in
enumerate
(
module_indices
):
# row index
# store temp module
curr_module
=
self
.
modules_w_pins
[
module_idx
]
# get module name
curr_module_name
=
curr_module
.
get_name
()
for
col_idx
,
h_module_idx
in
enumerate
(
module_indices
):
# col index
entry
=
0
# store connected module
h_module
=
self
.
modules_w_pins
[
h_module_idx
]
# get connected module name
h_module_name
=
h_module
.
get_name
()
if
curr_module_name
in
h_module
.
get_connection
():
entry
+=
h_module
.
get_connection
()[
curr_module_name
]
if
h_module_name
in
curr_module
.
get_connection
():
entry
+=
curr_module
.
get_connection
()[
h_module_name
]
row
,
col
=
self
.
__get_grid_cell_location
(
x_pos
=
x_pos
,
y_pos
=
y_pos
)
macro_adj
[
row_idx
*
self
.
module_cnt
+
col_idx
]
=
entry
if
(
row
,
col
)
in
clustered_ports
:
clustered_ports
[(
row
,
col
)]
.
append
(
port
)
else
:
clustered_ports
[(
row
,
col
)]
=
[
port
]
return
macro_adj
return
clustered_ports
def
get_node_location
(
self
):
pass
...
...
@@ -1196,6 +1186,7 @@ def main():
print
(
plc
.
get_grid_cells_density
())
print
(
plc
.
get_density_cost
())
print
(
plc
.
display_canvas
())
print
(
len
(
plc
.
get_macro_and_clustered_port_adjacency
()))
if
__name__
==
'__main__'
:
...
...
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