view_gds.py update

This commit is contained in:
Harrison Liew
2021-08-03 15:44:44 -07:00
committed by dpgrubb13
parent 9f4f4144f4
commit 418ddc1a29
2 changed files with 11 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo
* view_gds.py * view_gds.py
* A convenience script to view a layout using gdstk or gdspy. Note that this will be very slow for large layouts (e.g. a Rocket core)! * A convenience script to view a layout using gdstk or gdspy. Only use this for small layouts (i.e. smaller than the TinyRocketConfig example) since the gdstk-produced SVG will be too big and gdspy's GUI is very slow for large layouts!
Prerequisites Prerequisites
------------- -------------

View File

@@ -4,17 +4,16 @@ import sys, os, subprocess
print('Loading GDS...') print('Loading GDS...')
#try: try:
# # gdstk created SVG # gdstk created SVG
# import gdstk import gdstk
#except ImportError: except ImportError:
# try: try:
# import gdspy import gdspy
# import tkinter import tkinter
# except ImportError: except ImportError:
# print('Bad gdspy (requires tkinter) installation!') print('Bad gdspy (requires tkinter) installation!')
# sys.exit() sys.exit()
import gdspy
if 'gdstk' in sys.modules: if 'gdstk' in sys.modules:
svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg' svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg'