• 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 SKILL
  3. Virtue SKILL and Python Library

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 143
  • Views 14923
  • 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

Virtue SKILL and Python Library

Curtisma
Curtisma over 3 years ago

All:

I put together a SKILL++ library, Virtue, which provides the following features.
Please let me know if you have any feedback on it.

  • A standard library of functions for common tasks
  • A test framework modeled after pytest
  • A TOML config file reader and writer
  • A package import system that allows the library to define just a single top-level import table symbol that allows each package to be imported locally.

It's available at:
https://github.com/cascode-labs/virtue

-Curtis

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Curtisma

    I've not seen that, and I just experimented with using the code above, even putting it inside a function so that the effects of lazy compilation might show up, and putting additional code beyond the macro call, with breakpoints on those lines and all worked fine.

    Macros should be used sparingly because you're effectively creating a new language when you use them and that can be jarring for a reader of the code, but this seems a pretty good application for macros. You could write a function instead and use run-time evaluation - which in this case since it's only going to be at load time wouldn't be too awful - but it's much less elegant (and I see no good reason given that the macro works fine with the IDE). I'm not aware of issues with the IDE with macros - maybe they have been resolved?

    (defun PkgExportFunc (env @rest functions)
      (let ((pkgTable (makeTable 'pkgTable nil)))
        (foreach func functions
    	     (setarray pkgTable func (symeval func env)))
        pkgTable))
    

    and then use:

    (PkgExportFunc (theEnvironment) 'set 'get)

    to do the export.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Andrew Beckett

    Curtis,

    On reflection (and I’ve. It tried this), the one place I can imagine the IDE might struggle with is putting  break points on code within the arguments of a macro because it doesn’t know which line that ends up on. Possibly… I’d have to check. Obviously that’s not going to be something you’d want to do with the macro I suggested as the arguments are symbols and not code.

    So i don’t see this as a reason to avoid all macros.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 3 years ago in reply to Andrew Beckett

    Awesome! That looks great, thanks Andrew Beckett!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 3 years ago in reply to Curtisma

    I do but I cannot use my personal account at work and even if I enjoy coding in SKILL I don't usually do it on my personal computer which has no access to Virtuoso Sweat smile

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Curtisma
    Curtisma over 2 years ago

    All:
    I released a new version, v0.4, of Virtue recently.

    Documentation:https://www.cascode-labs.org/virtue

    Release Notes: https://www.cascode-labs.org/virtue/overview/release_notes.html

    -Curtis

    Andrew Beckett, AurelBuche

    • 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