Skip to content

Commit

Permalink
ol2/tt_top: Add sealring insertion step
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Munaut <[email protected]>
  • Loading branch information
smunaut committed Oct 30, 2024
1 parent 8dca575 commit 7f89e87
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions ol2/tt_top/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from openlane.flows.misc import OpenInKLayout
from openlane.flows.sequential import SequentialFlow
from openlane.state import DesignFormat, State
from openlane.steps.klayout import KLayoutStep
from openlane.steps.odb import OdbpyStep
from openlane.steps.openroad import OpenROADStep
from openlane.steps.step import ViewsUpdate, MetricsUpdate
Expand Down Expand Up @@ -115,6 +116,48 @@ def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
return views_updates, {}


@Step.factory.register()
class IHPSealRing(KLayoutStep):

id = "TT.IHP.SealRing"
name = "Adds Seal Ring to the GDS"

inputs = [DesignFormat.GDS]
outputs = [DesignFormat.GDS]

def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
views_updates: ViewsUpdate = {}

input_gds = state_in[DesignFormat.GDS]
output_gds = os.path.join(
self.step_dir,
f"{self.config['DESIGN_NAME']}.{DesignFormat.GDS.value.extension}"
)

script = os.path.join(
os.path.dirname(__file__),
"../../py/ihp_seal_ring.py"
)

self.run_pya_script(
[
script,
"--input-gds",
abspath(input_gds),
"--output-gds",
abspath(output_gds),
"--die-width",
f"{self.config['DIE_AREA'][2]:f}",
"--die-height",
f"{self.config['DIE_AREA'][3]:f}",
],
)

views_updates[DesignFormat.GDS] = Path(output_gds)

return views_updates, {}


class TopFlow(SequentialFlow):

Steps: List[Type[Step]] = [
Expand Down Expand Up @@ -146,6 +189,7 @@ class TopFlow(SequentialFlow):
IHPExtractSpice,
Netgen.LVS,
Checker.LVS,
IHPSealRing,
]


Expand Down

0 comments on commit 7f89e87

Please sign in to comment.