• 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. Schematic entry parameter as a function of instance nam...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 126
  • Views 15398
  • 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

Schematic entry parameter as a function of instance name

yoyega
yoyega over 15 years ago

 Hi, I have a question concerning a schematic entry. Let's assume that I have defined a subcircuit that has pwl souce inside. This pwl source reads the point/time values from a file, and I want that the name of the file in the definition of the pwl source to be automatically set as a funcion of the name of the instance of the subcircuit. Does anyone knows how to do this?

Example:

subckt myckt
    I0 ( node1 node2 ) isource type=pwl file="a_function_of_the_name_of_the_instance_of_myckt"
    ...
end myckt

This way, if I have to instantiate several instances of myckt, each instance would automatically read point/time values from different files.

Thanks,
Pedro

  • Cancel
  • oldmouldy
    oldmouldy over 15 years ago

    Certainly not "automatically"

    Let's ignore the provided SUBCKT syntax provided and try something that PSpice might actually process:

    .SUBCKT MYCKT 1 2

    + PARAMS: MYFILE=SOMEPATH.TXT

    IX 1 2 PWL FILE {MYFILE}

    .ENDS

    Check the PSpice Users Guide and PSpice Reference Guide PDFs for more precise details.

    If you use the model editor to create the Capture part, the part will have a "MYFILE" property that you can put the filename into within the schematic. NOTE SPICE, and therefore, PSpice netlist lines cannot exceed 80 characters in total, so you will to bear that in mind when specifying the filename, also the full filename and path should be specified and should not contain spaces. This method is not really a vast difference over the provided IPWL File part though.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Since the question was about spectre, I'd also say it's not directly possible in spectre - but you could use a similar approach as outlined by oldmouldy. I wondered about using the percent keywords in the filename, but looking at the available percent codes, none is the hierarchical path to the instance (search in cdnshelp for MMSIM71/72 say for "percent").

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yoyega
    yoyega over 15 years ago

     Hi, thank you for your replies. You are right Andrew, as I am using spectre oldmouldy's approach is not very straightforward. The point is that I have to instantiate and interconect 1024 instances of the same subcircuit (a pixel), and that each instance needs to be excited with a different independent current source, and that each current source has a different dc value. I don't want to entry all the 1024 schematic instances by hand. Do you think that skill language can be helpfull for this?...the truth is that I know nothing about skill programming...

     

    Thanks and regards,

    Pedro

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Maybe. You could potentially have some SKILL code which set the fileName parameter on each instance to something unique.

    I'm afraid it's beyond what I have time to help with this week - so I'd recommend either hoping that somebody else on the forum can help, or speaking to Cadence Customer Support (anyway I'd have had to uncover a bit more about how things were structured, or give an example that you could tweak to suit your needs).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yoyega
    yoyega over 15 years ago

     Ok, thank you Andrew. I think that the easiest solution now would be to entry just the schematic of one pixel, to use the Analog Artist to generate the netlist of this one pixel subcircuit, and then incorporate this subcircuit into some c++ code that generates netlist of the full 32x32 pixel matrix (I know how to program in c++). In the mean time I will try to learn the basics of skill programming so I can find a better solution next time...

     

    Thanks again for your answers,

    Pedro 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 15 years ago

    It seems to me that the best approach would be to write Skill to generate your schematic. Making the parameter dynamically depend on the instance name wouldn't help you very much. Since you'll probably need to explicitly define the instance names, you might as well explicitly define the parameter (pwl file name) at the same time. You could also enhance the code below to wire up your array.

    procedure(buildPixelArray(@optional (cv geGetEditCellView()))
      let((myLib myCell myView origin instName fileName)
        myLib = "myLib"
        myCell = "pixelCkt"
        myView = "symbol"
        for(col 0 31
            for(row 0 31
                origin = list(row col)
                sprintf(instName "Pixel_%02d_%02d" row col)
                sprintf(fileName "/path/to/pwl/%s.pwl" instName)
                inst = dbCreateParamInstByMasterName(cv myLib myCell myView
                    instName
                    origin
                    "R0"
                    1
                    list(
                        list("myPwlParam" "string" fileName)
                    )
                )
            )
        )
      ) ;let
    ) ;proc

    Run this code with an empty schematic open for edit.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • yoyega
    yoyega over 15 years ago

    Hi, thank you very much dmay! I will try the code and see what happens! 

    • 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