• 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. How to manuplate the customer gui in the skill script

Stats

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

How to manuplate the customer gui in the skill script

acom
acom over 9 years ago

Hello ,

We have a customer defined gui which is written by skill. I simplify it as LAYguiForm() in the file LAYguiForm.il.

Then we would like to automatically fill-in the myGuiForm and make it do some related actions. I simplify it as LAYdo(string) in the file LAYdo.il.

 But don't know why it didn't work as intended if i do as method 1 in the CIW window after start virtuoso.The myguiForm will pop up. But it won't auto fill-in and execute the following function.

At the same time, it works well when i input the sentence one by one as method 2 in the CIW window like below.

Method 1: In the CIW, it won't work as intented.

load "LAYguiForm.il"

load "LAYdo.il"

LAYdo("HELLOWORLD")

Method 2: If i input the sentence one by one in CIW like below .It works normally.

In the CIW:

load "LAYguiForm.il"

string="HELLOWORLD"

LAYguiForm()

hiSetCurrentForm(myGuiForm)

myGuiForm->libName->value=string

hiFormDone(myGuiForm)

So my issue is , have i missed anything in the LAYdo.il file?How can make it auto fill-in and execute by using LAYdo.il?

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; In the LAYguiForm.il file     ;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

procedure( LAYguiForm()
let(
(stepBtn libName
)

stepBtn = hiCreateBooleanButton(
?name 'stepBtn
?buttonText "step1"
?buttonLocation 'left
?defValue nil
)

libName = hiCreateStringField(
?name 'libName
?prompt "Library Name"
?defValue ""
?enabled t
?callback "ddsUpdateSyncWithForm()"
)


myGui= hiCreateAppForm(
?name 'myGuiForm
?formTitle "mygui"
?callback "LAYmyGuiExe_(myGuiForm)"
?fields list(
list(stepBtn 15:22 20:15 0)
list(libName 15:81 275:25 105)
)
?initialSize t
)

hiDisplayForm(myGuiForm)
ddsEndSyncWithForm()
)
)


procedure( LAYmyGuiExe_(myGuiForm)
let(
(libName
)
libName = myGuiForm~>libName~>value
printf("the lib name is %s .\n" libName)
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;           In the LAYdo.il File       ;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

procedure(LAYdo(string)
let(
()
LAYguiForm()
hiSetCurrentForm(myGuiForm t)
myGuiForm->libName->value=string
hiFormDone(myGuiForm)

)
)

 

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    The issue is because the form is blocking - this means that when hiDisplayForm() is called, it blocks the execution of the SKILL code until it is OK'd or Cancelled. 

    The simplest solution would be to add ?dontBlock t into the arguments of the hiCreateAppForm() call. If you can't edit that code for some reason, the less elegant solution would be to change LAYdo:

    procedure(LAYdo(string)
      hiEnqueueCmd(sprintf(nil "myGuiForm->libName->value=%L hiFormDone(myGuiForm)" string)
      LAYguiForm()
    )

    Not as neat - but it should work. The idea is that hiEnqueueCmd asks the Virtuoso to execute the SKILL code as soon as the UI responds (the top-level has returned). So you're scheduling it before the blocking form is displayed, and the first opportunity for it to execute is once the form is active.

    However, I'd use the ?dontBlock t approach if it was down to me.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • acom
    acom over 9 years ago

    Hello Andrew,

    I am struggling with 2 approaches during past days.Both of them worked for the gui and LAYdo.il which i posted here.

    But when i did the same updating for our real code which are much more compliacted than the ones i show here, it doesn't work.

    By using "?dontBlock t", the form pop up.But it reported errors like below.And i couldn't manuaplate the form manually(close it , cancel it etc.)

    "*Error* eval: unbound variable - myguiForm."

    By using "hiEnqueueCmd", the program seems to work twice.One time before I fill in .One time after I fill in.And other script follow the hiFormDone could not be executed.

    I am very confused about it.Do you have any idea?

    Thansks

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 9 years ago

    Hi,

    myguiForm looks like a typo - in your post you used myGuiForm.  Perhaps if you fix that the other issue(s) will be fixed?

    Regards,

    Lawrence.

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

    The other possibility is that you declared myguiForm as a local variable and were using that for your form object. If you have ?dontBlock t, the hiDisplayForm will return and it will no longer be in the context of where the form variable got created and hence you may have a scoping problem.

    Generally speaking, top level UI items (e.g. forms) should be stored in a unique global variable, not a local variable.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • acom
    acom over 9 years ago
    Hello Lawrence,
    Thanks,i didn't have this typo in my real code.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • acom
    acom over 9 years ago

    Hello Andrew and all,

    I guess so.It has something with the global variable.

    I finally got this done in a non-skill way.:) (Please point out if there is anything inproper).

    And i share it here if it could be helpful for anyone else who meet the same issue like me.

    Since the code works well in the ciw window, i write the code in the replay file.And  run it by using virtuoso -replay replay.file .And it worked.

    Thanks

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

    acom said:

    Since the code works well in the ciw window, i write the code in the replay file.And  run it by using virtuoso -replay replay.file .And it worked.

    This is definitely not a preferred way of doing it - sure, it can work, but it simply means that you didn't write the code properly if you had to do it this way. Since you didn't share the code which had the problem though, there's probably not much we can do to help.

    Regards,

    Andrew.

    • 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