From 8bcbc40d8428ad62a5f66df8817b02ce629aa048 Mon Sep 17 00:00:00 2001 From: harrisonliew Date: Mon, 20 May 2019 13:17:40 -0700 Subject: [PATCH] Enhance bump API (#403) --- src/hammer-vlsi/defaults.yml | 7 ++++--- src/hammer-vlsi/hammer_vlsi/constraints.py | 7 +++++-- src/hammer-vlsi/hammer_vlsi/hammer_tool.py | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/hammer-vlsi/defaults.yml b/src/hammer-vlsi/defaults.yml index 9a2a0407d..b0ebb85ef 100644 --- a/src/hammer-vlsi/defaults.yml +++ b/src/hammer-vlsi/defaults.yml @@ -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) diff --git a/src/hammer-vlsi/hammer_vlsi/constraints.py b/src/hammer-vlsi/hammer_vlsi/constraints.py index 60c1c4c1e..c6d3c7622 100644 --- a/src/hammer-vlsi/hammer_vlsi/constraints.py +++ b/src/hammer-vlsi/hammer_vlsi/constraints.py @@ -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', @@ -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', [ diff --git a/src/hammer-vlsi/hammer_vlsi/hammer_tool.py b/src/hammer-vlsi/hammer_vlsi/hammer_tool.py index 085457806..5329839ad 100644 --- a/src/hammer-vlsi/hammer_vlsi/hammer_tool.py +++ b/src/hammer-vlsi/hammer_vlsi/hammer_tool.py @@ -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"),