• 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. Pass touchstone file path as string parameter to n2port...

Stats

  • Replies 1
  • Subscribers 129
  • Views 35
  • Members are here 0

Pass touchstone file path as string parameter to n2port instance

MarkyMark
MarkyMark 3 hours ago

Hi,

I'm looking for a solution to vary the sparameter files used for my n2port instance in Cadence simulation. Ideally, I can sweep over multiple files like any other parameter.

I would like to define a basic filename, e.g. file = "/projectxyz/file", then have a number identifier index 1,2,3,... and terminate the string with ".s2p". This I can do with strcat it seems. However, when I pass any string as a variable (global or design makes no difference) to the S-parameter data file field of the n2port instance from analogLib, I always obtain a simulation error. I have also tried strcat within the field and different ways of putting th string there, however only the fully explicit typed string without "" directly defined in the instance seems yo cause no error. 

Is there a way to do a simple sweep here defined by global or design variable?

Regards

  • Cancel
  • Sign in to reply
  • Andrew Beckett
    Andrew Beckett 1 hour ago

    The best solution would be to use analogLib/nport instead of n2port. For some time now this has had the ability to specify that the file name is a design variable:

    You can specify any number of ports (e.g. 2) and the symbol will adjust accordingly.

    It's doable with n2port, but you'd need to copy the component and edit the CDF and mess with netlist procedures and so on - I did have an article on doing this but it's been retired since the flexible nport component supports this without needing customisation.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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