• 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. PCB Design
  3. Pass Parameter Value to Hierarchical Schematic Part

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 166
  • Views 15355
  • Members are here 0
More Content
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

Pass Parameter Value to Hierarchical Schematic Part

teevskis
teevskis over 8 years ago

I'm having trouble passing a parameter value to a hierarchical schematic part.  Here are the details:

1. I created a library part with this PSpice Template definition: X^@REFDES %VCC+ %VCC- %+ %- %OUT @MODEL PARAMS:  ?IDC|IDC=@IDC||IDC=1e-3|

2. In the library part I added a parameter called IDC, also with a default value of 1e-3

3. Then I created a hierarchical part with a schematic that has a DC current source value that I set to {IDC}

The problem is that unless I add to the hierarchical part schematic a PARAM block with a parameter called IDC and a value, my simulation of a design using the hierarchical part won't run (can't identify IDC parameter).  But when I do add the PARAM block to the hierarchical part schematic, its value overrides the one in my simulation design schematic.

Ideas anyone?

  • Cancel
  • oldmouldy
    oldmouldy over 8 years ago
    Because that is how Parameters work. The {IDC} syntax is looking for a PARAM with an IDC property and "default" value defined. Your "part default" is only going to be used if the IDC parameter on the part is not defined - that is what the syntax defines "IF IDC part property values exists, use that value, otherwise, use a default of 1e-3", you have set the IDC property value to "{IDC}" on the part so the property value exists and the simulator is going to use that value. If you set the PARAM value to 1e-3, you will get the same behaviour as the default value when the PARAM is not being used.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • teevskis
    teevskis over 8 years ago
    It makes sense that it's going to use the value defined in the PARAM instance on the schematic first - I kind of knew that was going to happen. So how do I achieve what I'm trying to do - pass through a value from my design schematic to the hierarchical schematic part that may be different than a default value that's only supposed to be used if nothing gets passed through? I was trying to copy the syntax/method of an existing part, but it's a regular PSpice part, not a hierarchical schematic part.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 8 years ago
    Capture (and PSpice) only have Schematic Parts, there is no significance to how they are placed in the schematic. Check out the PSpiceTemplate property in the Help documentation, start Cadence Help and search for PSpiceTemplate. The "test" applied is for "Parameter is defined", meaning "value not empty". In this case the property contains "{IDC}" so the parameter is defined, "not empty", and the value will be used accordingly. You could delete the "{IDC}" value from the property value and your default value, in the PSpiceTemplate will be used, because the property is NOT defined, otherwise the "IDC value" from the PARAM part will be used.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • teevskis
    teevskis over 8 years ago

    Perhaps I'm being thick, but I think something is getting lost in my poor description of what I'm doing. Perhaps some screen shots will help. So, first I created a PSpice library part as follows (I've shown some of the part properties for clarity, even though I'll turn off their visibility normally):

    As you can see by the Implementation Type this hierarchical part is then attached to a schematic where the parameter 'idc' is used as the DC value for a current source. Notice the PARAM block - until I added this to the schematic, I would get an "Undefined parameter: idc" error during netlisting.

    Finally, I placed the library part in one of my simulation design schematics and set 'idc' to a value different than the 1e-3 default:

    Of course the value in the PARAM block is used, not the value I want to be passed from the design schematic (70e-9).

    So what am I doing wrong?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 8 years ago
    OK, see what you mean now! Your "comparator part" doesn't need a PSpiceTemplate property, the Part gets "connected" to the underlying schematic by Pin Name / Port Name matching so no "template" mapping required. Your part also needs Primitive set to No (you probably already have that) and the IDC property and to be visible for ease of editing, also as you have it. No need for the PARAM part in the underlying schematic, that's a Global Parameter, replace that with a "SUBPARAM" part, add an IDC property and a default value to the subparam and change the DC={IDC} to be DC=@IDC for I1. I admit that my need has always been to override the Subparam default value so you may find that you need to specify IDC on the part in the upper schematic but "no value" of IDC could get the Subparam value active.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Cadence Guidelines

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