diff --git a/vlsi/example-asap7.yml b/vlsi/example-asap7.yml index d8011a80..683edaae 100644 --- a/vlsi/example-asap7.yml +++ b/vlsi/example-asap7.yml @@ -1,8 +1,11 @@ # Technology Setup # Technology used is ASAP7 vlsi.core.technology: asap7 -# Specify dir with ASAP7 tarball -technology.asap7.tarball_dir: "" +# Specify dir with ASAP7 Calibre deck tarball +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 @@ -20,30 +23,6 @@ vlsi.inputs.clocks: [ # Generate Make include to aid in flow 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 # For ASAP7, all numbers must be 4x larger than final GDS vlsi.inputs.placement_constraints: diff --git a/vlsi/example-tools.yml b/vlsi/example-tools.yml index aad8afe5..63ae4b0f 100644 --- a/vlsi/example-tools.yml +++ b/vlsi/example-tools.yml @@ -20,8 +20,10 @@ par.inputs.gds_merge: true # Calibre options vlsi.core.drc_tool: "calibre" 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_path: ["hammer-mentor-plugins/lvs"] +lvs.calibre.version: "2017.3_38.30" # VCS options vlsi.core.sim_tool: "vcs" vlsi.core.sim_tool_path: ["hammer-synopsys-plugins/sim"] diff --git a/vlsi/example-vlsi b/vlsi/example-vlsi index 550b56c5..bf280f0f 100755 --- a/vlsi/example-vlsi +++ b/vlsi/example-vlsi @@ -36,25 +36,6 @@ set_db route_design_top_routing_layer 7 ''') 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): def get_extra_par_hooks(self) -> List[HammerToolHookAction]: extra_hooks = [ @@ -66,7 +47,7 @@ class ExampleDriver(CLIDriver): # 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 - 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 # 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"), # 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 diff --git a/vlsi/hammer b/vlsi/hammer index 353af21d..3b3061d8 160000 --- a/vlsi/hammer +++ b/vlsi/hammer @@ -1 +1 @@ -Subproject commit 353af21da3fe6f0c2e054ac513b5db583031b962 +Subproject commit 3b3061d8a4d7170d89673d3356f0109cbc6d3a1a diff --git a/vlsi/hammer-cadence-plugins b/vlsi/hammer-cadence-plugins index 191026ed..b9acde1d 160000 --- a/vlsi/hammer-cadence-plugins +++ b/vlsi/hammer-cadence-plugins @@ -1 +1 @@ -Subproject commit 191026ed35fd86ba471d81a130f898db2928c7f4 +Subproject commit b9acde1d06f567e356e4c8ab401d068f70735fa7 diff --git a/vlsi/view_gds.py b/vlsi/view_gds.py index edc94926..746513f4 100755 --- a/vlsi/view_gds.py +++ b/vlsi/view_gds.py @@ -1,66 +1,82 @@ -import sys +#!/usr/bin/python3 -try: - import gdspy -except ImportError: - print('Bad gdspy installation!') - sys.exit() +import sys, os, subprocess print('Loading GDS...') -gds_lib = gdspy.GdsLibrary().read_gds(infile=str(sys.argv[1]), units='import') -# Comment to show layer -hidden=[ - (1, 0), #well - (1, 251), #well lbl - (2, 0), #fin - (3, 0), #psub - (3, 251), #psub lbl - (7, 0), #gate - (8, 0), #dummy - (10, 0), #gate cut - (11, 0), #active - (12, 0), #nselect - (13, 0), #pselect - (16, 0), #LIG - (17, 0), #LISD - (18, 0), #V0 - (19, 0), #M1 - (19, 251), #M1 lbl - (21, 0), #V1 - #(20, 0), #M2 - (20, 251), #M2 lbl - #(25, 0), #V2 - #(30, 0), #M3 - (30, 251), #M3 lbl - #(35, 0), #V3 - #(40, 0), #M4 - (40, 251), #M4 lbl - (45, 0), #V4 - (50, 0), #M5 - (50, 251), #M5 lbl - (55, 0), #V5 - (60, 0), #M6 - (60, 251), #M6 lbl - (65, 0), #V6 - (70, 0), #M7 - (70, 251), #M7 lbl - (75, 0), #V7 - (80, 0), #M8 - (80, 251), #M8 lbl - (85, 0), #V8 - (88, 0), #SDT - (90, 0), #M9 - (90, 251), #M9 lbl - (95, 0), #V9 - (96, 0), #Pad - (97, 0), #SLVT - (98, 0), #LVT - (99, 0), #SRAMDRC - (100, 0), #??? - (101, 0), #??? - (110, 0) #SRAMVT - ] +#try: +# # gdstk created SVG +# import gdstk +#except ImportError: +# try: +# import gdspy +# import tkinter +# except ImportError: +# print('Bad gdspy (requires tkinter) installation!') +# sys.exit() +import gdspy -print('Opening layout...') -gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1) +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, 251), #well lbl + (2, 0), #fin + (3, 0), #psub + (3, 251), #psub lbl + (7, 0), #gate + (8, 0), #dummy + (10, 0), #gate cut + (11, 0), #active + (12, 0), #nselect + (13, 0), #pselect + (16, 0), #LIG + (17, 0), #LISD + (18, 0), #V0 + (19, 0), #M1 + (19, 251), #M1 lbl + (21, 0), #V1 + #(20, 0), #M2 + (20, 251), #M2 lbl + #(25, 0), #V2 + #(30, 0), #M3 + (30, 251), #M3 lbl + #(35, 0), #V3 + #(40, 0), #M4 + (40, 251), #M4 lbl + (45, 0), #V4 + (50, 0), #M5 + (50, 251), #M5 lbl + (55, 0), #V5 + (60, 0), #M6 + (60, 251), #M6 lbl + (65, 0), #V6 + (70, 0), #M7 + (70, 251), #M7 lbl + (75, 0), #V7 + (80, 0), #M8 + (80, 251), #M8 lbl + (85, 0), #V8 + (88, 0), #SDT + (90, 0), #M9 + (90, 251), #M9 lbl + (95, 0), #V9 + (96, 0), #Pad + (97, 0), #SLVT + (98, 0), #LVT + (99, 0), #SRAMDRC + (100, 0), #BOUNDARY + (101, 0), #TEXT + (110, 0), #SRAMVT + (235, 5) #DIEAREA + ] + + print('Opening layout in gdspy...') + gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1)