Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the "KeyError" issue when executing "python dreamplace/Placer.py --help" #184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dreamplace/Params.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def getDefaultColumn(key, value):
for key, value in self.params_dict.items():
key_length_map.append(len(key))
default_length_map.append(len(str(getDefaultColumn(key, value))))
description_length_map.append(len(value['description']))
description_length_map.append(len(value.get('description', '')))
key_length = max(key_length, key_length_map[-1])
default_length = max(default_length, default_length_map[-1])
description_length = max(description_length, description_length_map[-1])
Expand All @@ -100,7 +100,7 @@ def getDefaultColumn(key, value):
" " * (key_length - key_length_map[count] + 1),
str(getDefaultColumn(key, value)),
" " * (default_length - default_length_map[count] + 1),
value['description'],
value.get('description', ''),
" " * (description_length - description_length_map[count] + 1)
)
count += 1
Expand Down
10 changes: 5 additions & 5 deletions dreamplace/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,16 @@
"required" : "required for timing-driven mode"
},
"use_bb" : {
"descripton" : "whether use bb step",
"description" : "whether use bb step",
"default" : 0
},
"macro_place_flag" : {
"descripton" : "whether enable macro placement",
"default" : 0
"description" : "whether enable macro placement",
"default" : 0
},
"two_stage_density_scaler" : {
"descripton" : "scale density weight after macro place",
"default" : 1000
"description" : "scale density weight after macro place",
"default" : 1000
},
"macro_halo_x": {
"description": "horizontal halo around movable macros",
Expand Down