Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore primitive symbol #36

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.1.8'
__version__ = '2.1.9'

if __name__ == '__main__':
print(__version__, end='')
17 changes: 10 additions & 7 deletions cace/common/cace_regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def check_dependencies(dsheet, debug=False):
# -----------------------------------------------------------------------


def set_xschem_paths(dsheet, tclstr=None):
def set_xschem_paths(dsheet, symbolpath, tclstr=None):
paths = dsheet['paths']

# Root path
Expand All @@ -885,10 +885,11 @@ def set_xschem_paths(dsheet, tclstr=None):

tcllist.append('append XSCHEM_LIBRARY_PATH :' + os.path.abspath(root_path))

# Add the schematic path to the search path
if 'schematic' in paths:
schempath = os.path.join(root_path, paths['schematic'])
tcllist.append('append XSCHEM_LIBRARY_PATH :' + schempath)
# Add the path with the DUT symbol to the search path. Note that testbenches
# use a version of the DUT symbol that is marked as "primitive" so that it
# does not get added to the netlist directly. The netlist is included by a
# ".include" statement in the testbenches.
tcllist.append('append XSCHEM_LIBRARY_PATH :' + symbolpath)

# If dependencies are declared, then pull in their locations
# and add them to the search path as well.
Expand Down Expand Up @@ -1035,7 +1036,9 @@ def regenerate_schematic_netlist(dsheet):
if pdk and 'PDK' not in newenv:
newenv['PDK'] = pdk

tclstr = set_xschem_paths(dsheet, 'set lvs_netlist 1')
tclstr = set_xschem_paths(
dsheet, schem_netlist_path, 'set lvs_netlist 1'
)

# Xschem arguments:
# -n: Generate a netlist
Expand Down Expand Up @@ -1183,7 +1186,7 @@ def regenerate_testbench(dsheet, testbenchpath, testbench):
if pdk and 'PDK' not in newenv:
newenv['PDK'] = pdk

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

# Use the PDK xschemrc file for xschem startup
Expand Down
Loading