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
* 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
-------------

View File

@@ -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'