Various modifications to accommodate the somewhat complicated
management of include statements in verilog files in order to
build the compiled libraries.
diff --git a/common/create_gds_library.py b/common/create_gds_library.py
index 85380fe..34424fb 100755
--- a/common/create_gds_library.py
+++ b/common/create_gds_library.py
@@ -38,7 +38,10 @@
def create_gds_library(destlibdir, destlib, startup_script, do_compile_only=False, excludelist=[], keep=False):
- alllibname = destlibdir + '/' + destlib + '.gds'
+ # destlib should not have a file extension
+ destlibroot = os.path.splitext(destlib)[0]
+
+ alllibname = destlibdir + '/' + destlibroot + '.gds'
if os.path.isfile(alllibname):
os.remove(alllibname)
@@ -86,8 +89,8 @@
for gdsfile in glist:
print('gds read ' + gdsfile, file=ofile)
- print('puts stdout "Creating cell ' + destlib + '"', file=ofile)
- print('load ' + destlib, file=ofile)
+ print('puts stdout "Creating cell ' + destlibroot + '"', file=ofile)
+ print('load ' + destlibroot, file=ofile)
print('puts stdout "Adding cells to library"', file=ofile)
print('box values 0 0 0 0', file=ofile)
for gdsfile in glist:
@@ -97,9 +100,9 @@
# Could properly make space for the cell here. . .
print('box move e 200', file=ofile)
- print('puts stdout "Writing GDS library ' + destlib + '"', file=ofile)
+ print('puts stdout "Writing GDS library ' + destlibroot + '"', file=ofile)
print('gds library true', file=ofile)
- print('gds write ' + destlib, file=ofile)
+ print('gds write ' + destlibroot, file=ofile)
print('puts stdout "Done."', file=ofile)
print('quit -noprompt', file=ofile)