Skip to content

Commit

Permalink
Use "path search +path" in magic
Browse files Browse the repository at this point in the history
  • Loading branch information
mole99 committed Aug 19, 2024
1 parent b111348 commit 28593d0
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.4.7

## Common

- Use `path search +path` in magic

# 2.4.6

## Common
Expand Down
2 changes: 1 addition & 1 deletion cace/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='')
6 changes: 3 additions & 3 deletions cace/common/cace_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion cace/common/cace_regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion cace/parameter/parameter_magic_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion cace/parameter/parameter_magic_drc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 28593d0

Please sign in to comment.