Modified a number of sky130 custom scripts that were all based on the same code and all generated a file called "temp" during processing, which was causing issues with files getting mixed up when using multithreading (note that the previous commit, which was an attempt to resolve the file mixup error, was a total red herring and had nothing to do with the issue). All of the scripts now append "_temp" to the root name of the original input file being modified, instead of always naming a file "temp". This should resolve the file mixup issue completely.
diff --git a/VERSION b/VERSION index e83845c..4418310 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.279 +1.0.280
diff --git a/sky130/custom/scripts/add_bipolar_ids.py b/sky130/custom/scripts/add_bipolar_ids.py index 247d522..872af9b 100755 --- a/sky130/custom/scripts/add_bipolar_ids.py +++ b/sky130/custom/scripts/add_bipolar_ids.py
@@ -50,7 +50,7 @@ for idx, device in enumerate(devlist): infile_name = magpath + '/' + device + '.mag' - outfile_name = magpath + '/temp.mag' + outfile_name = magpath + '/' + device + '_temp.mag' if not os.path.exists(infile_name): print('Error: Cannot find file ' + infile_name)
diff --git a/sky130/custom/scripts/fix_spice_includes.py b/sky130/custom/scripts/fix_spice_includes.py index 1aaa0b5..f70079b 100755 --- a/sky130/custom/scripts/fix_spice_includes.py +++ b/sky130/custom/scripts/fix_spice_includes.py
@@ -36,7 +36,9 @@ libpath = 'spi/sky130_fd_pr/' filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.split(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')
diff --git a/sky130/custom/scripts/mismatch_params.py b/sky130/custom/scripts/mismatch_params.py index c370c56..af84ddc 100755 --- a/sky130/custom/scripts/mismatch_params.py +++ b/sky130/custom/scripts/mismatch_params.py
@@ -93,7 +93,9 @@ for infile_name in filelist: filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.splitext(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')
diff --git a/sky130/custom/scripts/montecarlo_hack.py b/sky130/custom/scripts/montecarlo_hack.py index 2c8ce48..f2486ce 100755 --- a/sky130/custom/scripts/montecarlo_hack.py +++ b/sky130/custom/scripts/montecarlo_hack.py
@@ -52,7 +52,9 @@ for infile_name in searchpath: filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.splitext(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')
diff --git a/sky130/custom/scripts/process_params.py b/sky130/custom/scripts/process_params.py index 1c0e44a..d255c41 100755 --- a/sky130/custom/scripts/process_params.py +++ b/sky130/custom/scripts/process_params.py
@@ -84,7 +84,9 @@ for infile_name in filelist: filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.splitext(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')
diff --git a/sky130/custom/scripts/xyce_hack.py b/sky130/custom/scripts/xyce_hack.py index 480e3ae..ecedb7d 100755 --- a/sky130/custom/scripts/xyce_hack.py +++ b/sky130/custom/scripts/xyce_hack.py
@@ -21,7 +21,9 @@ infile_name = sys.argv[1] filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.splitext(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')
diff --git a/sky130/custom/scripts/xyce_hack2.py b/sky130/custom/scripts/xyce_hack2.py index 5d8f1a0..9308dad 100755 --- a/sky130/custom/scripts/xyce_hack2.py +++ b/sky130/custom/scripts/xyce_hack2.py
@@ -24,7 +24,9 @@ infile_name = sys.argv[1] filepath = os.path.split(infile_name)[0] - outfile_name = os.path.join(filepath, 'temp') + filename = os.path.split(infile_name)[1] + fileroot = os.path.splitext(filename)[0] + outfile_name = os.path.join(filepath, fileroot + '_temp') infile = open(infile_name, 'r') outfile = open(outfile_name, 'w')