Corrected an error in installing the technology LEF file of the OSU standard cell libraries for GF180MCU, due to a change in file location and name in the upstream repository. Changed some strings in preproc.py and foundry_install.py to r-strings which prevents a lot of warning messages from being output.
diff --git a/VERSION b/VERSION index a9d3998..9203b1d 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.513 +1.0.514
diff --git a/common/foundry_install.py b/common/foundry_install.py index 34e3a46..ddbf5f7 100755 --- a/common/foundry_install.py +++ b/common/foundry_install.py
@@ -394,7 +394,7 @@ #---------------------------------------------------------------------------- def get_gds_properties(magfile): - proprex = re.compile('^[ \t]*string[ \t]+(GDS_[^ \t]+)[ \t]+([^ \t]+)$') + proprex = re.compile(r'^[ \t]*string[ \t]+(GDS_[^ \t]+)[ \t]+([^ \t]+)$') proplines = [] if os.path.isfile(magfile): with open(magfile, 'r') as ifile: @@ -415,10 +415,10 @@ def get_subckt_ports(cdlfile, subname): portdict = {} pidx = 1 - portrex = re.compile('^\.subckt[ \t]+([^ \t]+)[ \t]+(.*)$', flags=re.IGNORECASE) + portrex = re.compile(r'^\.subckt[ \t]+([^ \t]+)[ \t]+(.*)$', flags=re.IGNORECASE) with open(cdlfile, 'r') as ifile: cdltext = ifile.read() - cdllines = cdltext.replace('\n+', ' ').splitlines() + cdllines = cdltext.replace(r'\n+', ' ').splitlines() for line in cdllines: lmatch = portrex.match(line) if lmatch: @@ -449,7 +449,7 @@ # case that has been seen seems to work under the assumption that leading # whitespace is ignored up to the amount used by the last indentation. - vlines = re.sub('\\\\\n[ \t]*', '', vtext) + vlines = re.sub(r'\\\\\n[ \t]*', '', vtext) if vlines != vtext: # File contents have been modified, so if this file was a symbolic @@ -1026,7 +1026,7 @@ # Regular expression catches filename "a.b.c", handling any # leading dots (such as "../") and returns string "a.b" - basenamerex = re.compile('(\.?\.?[^.]+\..+)\.+') + basenamerex = re.compile(r'(\.?\.?[^.]+\..+)\.+') baseliblist = [] splitfiles = {} for libfile in liblist: @@ -1549,9 +1549,9 @@ print('Searching for supported devices in PDK script ' + pdkscript + '.') if os.path.isfile(pdkscript): - librex = re.compile('^[ \t]*set[ \t]+PDKNAMESPACE[ \t]+([^ \t]+)$') - devrex = re.compile('^[ \t]*proc[ \t]+([^ :\t]+)::([^ \t_]+)_defaults') - fixrex = re.compile('^[ \t]*return[ \t]+\[([^ :\t]+)::fixed_draw[ \t]+([^ \t]+)[ \t]+') + librex = re.compile(r'^[ \t]*set[ \t]+PDKNAMESPACE[ \t]+([^ \t]+)$') + devrex = re.compile(r'^[ \t]*proc[ \t]+([^ :\t]+)::([^ \t_]+)_defaults') + fixrex = re.compile(r'^[ \t]*return[ \t]+\[([^ :\t]+)::fixed_draw[ \t]+([^ \t]+)[ \t]+') devlist = [] fixedlist = [] with open(pdkscript, 'r') as ifile: @@ -1702,7 +1702,7 @@ print('catch {readspice ' + netdir + '/' + netfile + '}', file=ofile) - # print('cellname delete \(UNNAMED\)', file=ofile) + # print(r'cellname delete \(UNNAMED\)', file=ofile) print('puts stdout "Writing all magic database files"', file=ofile) print('writeall force', file=ofile) @@ -1741,7 +1741,7 @@ ltext = ifile.read() llines = ltext.splitlines() for lline in llines: - ltok = re.split(' |\t|\(', lline) + ltok = re.split(r' |\t|\(', lline) if ltok[0] == 'MACRO': lefmacros.append(ltok[1]) elif have_lef: @@ -1770,7 +1770,7 @@ vtext = ifile.read() vlines = vtext.splitlines() for vline in vlines: - vtok = re.split(' |\t|\(', vline) + vtok = re.split(r' |\t|\(', vline) try: if vtok[0] == 'module': if vtok[1] not in lefmacros: @@ -1974,7 +1974,7 @@ ltext = ifile.read() llines = ltext.splitlines() for lline in llines: - ltok = re.split(' |\t|\(', lline) + ltok = re.split(r' |\t|\(', lline) if ltok[0] == 'MACRO': lefmacros.append(ltok[1]) @@ -2063,7 +2063,7 @@ # an error message. if len(lefmacros) > 0: print('load ' + lefmacros[0], file=ofile) - # print('cellname delete \(UNNAMED\)', file=ofile) + # print(r'cellname delete \(UNNAMED\)', file=ofile) else: err_no_macros = True print('writeall force', file=ofile) @@ -2143,9 +2143,9 @@ proprex = re.compile('<< properties >>') endrex = re.compile('<< end >>') - rlabrex = re.compile('rlabel[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+([^ \t]+)') - flabrex = re.compile('flabel[ \t]+.*[ \t]+([^ \t]+)[ \t]*') - portrex = re.compile('port[ \t]+([^ \t]+)[ \t]+(.*)') + rlabrex = re.compile(r'rlabel[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+[^ \t]+[ \t]+([^ \t]+)') + flabrex = re.compile(r'flabel[ \t]+.*[ \t]+([^ \t]+)[ \t]*') + portrex = re.compile(r'port[ \t]+([^ \t]+)[ \t]+(.*)') gcellrex = re.compile('string gencell') portnum = -1 @@ -2414,7 +2414,7 @@ else: gdslibroot = os.path.split(allgdslibname)[1] print('load ' + os.path.splitext(gdslibroot)[0], file=ofile) - print('catch {cellname delete \(UNNAMED\)}', file=ofile) + print(r'catch {cellname delete \(UNNAMED\)}', file=ofile) print('ext2spice lvs', file=ofile)
diff --git a/common/preproc.py b/common/preproc.py index 15f0ecf..e82edbc 100755 --- a/common/preproc.py +++ b/common/preproc.py
@@ -60,13 +60,13 @@ def solve_statement(condition): - defrex = re.compile('defined[ \t]*\(([^\)]+)\)') - orrex = re.compile('(.+)\|\|(.+)') - andrex = re.compile('(.+)&&(.+)') - notrex = re.compile('!([^&\|]+)') - parenrex = re.compile('\(([^\)]+)\)') - leadspacerex = re.compile('^[ \t]+(.*)') - endspacerex = re.compile('(.*)[ \t]+$') + defrex = re.compile(r'defined[ \t]*\(([^\)]+)\)') + orrex = re.compile(r'(.+)\|\|(.+)') + andrex = re.compile(r'(.+)&&(.+)') + notrex = re.compile(r'!([^&\|]+)') + parenrex = re.compile(r'\(([^\)]+)\)') + leadspacerex = re.compile(r'^[ \t]+(.*)') + endspacerex = re.compile(r'(.*)[ \t]+$') matchfound = True while matchfound: @@ -166,24 +166,24 @@ def runpp(keys, keyrex, defines, ccomm, utf, incdirs, inputfile, ofile): - includerex = re.compile('^[ \t]*#include[ \t]+"*([^ \t\n\r"]+)') - definerex = re.compile('^[ \t]*#define[ \t]+([^ \t]+)[ \t]+(.+)') - paramrex = re.compile('^([^\(]+)\(([^\)]+)\)') - defrex = re.compile('^[ \t]*#define[ \t]+([^ \t\n\r]+)') - undefrex = re.compile('^[ \t]*#undef[ \t]+([^ \t\n\r]+)') - ifdefrex = re.compile('^[ \t]*#ifdef[ \t]+(.+)') - ifndefrex = re.compile('^[ \t]*#ifndef[ \t]+(.+)') - ifrex = re.compile('^[ \t]*#if[ \t]+(.+)') - elseifrex = re.compile('^[ \t]*#elseif[ \t]+(.+)') - elserex = re.compile('^[ \t]*#else') - endifrex = re.compile('^[ \t]*#endif') - commentrex = re.compile('^###[^#]*$') - ccstartrex = re.compile('/\*') # C-style comment start - ccendrex = re.compile('\*/') # C-style comment end - contrex = re.compile('.*\\\\$') # Backslash continuation line + includerex = re.compile(r'^[ \t]*#include[ \t]+"*([^ \t\n\r"]+)') + definerex = re.compile(r'^[ \t]*#define[ \t]+([^ \t]+)[ \t]+(.+)') + paramrex = re.compile(r'^([^\(]+)\(([^\)]+)\)') + defrex = re.compile(r'^[ \t]*#define[ \t]+([^ \t\n\r]+)') + undefrex = re.compile(r'^[ \t]*#undef[ \t]+([^ \t\n\r]+)') + ifdefrex = re.compile(r'^[ \t]*#ifdef[ \t]+(.+)') + ifndefrex = re.compile(r'^[ \t]*#ifndef[ \t]+(.+)') + ifrex = re.compile(r'^[ \t]*#if[ \t]+(.+)') + elseifrex = re.compile(r'^[ \t]*#elseif[ \t]+(.+)') + elserex = re.compile(r'^[ \t]*#else') + endifrex = re.compile(r'^[ \t]*#endif') + commentrex = re.compile(r'^###[^#]*$') + ccstartrex = re.compile(r'/\*') # C-style comment start + ccendrex = re.compile(r'\*/') # C-style comment end + contrex = re.compile(r'.*\\\\$') # Backslash continuation line - badifrex = re.compile('^[ \t]*#if[ \t]*.*') - badelserex = re.compile('^[ \t]*#else[ \t]*.*') + badifrex = re.compile(r'^[ \t]*#if[ \t]*.*') + badelserex = re.compile(r'^[ \t]*#else[ \t]*.*') # This code is not designed to operate on huge files. Neither is it designed to be # efficient. @@ -418,16 +418,16 @@ # parentheses; e.g., "def(a, b, (c1,c2))". This is NOT # handled. - pcondition = condition + '\(' + pcondition = condition + r'\(' for param in parameters[0:-1]: - pcondition += '(.*),' - pcondition += '(.*)\)' + pcondition += r'(.*),' + pcondition += r'(.*)\)' # Generate the substitution string with group substitutions pvalue = pmatch.group(2) idx = 1 for param in parameters: - pvalue = pvalue.replace(param, '\g<' + str(idx) + '>') + pvalue = pvalue.replace(param, r'\g<' + str(idx) + '>') idx = idx + 1 defines[condition] = pvalue
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in index e6655ad..d2a303e 100644 --- a/gf180mcu/Makefile.in +++ b/gf180mcu/Makefile.in
@@ -1119,8 +1119,8 @@ # NOTE: Work in progress (to be completed) ${STAGE} -source ${GF180MCU_OSU_SC_PATH}/gf180mcu_osu_sc_gp9t3v3 \ -target ${STAGING_PATH}/${GF180MCU$*} \ - -techlef ../tlef/gf180mcu_5LM_1TM_9K_9t.tlef \ - rename=gf180mcu_fd_sc_mcu7t5v0__nom.tlef \ + -techlef tlef/gf180mcu_osu_sc_gp9t3v3.tlef \ + rename=gf180mcu_osu_sc_gp9t3v3__nom.tlef \ -lib lib/gf180mcu_osu_sc_gp9t3v3_TT_3P3_25C.ccs.lib \ rename=gf180mcu_osu_sc_gp9t3v3__tt_025C_3v30 \ -verilog cells/*/*.v compile-only \ @@ -1133,8 +1133,8 @@ ${STAGE} -source ${GF180MCU_OSU_SC_PATH}/gf180mcu_osu_sc_gp12t3v3 \ -target ${STAGING_PATH}/${GF180MCU$*} \ - -techlef ../tlef/gf180mcu_5LM_1TM_9K_12t.tlef \ - rename=gf180mcu_fd_sc_mcu7t5v0__nom.tlef \ + -techlef tlef/gf180mcu_osu_sc_gp12t3v3.tlef \ + rename=gf180mcu_osu_sc_gp12t3v3__nom.tlef \ -lib lib/gf180mcu_osu_sc_gp12t3v3_TT_25C.ccs.lib \ rename=gf180mcu_osu_sc_gp12t3v3__tt_025C_3v30 \ -verilog cells/*/*.v compile-only \