diff --git a/docs/VLSI/Tutorial.rst b/docs/VLSI/Tutorial.rst index 65ee0b5e..f69e5469 100644 --- a/docs/VLSI/Tutorial.rst +++ b/docs/VLSI/Tutorial.rst @@ -44,7 +44,7 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo * 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 ------------- diff --git a/vlsi/view_gds.py b/vlsi/view_gds.py index 746513f4..fc33527b 100755 --- a/vlsi/view_gds.py +++ b/vlsi/view_gds.py @@ -4,17 +4,16 @@ import sys, os, subprocess print('Loading GDS...') -#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 +try: + # gdstk created SVG + import gdstk +except ImportError: + try: + import gdspy + import tkinter + except ImportError: + print('Bad gdspy (requires tkinter) installation!') + sys.exit() if 'gdstk' in sys.modules: svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg'