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

Updates for DDI221 #798

Merged
merged 7 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions hammer/config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ vlsi.inputs:

constraints: [] # Manual hierarchical constraints. Overrides generic constraints on a per module basis.
# Should be a list along the lines of [{"module1": <list of other hammer constraints>}].
# For example [{"mod1": [vlsi.inputs.default_output_load: 2], "mod2": [vlsi.inputs.clocks:<clock constraints>] }].
# For example [{"mod1": [vlsi.inputs.default_output_load: "2 pF"], "mod2": [vlsi.inputs.clocks:<clock constraints>] }].

ilms: [] # ILMs for hierarchical mode.
# ILM struct (ILMStruct) members:
Expand Down Expand Up @@ -188,13 +188,13 @@ vlsi.inputs:
# group (str) - Optional. The name of the clock group this clock belongs to. Clocks in the same group will not be marked as asynchronous.
# Clocks with no group specified will all be placed in separate groups and thus marked as asynchronous to each other and all other groups.

default_output_load: 1 # Default output pin load capacitance.
# Default: 1pF
default_output_load: "1 pF" # Default output pin load capacitance.
# type: CapacitanceValue

output_loads: [] # List of output load constraints.
# Each item in the list should be a struct with the following members:
# name (str) - Name of the output load (e.g. io_out)
# load (float) - Output load capacitance in pF.
# load (CapacitanceValue) - Output load capacitance (e.g. "1 pF").

delays: [] # List of delay constraints.
# These either constrain inputs to arrive after a certain delay relative
Expand Down
2 changes: 1 addition & 1 deletion hammer/config/defaults_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ vlsi.inputs:
clocks: list[dict[str, Any]]

# Default output pin load capacitance.
default_output_load: int
default_output_load: str

# List of output load constraints.
output_loads: list[dict[str, str]]
Expand Down
2 changes: 2 additions & 0 deletions hammer/par/innovus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def output_ilm_sdcs(self) -> List[str]:
def env_vars(self) -> Dict[str, str]:
v = dict(super().env_vars)
v["INNOVUS_BIN"] = self.get_setting("par.innovus.innovus_bin")
if self.version() >= self.version_number("221"): # support critical region resynthesis with DDI
v["PATH"] = f'{os.environ.copy()["PATH"]}:{os.path.dirname(self.get_setting("par.innovus.innovus_bin").replace("INNOVUS", "GENUS"))}'
return v

@property
Expand Down
10 changes: 4 additions & 6 deletions hammer/par/innovus/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@

par.innovus:
# Location of the binary.
innovus_bin: "${cadence.cadence_home}/INNOVUS/INNOVUS${par.innovus.version}/bin/innovus"
innovus_bin: "${cadence.cadence_home}/DDI/DDI${par.innovus.version}/INNOVUS${par.innovus.version}/bin/innovus"
innovus_bin_meta: lazysubst # we want later overrides to be able to affect this

# Innovus version to use.
# Used to locate the binary - e.g. the '171' in ${cadence.cadence_home}/INNOVUS/INNOVUS171/bin/innovus
# 171_ISR3 supports ILMs properly in contrast to 171.
version: "171_ISR3"
# Used to locate the binary - e.g. the '221' in ${cadence.cadence_home}/DDI/DDI221/INNOVUS2211/bin/innovus
version: "221"

# Design flow effort.
# Valid options: express (fastest), standard, and extreme (slowest).
# Default: express to increase turnaround speed.
design_flow_effort: "express"
design_flow_effort: "standard"

# Floorplanning SDC constraints to use.
# Valid options are:
Expand Down
14 changes: 6 additions & 8 deletions hammer/synthesis/genus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ def do_pre_steps(self, first_step: HammerToolStep) -> bool:
def do_between_steps(self, prev: HammerToolStep, next: HammerToolStep) -> bool:
assert super().do_between_steps(prev, next)
# Write a checkpoint to disk.
if self.version() >= self.version_number("221"):
# -common now enables database reading in Innovus
self.verbose_append("write_db -common -to_file pre_{step}".format(step=next.name))
else:
self.verbose_append("write_db -to_file pre_{step}".format(step=next.name))
self.verbose_append("write_db -to_file pre_{step}".format(step=next.name))
return True

def do_post_steps(self) -> bool:
Expand Down Expand Up @@ -198,10 +194,9 @@ def init_environment(self) -> bool:
# Clock gating setup
if self.get_setting("synthesis.clock_gating_mode") == "auto":
verbose_append("set_db lp_clock_gating_infer_enable true")
# Innovus will create instances named CLKGATE_foo, CLKGATE_bar, etc.
# Genus will create instances named CLKGATE_foo, CLKGATE_bar, etc.
verbose_append("set_db lp_clock_gating_prefix {CLKGATE}")
verbose_append("set_db lp_insert_clock_gating true")
verbose_append("set_db lp_insert_clock_gating_incremental true")
verbose_append("set_db lp_clock_gating_register_aware true")

# Set up libraries.
Expand Down Expand Up @@ -348,7 +343,10 @@ def write_outputs(self) -> bool:
verbose_append("write_hdl > {}".format(self.mapped_v_path))
if self.hierarchical_mode.is_nonleaf_hierarchical() and self.version() >= self.version_number("191"):
verbose_append("write_hdl -exclude_ilm > {}".format(self.mapped_hier_v_path))
verbose_append("write_script > {}.mapped.scr".format(top))
if self.version() >= self.version_number("221"):
verbose_append("write_template -full -outfile {}.mapped.scr".format(top))
else:
verbose_append("write_script > {}.mapped.scr".format(top))
corners = self.get_mmmc_corners()
if corners:
# First setup corner is default view
Expand Down
6 changes: 3 additions & 3 deletions hammer/synthesis/genus/defaults.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Default settings for synthesis in Genus, for project/technology configuration and overriding.
synthesis.genus:
# Location of the binary.
genus_bin: "${cadence.cadence_home}/GENUS/GENUS${synthesis.genus.version}/bin/genus"
genus_bin: "${cadence.cadence_home}/DDI/DDI${synthesis.genus.version}/GENUS${synthesis.genus.version}/bin/genus"
genus_bin_meta: lazysubst # we want later overrides to be able to affect this

# Genus version to use.
# Used to locate the binary - e.g. the '171' in ${cadence.cadence_home}/GENUS/GENUS171/bin/genus
version: "171"
# Used to locate the binary - e.g. the '221' in ${cadence.cadence_home}/DDI/DDI221/GENUS221/bin/genus
version: "221"

# Generate the TCL file but do not run it yet.
generate_only: false
2 changes: 1 addition & 1 deletion hammer/vlsi/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def name_bump(self, definition: BumpsDefinition, assignment: BumpAssignment) ->

OutputLoadConstraint = NamedTuple('OutputLoadConstraint', [
('name', str),
('load', float)
('load', CapacitanceValue)
])


Expand Down
2 changes: 1 addition & 1 deletion hammer/vlsi/hammer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ def get_output_load_constraints(self) -> List[OutputLoadConstraint]:
for load_src in output_loads:
load = OutputLoadConstraint(
name=str(load_src["name"]),
load=float(load_src["load"])
load=CapacitanceValue(load_src["load"])
)
output.append(load)
return output
Expand Down
10 changes: 6 additions & 4 deletions hammer/vlsi/hammer_vlsi_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,9 @@ def sdc_pin_constraints(self) -> str:
"""Generate a fragment for I/O pin constraints."""
output = [] # type: List[str]

default_output_load = float(self.get_setting("vlsi.inputs.default_output_load"))
output.append("set_units -capacitance fF")

default_output_load = CapacitanceValue(self.get_setting("vlsi.inputs.default_output_load")).value_in_units("fF", round_zeroes = True)

# Specify default load.
output.append("set_load {load} [all_outputs]".format(
Expand All @@ -2179,14 +2181,14 @@ def sdc_pin_constraints(self) -> str:

# Also specify loads for specific pins.
for load in self.get_output_load_constraints():
output.append("set_load {load} [get_port \"{name}\"]".format(
load=load.load,
output.append("set_load {load} [get_port {name}]".format(
load=load.load.value_in_units("fF", round_zeroes = True),
name=load.name
))

# Also specify delays for specific pins.
for delay in self.get_delay_constraints():
output.append("set_{direction}_delay {delay} -clock {clock} [get_port \"{name}\"]".format(
output.append("set_{direction}_delay {delay} -clock {clock} [get_port {name}]".format(
delay=delay.delay.value_in_units(self.get_time_unit().value_prefix + self.get_time_unit().unit),
clock=delay.clock,
direction=delay.direction,
Expand Down