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
db33a447
Commit
db33a447
authored
Aug 29, 2022
by
Dinple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes
parent
5a2817ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
CodeElements/Plc_client/plc_client_os.py
+6
-11
CodeElements/Plc_client/plc_client_os_test.py
+1
-1
No files found.
CodeElements/Plc_client/plc_client_os.py
View file @
db33a447
...
...
@@ -9,7 +9,6 @@ from collections import namedtuple
import
matplotlib.pyplot
as
plt
from
matplotlib.patches
import
Rectangle
import
numpy
as
np
from
optax
import
smooth_labels
"""plc_client_os docstrings.
...
...
@@ -354,9 +353,9 @@ class PlacementCost(object):
# node information
_hard_macros_cnt
=
0
_hard_macro_pins_cnt
=
0
_macro_cnt
=
0
_macro
s
_cnt
=
0
_macro_pin_cnt
=
0
_port_cnt
=
0
_port
s
_cnt
=
0
_soft_macros_cnt
=
0
_soft_macro_pins_cnt
=
0
_stdcells_cnt
=
0
...
...
@@ -377,11 +376,9 @@ class PlacementCost(object):
if
'Columns'
in
line_item
and
'Rows'
in
line_item
:
# Columns and Rows should be defined on the same one-line
print
(
"HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
)
_columns
=
int
(
line_item
[
1
])
_rows
=
int
(
line_item
[
3
])
elif
"Area"
in
line_item
:
print
(
"WTFFFFFFFFFf"
)
# Total core area of modules
_area
=
float
(
line_item
[
1
])
elif
"Block"
in
line_item
:
...
...
@@ -389,7 +386,6 @@ class PlacementCost(object):
_block
=
str
(
line_item
[
1
])
elif
all
(
it
in
line_item
for
it
in
\
[
'Routes'
,
'per'
,
'micron'
,
'hor'
,
'ver'
]):
print
(
"HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
)
# For routing congestion computation
_routes_per_micron_hor
=
float
(
line_item
[
4
])
_routes_per_micron_ver
=
float
(
line_item
[
6
])
...
...
@@ -412,13 +408,13 @@ class PlacementCost(object):
_hard_macro_pins_cnt
=
int
(
line_item
[
3
])
elif
all
(
it
in
line_item
for
it
in
[
'PORTs'
])
\
and
len
(
line_item
)
==
2
:
_port_cnt
=
int
(
line_item
[
1
])
_port
s
_cnt
=
int
(
line_item
[
1
])
elif
all
(
it
in
line_item
for
it
in
[
'SOFT'
,
'MACROs'
])
\
and
len
(
line_item
)
==
3
:
_soft_macros_cnt
=
int
(
line_item
[
2
])
elif
all
(
it
in
line_item
for
it
in
[
'SOFT'
,
'MACRO'
,
'PINs'
])
\
and
len
(
line_item
)
==
4
:
_soft_macro
s_pin
_cnt
=
int
(
line_item
[
3
])
_soft_macro
_pins
_cnt
=
int
(
line_item
[
3
])
elif
all
(
it
in
line_item
for
it
in
[
'STDCELLs'
])
\
and
len
(
line_item
)
==
2
:
_stdcells_cnt
=
int
(
line_item
[
1
])
...
...
@@ -444,9 +440,9 @@ class PlacementCost(object):
"overlap_threshold"
:
_overlap_threshold
,
"hard_macros_cnt"
:
_hard_macros_cnt
,
"hard_macro_pins_cnt"
:
_hard_macro_pins_cnt
,
"macro
_cnt"
:
_macro
_cnt
,
"macro
s_cnt"
:
_macros
_cnt
,
"macro_pin_cnt"
:
_macro_pin_cnt
,
"port
_cnt"
:
_port
_cnt
,
"port
s_cnt"
:
_ports
_cnt
,
"soft_macros_cnt"
:
_soft_macros_cnt
,
"soft_macro_pins_cnt"
:
_soft_macro_pins_cnt
,
"stdcells_cnt"
:
_stdcells_cnt
,
...
...
@@ -470,7 +466,6 @@ class PlacementCost(object):
# validate netlist.pb.txt is on par with .plc
if
ifValidate
:
print
(
self
.
hard_macro_cnt
,
info_dict
[
'hard_macros_cnt'
])
assert
(
self
.
hard_macro_cnt
==
info_dict
[
'hard_macros_cnt'
])
assert
(
self
.
hard_macro_pin_cnt
==
info_dict
[
'hard_macro_pins_cnt'
])
assert
(
self
.
soft_macro_cnt
==
info_dict
[
'soft_macros_cnt'
])
...
...
CodeElements/Plc_client/plc_client_os_test.py
View file @
db33a447
...
...
@@ -18,7 +18,7 @@ Test Utility Class for Google's API plc_wrapper_main with plc_client.py and plc_
Example:
At ./MacroPlacement/CodeElement, run the following command:
$ python -m Plc_client.plc_client_os_test
$ python -m Plc_client.plc_client_os_test
[NETLIST_PATH] [PLC_PATH]
Todo:
* Clean up code
...
...
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