full flow working with example config

This commit is contained in:
Harrison Liew
2021-08-03 13:57:47 -07:00
committed by dpgrubb13
parent b4af52c5e3
commit 5da1eab9d5
6 changed files with 87 additions and 112 deletions

View File

@@ -1,8 +1,11 @@
# Technology Setup # Technology Setup
# Technology used is ASAP7 # Technology used is ASAP7
vlsi.core.technology: asap7 vlsi.core.technology: asap7
# Specify dir with ASAP7 tarball # Specify dir with ASAP7 Calibre deck tarball
technology.asap7.tarball_dir: "" technology.asap7.tarball_dir: "/path/to/asap7"
# Specify PDK and std cell install directories
# technology.asap7.pdk_install_dir: "/path/to/asap7/asap7PDK_r1p7"
# technology.asap7.stdcell_install_dir: "/path/to/asap7/asap7sc7p5t_27"
vlsi.core.max_threads: 12 vlsi.core.max_threads: 12
@@ -20,30 +23,6 @@ vlsi.inputs.clocks: [
# Generate Make include to aid in flow # Generate Make include to aid in flow
vlsi.core.build_system: make vlsi.core.build_system: make
# Power Straps
par.power_straps_mode: generate
par.generate_power_straps_method: by_tracks
par.blockage_spacing: 2.0
par.generate_power_straps_options:
by_tracks:
strap_layers:
- M3
- M4
- M5
- M6
- M7
- M8
- M9
pin_layers:
- M9
track_width: 7 # minimum allowed for M2 & M3
track_spacing: 0
track_spacing_M3: 1 # to avoid M2 shorts at higher density
track_start: 10
power_utilization: 0.2
power_utilization_M8: 1.0
power_utilization_M9: 1.0
# Placement Constraints # Placement Constraints
# For ASAP7, all numbers must be 4x larger than final GDS # For ASAP7, all numbers must be 4x larger than final GDS
vlsi.inputs.placement_constraints: vlsi.inputs.placement_constraints:

View File

@@ -20,8 +20,10 @@ par.inputs.gds_merge: true
# Calibre options # Calibre options
vlsi.core.drc_tool: "calibre" vlsi.core.drc_tool: "calibre"
vlsi.core.drc_tool_path: ["hammer-mentor-plugins/drc"] vlsi.core.drc_tool_path: ["hammer-mentor-plugins/drc"]
drc.calibre.version: "2017.3_38.30"
vlsi.core.lvs_tool: "calibre" vlsi.core.lvs_tool: "calibre"
vlsi.core.lvs_tool_path: ["hammer-mentor-plugins/lvs"] vlsi.core.lvs_tool_path: ["hammer-mentor-plugins/lvs"]
lvs.calibre.version: "2017.3_38.30"
# VCS options # VCS options
vlsi.core.sim_tool: "vcs" vlsi.core.sim_tool: "vcs"
vlsi.core.sim_tool_path: ["hammer-synopsys-plugins/sim"] vlsi.core.sim_tool_path: ["hammer-synopsys-plugins/sim"]

View File

@@ -36,25 +36,6 @@ set_db route_design_top_routing_layer 7
''') ''')
return True return True
def scale_final_gds(x: hammer_vlsi.HammerTool) -> bool:
"""
Scale the final GDS by a factor of 4
hammer/src/hammer-vlsi/technology/asap7/__init__.py implements scale_gds_script
"""
if x.get_setting("vlsi.core.technology") == "asap7":
x.append('''
# Write script out to a temporary file and execute it
set fp [open "{script_file}" "w"]
puts -nonewline $fp "{script_text}"
close $fp
# Innovus <19.1 appends some bad LD_LIBRARY_PATHS, so remove them before executing python
set env(LD_LIBRARY_PATH) [join [lsearch -not -all -inline [split $env(LD_LIBRARY_PATH) ":"] "*INNOVUS*"] ":"]
python3 {script_file}
'''.format(script_text=x.technology.scale_gds_script(x.output_gds_filename), script_file=os.path.join(x.run_dir, "gds_scale.py")))
return True
class ExampleDriver(CLIDriver): class ExampleDriver(CLIDriver):
def get_extra_par_hooks(self) -> List[HammerToolHookAction]: def get_extra_par_hooks(self) -> List[HammerToolHookAction]:
extra_hooks = [ extra_hooks = [
@@ -66,7 +47,7 @@ class ExampleDriver(CLIDriver):
# hammer_vlsi.HammerTool.make_pre_insertion_hook("route_design", example_add_fillers), # hammer_vlsi.HammerTool.make_pre_insertion_hook("route_design", example_add_fillers),
# make_post_insertion_hook will execute the custom hook after the specified step # 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), # hammer_vlsi.HammerTool.make_post_insertion_hook("init_design", example_tool_settings),
# make_replacement_hook will replace the specified step with a custom hook # 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), # hammer_vlsi.HammerTool.make_replacement_hook("place_tap_cells", example_place_tap_cells),
@@ -75,9 +56,6 @@ class ExampleDriver(CLIDriver):
hammer_vlsi.HammerTool.make_removal_hook("place_bumps"), hammer_vlsi.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 # The target step in any of the above calls may be a default step or another one of your custom hooks
# This is an example of a technology-supplied hook
hammer_vlsi.HammerTool.make_post_insertion_hook("write_design", scale_final_gds)
] ]
return extra_hooks return extra_hooks

View File

@@ -1,16 +1,31 @@
import sys #!/usr/bin/python3
try: import sys, os, subprocess
import gdspy
except ImportError:
print('Bad gdspy installation!')
sys.exit()
print('Loading GDS...') print('Loading GDS...')
gds_lib = gdspy.GdsLibrary().read_gds(infile=str(sys.argv[1]), units='import')
# Comment to show layer #try:
hidden=[ # # gdstk created SVG
# import gdstk
#except ImportError:
# try:
# import gdspy
# import tkinter
# except ImportError:
# print('Bad gdspy (requires tkinter) installation!')
# sys.exit()
import gdspy
if 'gdstk' in sys.modules:
svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg'
print('Opening {} with xdg-open...'.format(os.path.basename(svg_file)))
subprocess.call(['xdg-open', svg_file])
elif 'gdspy' in sys.modules:
gds_lib = gdspy.GdsLibrary().read_gds(infile=str(sys.argv[1]), units='import')
# Comment to show layer
hidden=[
(1, 0), #well (1, 0), #well
(1, 251), #well lbl (1, 251), #well lbl
(2, 0), #fin (2, 0), #fin
@@ -57,10 +72,11 @@ hidden=[
(97, 0), #SLVT (97, 0), #SLVT
(98, 0), #LVT (98, 0), #LVT
(99, 0), #SRAMDRC (99, 0), #SRAMDRC
(100, 0), #??? (100, 0), #BOUNDARY
(101, 0), #??? (101, 0), #TEXT
(110, 0) #SRAMVT (110, 0), #SRAMVT
(235, 5) #DIEAREA
] ]
print('Opening layout...') print('Opening layout in gdspy...')
gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1) gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1)