From 28593d03ea22ba11bf92cdf59846e1fabb81921b Mon Sep 17 00:00:00 2001 From: mole99 Date: Mon, 19 Aug 2024 09:47:29 +0200 Subject: [PATCH] Use "path search +path" in magic --- Changelog.md | 6 ++++++ cace/__version__.py | 2 +- cace/common/cace_read.py | 6 +++--- cace/common/cace_regenerate.py | 3 ++- cace/parameter/parameter_magic_area.py | 3 ++- cace/parameter/parameter_magic_drc.py | 3 ++- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Changelog.md b/Changelog.md index d2f9d29..6d19206 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# 2.4.7 + +## Common + +- Use `path search +path` in magic + # 2.4.6 ## Common diff --git a/cace/__version__.py b/cace/__version__.py index 0590425..563f0b1 100644 --- a/cace/__version__.py +++ b/cace/__version__.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -__version__ = '2.4.6' +__version__ = '2.4.7' if __name__ == '__main__': print(__version__, end='') diff --git a/cace/common/cace_read.py b/cace/common/cace_read.py index c5ba713..8d2b1c8 100755 --- a/cace/common/cace_read.py +++ b/cace/common/cace_read.py @@ -515,7 +515,7 @@ def cace_read(filename, debug=False): datasheet['parameters'][pparam['name']].pop('name') - return valdiate_datasheet(datasheet) + return validate_datasheet(datasheet) def cace_read_yaml(filename, debug=False): @@ -526,13 +526,13 @@ def cace_read_yaml(filename, debug=False): with open(filename, 'r') as ifile: datasheet = yaml.safe_load(ifile) - return valdiate_datasheet(datasheet) + return validate_datasheet(datasheet) CACE_DATASHEET_VERSION = 5.2 -def valdiate_datasheet(datasheet): +def validate_datasheet(datasheet): # Check for missing field if not 'name' in datasheet: diff --git a/cace/common/cace_regenerate.py b/cace/common/cace_regenerate.py index 78c0226..8a7bf65 100755 --- a/cace/common/cace_regenerate.py +++ b/cace/common/cace_regenerate.py @@ -348,7 +348,8 @@ def regenerate_netlist(datasheet, netlist_source, runtime_options, pex=False): magic_input = '' if is_magic: - magic_input += f'load {layout_filepath}\n' + magic_input += f'path search +{os.path.abspath(os.path.dirname(layout_filepath))}\n' + magic_input += f'load {os.path.basename(layout_filepath)}\n' else: magic_input += f'gds read {layout_filepath}\n' magic_input += f'load {dname}\n' diff --git a/cace/parameter/parameter_magic_area.py b/cace/parameter/parameter_magic_area.py index 36f4912..fe9c4f1 100755 --- a/cace/parameter/parameter_magic_area.py +++ b/cace/parameter/parameter_magic_area.py @@ -110,7 +110,8 @@ def implementation(self): magic_input = '' if is_magic: - magic_input += f'load {layout_filepath}\n' + magic_input += f'path search +{os.path.abspath(os.path.dirname(layout_filepath))}\n' + magic_input += f'load {os.path.basename(layout_filepath)}\n' else: magic_input += f'gds read {layout_filepath}\n' magic_input += 'set toplist [cellname list top]\n' diff --git a/cace/parameter/parameter_magic_drc.py b/cace/parameter/parameter_magic_drc.py index 664ffbd..0d27038 100755 --- a/cace/parameter/parameter_magic_drc.py +++ b/cace/parameter/parameter_magic_drc.py @@ -97,7 +97,8 @@ def implementation(self): magic_input = '' if is_magic: - magic_input += f'load {layout_filepath}\n' + magic_input += f'path search +{os.path.abspath(os.path.dirname(layout_filepath))}\n' + magic_input += f'load {os.path.basename(layout_filepath)}\n' else: if self.get_argument('gds_flatten'): magic_input += 'gds flatglob *\n'