• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. SKILL Function to Get File Path of the Top Schematic In...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 125
  • Views 3968
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SKILL Function to Get File Path of the Top Schematic Instance

sgcad
sgcad over 1 year ago

Hi

I'm looking for a SKILL function that can be used inside a custom netlisting function to get the file path of the top schematic that is netlisted.

To make the question more clear, let me explain the context: In How to create a component which netlists as a spectre include statement, a cell is described that allows to include a Spectre netlist through a schematic view. This is achieved with a netlisting procedure (abNetlistIncludeStatement). I like to use this cell to include a Spectre netlist in my testbenches. That way, I can manually write the analysis statements in text form, which I find more flexible than using the GUI.

As is, the cell asks for the full file path to the Spectre netlist. For example, to include the Spectre view 'sims' located in the testbench cell 'mytestbench' I need to enter the following path:

/projects/myproject/mylib/mytestbench/sims/spectre.scs

This is quite tedious. Instead, I'd prefer to just enter the name of the view to be included:

sims

with the path to my testbench and the '/spectre.scs' suffix automatically added by the netlisting function.

So I'm looking for a SKILL function that returns the file path to my testbench (the top schematic netlisted). I've searched in the documentation but as I'm new to SKILL I've failed to find the appropriate solution and would be very glad for any pointers. Thank you for your reply.

  • Cancel
  • sgcad
    sgcad over 1 year ago

    May I give this thread a gentle bump up? Any hints that guide me in the right direction would be appreciated, thanks very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to sgcad

    I have an idea for a better solution to this - which is on my to-do list for this week now that I'm back from vacation.

    Will update once it's ready.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad over 1 year ago in reply to Andrew Beckett

    Thanks very much for looking into this!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to sgcad

    I have now updated the article How to create a component which netlists as a spectre include statement. The component provides you a choice of either referencing a file or a cellView - so you can specify the lib/cell/view (e.g. a text or spectreText view) that you want to include. If it's a lib/cell/view it will netlist the include to the path to that file.

    I think that's what you want. Let me know what you think!

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad 11 months ago in reply to Andrew Beckett

    Thanks very much, Andrew! Yes, this is pretty close to what I imagined. For my particular case, the include cell could be even simpler, as the library and cell name is always that of the testbench, so entering them is redundant (and potentially a bit dangerous, if the include view is copied from one testbench to another, and updating the library and cell name gets forgotten). But that's a minor thing, I can work fine with it as-is--unless you say the change would be trivial to do.

    One strange thing: When I open the test schematic from your library, I see "test.scs" and "typtyp" (section name) displayed:

    When I use the include view in my testbench, the first line is always empty:

    What could cause this? I'd assume it should show the view name, but then "mySingle.scs" is probably a file name.

    Again, thanks very much for your efforts, they are highly appreciated.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 11 months ago in reply to sgcad

    I don't think I'd want to make the article assume that the libName and cellName are the same as the test bench, but it's probably not to bad to change it to do that. I may give that as an option - let me think/

    The second issue is that I didn't really update the CDF fully to show the lib/cell/view info. Let me fiddle with that and update it (I'll do this tomorrow).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 11 months ago in reply to Andrew Beckett

    OK, I've updated the article again. I fixed three things:

    1. I added a third choice of "view" which gives you what you wanted - the view sits in the same cell as the test bench schematic.
    2. I added some error checking in the netlist procedure so that it gives a decent error message if the cellVIew/view is missing (previously you just got a SKILL error)
    3. It now displays the fileName, the lib/cell/view or the view on the symbol (note, if you have existing instances of the component, you'd need to change something on the instance to cause the callback which does this to run).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad 11 months ago in reply to Andrew Beckett

    Excellent, thanks very much! This is going to save me a lot of time when building and maintaining testbenches.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information