• 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. error while using the function dbCreateParamInstByMaste...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 142
  • Views 13673
  • 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

error while using the function dbCreateParamInstByMaster

shashikumar22
shashikumar22 over 14 years ago
I am using this function in creating a program for auto creating a via on the point of click, however i the paramater passed are not actually implemented in the layout. i am using it this way via=dbCreateParamInstByMasterName(cv "REFLIB24" "V1" "layout" nil ctr "R0" 1 list(list("X" "float" x) list("Y" "float" y))) here i will pass the value of x and y , which will be the width and length of the via, the form is updated but the it is not implemented in layout i have also tries to use the combination of cdfUpdateInstParam(via) but it is taking some junk value, please suggest any improvement if you now
  • Cancel
Parents
  • shashikumar22
    shashikumar22 over 14 years ago

    hi Andrew,

    Can you please check the code ?? Actually it is a very basic script and i have made it to start in skill, Please suggest me any modification if you can ???


    procedure(decision(b)
     if(b != nil then
     cv = geGetEditCellView()
     a=list(b b)
     let((m1 m0 m2 m1b m0b m2b nwbx cnt ctr x y via)
     m1 = dbGetTrueOverlaps(cv  a list("M1" "drawing") 32)
     m0 = dbGetTrueOverlaps(cv  a list("M0" "drawing") 32)
     m2 = dbGetTrueOverlaps(cv  a list("M2" "drawing") 32)
     m1b=car(m1~>bBox)
     m0b=car(m0~>bBox)
     m2b=car(m2~>bBox)
    if(m0 && m1 && m2 then
     choiceGUI()
      else
      if( m0 && m1 && !m2  then
       nwbx=bbox(m0b m1b); to get bbox of the overlap area
     cnt=centreAndWL(nwbx)
     ctr=car(cnt)
     x=nth(1 cnt)
     y=nth(2 cnt)
     via=dbCreateParamInstByMasterName(cv "REFLIB" "V1"  "layout" nil ctr "R0" 1 list(list("X" "float" x) list("Y" "float" y)))
      else if(!m0 && m1 && m2 then
       nwbx=bbox(m1b m2b); to get bbox of the overlap area
     cnt=centreAndWL(nwbx)
     ctr=car(cnt)
     dbCreateParamInstByMasterName(cv "REFLIB" "V2" "layout" nil ctr "R90" 1)
      else
      println("no overlap found")))
      );if
      ); first if
    )); procedure to make desicion


    procedure(bbox(mo m1)
     let((mox1 moy1 mox2 moy2 m1x1 m1y1 m1x2 m1y2 lx ly rx ry)
      mox1=xCoord(lowerLeft(mo))
      moy1=yCoord(lowerLeft(mo))
      mox2=xCoord(upperRight(mo))
      moy2=yCoord(upperRight(mo))
      m1x1=xCoord(lowerLeft(m1))
      m1y1=yCoord(lowerLeft(m1))
      m1x2=xCoord(upperRight(m1))
      m1y2=yCoord(upperRight(m1))

     if(mox1>=m1x1
      then lx=mox1
     else lx=m1x1);if for lowerleft x value
     if(moy1>=m1y1
     then ly=moy1
     else ly=m1y1);if for lowerleft y value

     if(mox2<=m1x2
     then rx=mox2
     else rx=m1x2);if for upperright x value

     if(moy2<=m1y2
     then ry=moy2
     else ry=m1y2);if for upperright y value

     newbbox=list(list(lx ly) list(rx ry))
     );let
    );procedure for getting bbox of overlap

     

    procedure(getlocation()
    let((pts)
    pts=enterPoint(
     ?prompts list("Enter a point.")
           );enterpoint 
            if(pts != nil  then
            decision(pts) ;
            getlocation())
            )     
               ); procedure to get click point
       
       
    procedure(centreAndWL(ox)
    let((w w1 w2 l1 l2 l cy cx cy1 cx1 c out)
    l1=xCoord(upperRight(ox))
    l2=xCoord(lowerLeft(ox))
    w1=yCoord(upperRight(ox))
    w2=yCoord(lowerLeft(ox))
    l=l1-l2
    w=w1-w2
    if(minusp(l)
    then l=(-1)*w
    else w=w); if w is negative
    if(minusp(l)
    then l=(-1)*l
    else l=l); if l is negative
    cy1=w/2
    cy=w1-cy1
    cx1=l/2
    cx=l1-cx1
    c=list(cx cy)
    out=list(c w l)
    )
    );procedure
    procedure(choiceGUI()
    let((VIA)
      
      rf = hiCreateRadioField(
                        ?name        'Vselect
          ?prompt      "Select the Via Needed"
          ?choices     list("VIA1" "VIA2" "Both")
          ?defValue    "Both"
          )
          
          
     myform = hiCreateAppForm(?name 'myform
                     ?formTitle "Shashi"

        ?fields list(
        list(rf       0:20 220:20 200)
        ))
      
          
      
      hiDisplayForm(myform)
      choiceVia=myform->Vselect->value
      );let
      );procedure for display of choice    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • shashikumar22
    shashikumar22 over 14 years ago

    hi Andrew,

    Can you please check the code ?? Actually it is a very basic script and i have made it to start in skill, Please suggest me any modification if you can ???


    procedure(decision(b)
     if(b != nil then
     cv = geGetEditCellView()
     a=list(b b)
     let((m1 m0 m2 m1b m0b m2b nwbx cnt ctr x y via)
     m1 = dbGetTrueOverlaps(cv  a list("M1" "drawing") 32)
     m0 = dbGetTrueOverlaps(cv  a list("M0" "drawing") 32)
     m2 = dbGetTrueOverlaps(cv  a list("M2" "drawing") 32)
     m1b=car(m1~>bBox)
     m0b=car(m0~>bBox)
     m2b=car(m2~>bBox)
    if(m0 && m1 && m2 then
     choiceGUI()
      else
      if( m0 && m1 && !m2  then
       nwbx=bbox(m0b m1b); to get bbox of the overlap area
     cnt=centreAndWL(nwbx)
     ctr=car(cnt)
     x=nth(1 cnt)
     y=nth(2 cnt)
     via=dbCreateParamInstByMasterName(cv "REFLIB" "V1"  "layout" nil ctr "R0" 1 list(list("X" "float" x) list("Y" "float" y)))
      else if(!m0 && m1 && m2 then
       nwbx=bbox(m1b m2b); to get bbox of the overlap area
     cnt=centreAndWL(nwbx)
     ctr=car(cnt)
     dbCreateParamInstByMasterName(cv "REFLIB" "V2" "layout" nil ctr "R90" 1)
      else
      println("no overlap found")))
      );if
      ); first if
    )); procedure to make desicion


    procedure(bbox(mo m1)
     let((mox1 moy1 mox2 moy2 m1x1 m1y1 m1x2 m1y2 lx ly rx ry)
      mox1=xCoord(lowerLeft(mo))
      moy1=yCoord(lowerLeft(mo))
      mox2=xCoord(upperRight(mo))
      moy2=yCoord(upperRight(mo))
      m1x1=xCoord(lowerLeft(m1))
      m1y1=yCoord(lowerLeft(m1))
      m1x2=xCoord(upperRight(m1))
      m1y2=yCoord(upperRight(m1))

     if(mox1>=m1x1
      then lx=mox1
     else lx=m1x1);if for lowerleft x value
     if(moy1>=m1y1
     then ly=moy1
     else ly=m1y1);if for lowerleft y value

     if(mox2<=m1x2
     then rx=mox2
     else rx=m1x2);if for upperright x value

     if(moy2<=m1y2
     then ry=moy2
     else ry=m1y2);if for upperright y value

     newbbox=list(list(lx ly) list(rx ry))
     );let
    );procedure for getting bbox of overlap

     

    procedure(getlocation()
    let((pts)
    pts=enterPoint(
     ?prompts list("Enter a point.")
           );enterpoint 
            if(pts != nil  then
            decision(pts) ;
            getlocation())
            )     
               ); procedure to get click point
       
       
    procedure(centreAndWL(ox)
    let((w w1 w2 l1 l2 l cy cx cy1 cx1 c out)
    l1=xCoord(upperRight(ox))
    l2=xCoord(lowerLeft(ox))
    w1=yCoord(upperRight(ox))
    w2=yCoord(lowerLeft(ox))
    l=l1-l2
    w=w1-w2
    if(minusp(l)
    then l=(-1)*w
    else w=w); if w is negative
    if(minusp(l)
    then l=(-1)*l
    else l=l); if l is negative
    cy1=w/2
    cy=w1-cy1
    cx1=l/2
    cx=l1-cx1
    c=list(cx cy)
    out=list(c w l)
    )
    );procedure
    procedure(choiceGUI()
    let((VIA)
      
      rf = hiCreateRadioField(
                        ?name        'Vselect
          ?prompt      "Select the Via Needed"
          ?choices     list("VIA1" "VIA2" "Both")
          ?defValue    "Both"
          )
          
          
     myform = hiCreateAppForm(?name 'myform
                     ?formTitle "Shashi"

        ?fields list(
        list(rf       0:20 220:20 200)
        ))
      
          
      
      hiDisplayForm(myform)
      choiceVia=myform->Vselect->value
      );let
      );procedure for display of choice    

    • 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