initial migration to new Hammer
This commit is contained in:
committed by
abejgonzalez
parent
a6921d15c6
commit
22fda3a6a7
@@ -5,12 +5,11 @@
|
||||
|
||||
import os
|
||||
|
||||
import hammer_vlsi
|
||||
from hammer_vlsi import CLIDriver, HammerToolHookAction
|
||||
from hammer.vlsi import CLIDriver, HammerTool, HammerToolHookAction
|
||||
|
||||
from typing import Dict, Callable, Optional, List
|
||||
|
||||
def example_place_tap_cells(x: hammer_vlsi.HammerTool) -> bool:
|
||||
def example_place_tap_cells(x: HammerTool) -> bool:
|
||||
if x.get_setting("vlsi.core.technology") == "asap7":
|
||||
x.append('''
|
||||
# TODO
|
||||
@@ -18,7 +17,7 @@ def example_place_tap_cells(x: hammer_vlsi.HammerTool) -> bool:
|
||||
''')
|
||||
return True
|
||||
|
||||
def example_add_fillers(x: hammer_vlsi.HammerTool) -> bool:
|
||||
def example_add_fillers(x: HammerTool) -> bool:
|
||||
if x.get_setting("vlsi.core.technology") == "asap7":
|
||||
x.append('''
|
||||
# TODO
|
||||
@@ -26,7 +25,7 @@ def example_add_fillers(x: hammer_vlsi.HammerTool) -> bool:
|
||||
''')
|
||||
return True
|
||||
|
||||
def example_tool_settings(x: hammer_vlsi.HammerTool) -> bool:
|
||||
def example_tool_settings(x: HammerTool) -> bool:
|
||||
if x.get_setting("vlsi.core.technology") == "asap7":
|
||||
x.append('''
|
||||
# TODO
|
||||
@@ -43,16 +42,16 @@ class ExampleDriver(CLIDriver):
|
||||
|
||||
# make_pre_insertion_hook will execute the custom hook before the specified step
|
||||
# SYNTAX: make_pre_insertion_hook("EXISTING_STEP", INSERTED_HOOK)
|
||||
# hammer_vlsi.HammerTool.make_pre_insertion_hook("route_design", example_add_fillers),
|
||||
# HammerTool.make_pre_insertion_hook("route_design", example_add_fillers),
|
||||
|
||||
# make_post_insertion_hook will execute the custom hook after the specified step
|
||||
# hammer_vlsi.HammerTool.make_post_insertion_hook("init_design", example_tool_settings),
|
||||
# HammerTool.make_post_insertion_hook("init_design", example_tool_settings),
|
||||
|
||||
# make_replacement_hook will replace the specified step with a custom hook
|
||||
# hammer_vlsi.HammerTool.make_replacement_hook("place_tap_cells", example_place_tap_cells),
|
||||
# HammerTool.make_replacement_hook("place_tap_cells", example_place_tap_cells),
|
||||
|
||||
# make_removal_hook will remove the specified step from the flow
|
||||
hammer_vlsi.HammerTool.make_removal_hook("place_bumps"),
|
||||
HammerTool.make_removal_hook("place_bumps"),
|
||||
|
||||
# The target step in any of the above calls may be a default step or another one of your custom hooks
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user