• 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. Modgen Patterns Generation with SKILL (Custom Constraints...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 14140
  • 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

Modgen Patterns Generation with SKILL (Custom Constraints)

AurelBuche
AurelBuche over 5 years ago

Hi everyone,

I am struggling with the following functions:

ciGenerateBestFitPattern
ciGenerateCascodedCurrentMirrorPattern
ciGenerateCurrentMirrorPattern
ciGenerateDiffPairPattern
ciGenerateLargeMfactorPattern

I am trying to generate modgen / matrix patterns for a given list of instances and dimensions (rows x columns)

Here is the little code I wrote to try the functions:

(inScheme
  (let ((table `(
                  (PassiveDeviceArray    ,ciGenerateBestFitPattern)
                  (CascodedCurrentMirror ,ciGenerateCascodedCurrentMirrorPattern)
                  (CurrentMirror         ,ciGenerateCurrentMirrorPattern)
                  (DiffPair              ,ciGenerateDiffPairPattern)
                  (LargeMfactor          ,ciGenerateLargeMfactorPattern))))
    
    (defun getSelectedInstances nil
      "Return selected instances"
      (setof obj (geGetSelectedSet) (equal "inst" (get obj 'objType))))
    
    (defun instancesToDevices (instances)
      "Return the list of devices from schematic INSTANCES to be used in ciCollectDeviceInfo"
      (foreach mapcar inst instances (list (get inst 'name) 'inst)))
    
    (defglobalfun abGeneratePattern (structType @optional (instances (getSelectedInstances)))
      "Generate STRUCTTYPE pattern associated to schematic INSTANCES"
      (letseq ((win       (getCurrentWindow))
               (cache     (ciGetCellView ?window win))
               (devices   (instancesToDevices instances))
               (devInfo   (ciCollectDeviceInfo cache devices))
               (args      (ciGetStructArgs structType)))
        ;; Call ci pattern generation function according to struct type
        ((cadr (assoc structType table)) devInfo args)))
    
    (defglobalfun abGeneratePatterns (@optional (instances (getSelectedInstances)))
      "Try to generate all patterns in table for INSTANCES"
      (foreach mapcan structType (mapcar car table)
        (let ((pattern (errset (abGeneratePattern structType instances))))
          (unless pattern (warn "%s %A" structType errset.errset))
          pattern)))
    
  );let
);inScheme

I tried (abGeneratePatterns) while selecting a simple differential pair in a schematic, it get the following warnings:

*WARNING* CascodedCurrentMirror ("symbolToString" 0 t nil ("*Error* symbolToString: argument #1 should be a symbol (type template = \"s\")" nil))

*WARNING* CurrentMirror ("symbolToString" 0 t nil ("*Error* symbolToString: argument #1 should be a symbol (type template = \"s\")" nil))

*WARNING* LargeMfactor ("ciExtractRowNumber" 0 t nil ("*Error* ciExtractRowNumber: argument #1 should be a string (type template = \"tt\")" nil))

I get patterns for the other structTypes but I cannot specify the dimensions :/

If somebody has an idea or can provide me with better documentation about those functions I'd be very happy

Cheers,

Aurel

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    Hi Aurel,

    The issue is that these functions do not accept the result of ciGetStructArgs as the args argument. We don't document exactly what it should look like - mainly because they are not expected to be called directly, but instead as part of ciSetStructGeneratorExpressions - which in turn will call the pattern functions with the correct arguments.

    Since I don't want to reveal the internals of what these functions expect in a public forum since that effectively is like documenting them (plus, it's not clear to me why you need to do this), the right thing to do here is to contact customer support so that you can explain what you're trying to achieve and we can work with our R&D to determine whether it's safe to both document the expected argument style and ideally provide a function that generates that argument for you.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your answer, I'll see with the support then

    I am working on a placement optimisation algorithm and I wanted to see if I could get better results starting from predefined structures instead of random ones

    Cheers,

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • AurelBuche
    AurelBuche over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you for your answer, I'll see with the support then

    I am working on a placement optimisation algorithm and I wanted to see if I could get better results starting from predefined structures instead of random ones

    Cheers,

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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