Skip to content

Commit

Permalink
Name generated obstructions (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 authored Nov 25, 2023
1 parent dac4999 commit 711931d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hammer/par/innovus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,15 +1073,18 @@ def generate_floorplan_tcl(self) -> List[str]:

elif constraint.type == PlacementConstraintType.Obstruction:
obs_types = get_or_else(constraint.obs_types, []) # type: List[ObstructionType]
assert '/' not in new_path, "'obstruction' placement constraints must be provided a path directly under the top level"
if ObstructionType.Place in obs_types:
output.append("create_place_blockage -area {{{x} {y} {urx} {ury}}}".format(
output.append("create_place_blockage -name {name}_place -area {{{x} {y} {urx} {ury}}}".format(
name=new_path,
x=constraint.x,
y=constraint.y,
urx=constraint.x+constraint.width,
ury=constraint.y+constraint.height
))
if ObstructionType.Route in obs_types:
output.append("create_route_blockage -except_pg_nets -{layers} -spacing 0 -{area_flag} {{{x} {y} {urx} {ury}}}".format(
output.append("create_route_blockage -name {name}_route -except_pg_nets -{layers} -spacing 0 -{area_flag} {{{x} {y} {urx} {ury}}}".format(
name=new_path,
x=constraint.x,
y=constraint.y,
urx=constraint.x+constraint.width,
Expand All @@ -1090,7 +1093,8 @@ def generate_floorplan_tcl(self) -> List[str]:
layers="all {route}" if constraint.layers is None else f'layers {{{" ".join(get_or_else(constraint.layers, []))}}}'
))
if ObstructionType.Power in obs_types:
output.append("create_route_blockage -pg_nets -{layers} -{area_flag} {{{x} {y} {urx} {ury}}}".format(
output.append("create_route_blockage -name {name}_power -pg_nets -{layers} -{area_flag} {{{x} {y} {urx} {ury}}}".format(
name=new_path,
x=constraint.x,
y=constraint.y,
urx=constraint.x+constraint.width,
Expand Down

0 comments on commit 711931d

Please sign in to comment.