view_gds.py update
This commit is contained in:
@@ -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
|
||||||
-------------
|
-------------
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user