Skip to content

Commit

Permalink
Merge pull request #33 from efabless/backward_compatibility
Browse files Browse the repository at this point in the history
Fix for schematics referenced from the project top-level directory
  • Loading branch information
RTimothyEdwards authored Mar 14, 2024
2 parents cda69df + 66270e6 commit 203a90b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
22 changes: 12 additions & 10 deletions cace/cace_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,18 @@ def cace_run(datasheet, paramname=None):
# routine to handle it.

found = False
for eparam in datasheet['electrical_parameters']:
if eparam['name'] == paramname:
cace_run_eparam(datasheet, eparam)
found = True
break
for pparam in datasheet['physical_parameters']:
if pparam['name'] == paramname:
cace_run_pparam(datasheet, pparam)
found = True
break
if 'electrical_parameters' in datasheet:
for eparam in datasheet['electrical_parameters']:
if eparam['name'] == paramname:
cace_run_eparam(datasheet, eparam)
found = True
break
if 'physical_parameters' in datasheet:
for pparam in datasheet['physical_parameters']:
if pparam['name'] == paramname:
cace_run_pparam(datasheet, pparam)
found = True
break

if not found:
print('\nError: No parameter named ' + paramname + ' found!')
Expand Down
9 changes: 7 additions & 2 deletions cace/common/cace_regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def printwarn(output):
failrex = re.compile('.*failure', re.IGNORECASE)
warnrex = re.compile('.*warning', re.IGNORECASE)
errrex = re.compile('.*error', re.IGNORECASE)
missrex = re.compile('.*not found', re.IGNORECASE)

errors = 0
outlines = output.splitlines()
Expand All @@ -45,7 +46,10 @@ def printwarn(output):
fmatch = failrex.match(line)
if fmatch:
errors += 1
if ematch or wmatch or fmatch:
mmatch = missrex.match(line)
if mmatch:
errors += 1
if ematch or wmatch or fmatch or mmatch:
print(line)
return errors

Expand Down Expand Up @@ -1179,7 +1183,8 @@ def regenerate_testbench(dsheet, testbenchpath, testbench):
if pdk and 'PDK' not in newenv:
newenv['PDK'] = pdk

xschemargs = ['xschem', '-n', '-s', '-r', '-x', '-q']
tclstr = set_xschem_paths(dsheet, '')
xschemargs = ['xschem', '-n', '-s', '-r', '-x', '-q', '--tcl', tclstr]

# Use the PDK xschemrc file for xschem startup
xschemrcfile = os.path.join(
Expand Down

0 comments on commit 203a90b

Please sign in to comment.