Skip to content

Commit

Permalink
Enhance bump API (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisonliew authored and edwardcwang committed May 20, 2019
1 parent 984e657 commit 8bcbc40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/hammer-vlsi/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,15 @@ vlsi.inputs:
y: 0
# pitch (float) - pitch of bumps in microns
pitch: 0.0
# cell (str) - Name of bump cell
# cell (str) - Name of the default bump cell
cell: ""
# assignments - List of BumpAssignment structs. You must specify one of name or no_connect.
# If both are specified the bump will be left unconnected
# - name (Optional[str]) - The name of the net being assigned to a bump
# - no_connect (Optional[bool]) - If True the bump will be present but unconnected
# - x (int) - The X coordinate of the bump assigned to this net
# - y (int) - The Y coordinate of the bump assigned to this net
# - x (Decimal) - The X coordinate of the bump assigned to this net
# - y (Decimal) - The Y coordinate of the bump assigned to this net
# - custom_cell (Optional[str]) - Cell name (MACRO name) of a custom bump cell in place of the default for this bump. You must also specify the LEF and GDS for this bump in extra_libraries.
assignments: []

# Pin placement mode. (str)
Expand Down
7 changes: 5 additions & 2 deletions src/hammer-vlsi/hammer_vlsi/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from hammer_utils import reverse_dict
from .units import TimeValue, VoltageValue, TemperatureValue

from decimal import Decimal

__all__ = ['ILMStruct', 'SRAMParameters', 'Supply', 'PinAssignment',
'BumpAssignment', 'BumpsDefinition', 'ClockPort',
'OutputLoadConstraint', 'DelayConstraint', 'ObstructionType',
Expand Down Expand Up @@ -97,8 +99,9 @@ def from_setting(d: dict) -> "SRAMParameters":
BumpAssignment = NamedTuple('BumpAssignment', [
('name', Optional[str]),
('no_connect', Optional[bool]),
('x', int),
('y', int)
('x', Decimal),
('y', Decimal),
('custom_cell', Optional[str])
])

BumpsDefinition = NamedTuple('BumpsDefinition', [
Expand Down
3 changes: 2 additions & 1 deletion src/hammer-vlsi/hammer_vlsi/hammer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,13 @@ def get_bumps(self) -> Optional[BumpsDefinition]:
no_con = False if not "no_connect" in raw_assign else raw_assign["no_connect"]
x = raw_assign["x"]
y = raw_assign["y"]
cell = None if not "custom_cell" in raw_assign else raw_assign["custom_cell"]
if name is None and not no_con:
self.logger.warning("Invalid bump assignment, neither name nor no_connect specified for bump {x},{y}. Assuming it should be unassigned".format(
x=x, y=y))
else:
assignments.append(BumpAssignment(name=name, no_connect=no_con,
x=x, y=y))
x=x, y=y, custom_cell=cell))
return BumpsDefinition(x=self.get_setting("vlsi.inputs.bumps.x"),
y=self.get_setting("vlsi.inputs.bumps.y"),
pitch=self.get_setting("vlsi.inputs.bumps.pitch"),
Expand Down

0 comments on commit 8bcbc40

Please sign in to comment.