• 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. Disable GUI until runs complete

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 12172
  • 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

Disable GUI until runs complete

saurabh96
saurabh96 over 4 years ago

Hey Andrew,

Is there any method through which we can disable GUI until it runs complete...

Let me brief more...Suppose when I press the run button in GUI, the process starts running, and it will search for xyz.il file in pwd in the loop as soon it finds it will stop and run completes...Now I want that upto till the run is completed; I cannot enter any new data in GUI as it is in disabled form..?

I have gone through this form-- community.cadence.com/.../skill-code-to-disable-all-callbacks ...but I think this is for CDF?

Any help would be highly appreciated!

Regards,

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

    You could use hiSetFieldEnabled for each of the fields on your form when the process starts, and then call it again to re-enable the fields when the process finishes (my assumption would be that you use ipcBeginProcess to launch the job and use the exit handler argument for that function to be triggered when it completes).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    You could use hiSetFieldEnabled for each of the fields on your form when the process starts, and then call it again to re-enable the fields when the process finishes (my assumption would be that you use ipcBeginProcess to launch the job and use the exit handler argument for that function to be triggered when it completes).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • saurabh96
    saurabh96 over 4 years ago in reply to Andrew Beckett

    Greetings Andrew,

    For the test cases, I am trying, it contains more than 50 different fields...using hiSetFieldEnabled for each field and then again calling will be a huge time -taking..isn't there another way ..through which we can achieve this?

    Yes... I am using ipcBeginProcess to launch the job below the code I am using.

    procedure(Runform(form)
    let((cmdPid abcStdout)

    cmdPid = ipcBeginProcess("./abc.sh")
    ipcWait(cmdPid)
    while(abcStdout=ipcReadProcess(cmdPid)
    printf("%s" abcStdout ) ;
    )
    if(!ipcGetExitStatus(cmdPid) == 0 then
    error("abc: couldnot run\n")
    )

    Andrew can you elaborate more how to do this using any example?

    Thanks in advance,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to saurabh96
    saurabh96 said:
    For the test cases, I am trying, it contains more than 50 different fields...using hiSetFieldEnabled for each field and then again calling will be a huge time -taking..isn't there another way ..through which we can achieve this?

    This is nonsense. I just used some code I had lying around which creates a big form and had it create 400 fields on the form. I then ran the function to enable or disable them all through the SKILL profiler and it was actually below what could be measured (so definitely less than 0.01s). Even the top-level and parser took less than 0.1 and that was with me calling the function to disable the fields and hitting the start/stop buttons for the profiler.

    If there had been another simpler way to achieve this, I'd have suggested it.

    In addition, if you're invoking the command using ipcBeginProcess() followed by ipcWait, then Virtuoso will block until it completes - so you won't be able to interact with the form anyway. You could (as I suggested in a previous post) use the exit handler (i.e. the asynchronous way of using ipcBeginProcess) which would mean that the UI wouldn't block. This can be seen in this code below (extending my sample code to create a big form). Call abDisplayBigLayoutForm(30) and then hit the Apply button - all the fields will be disabled, and then 15 seconds later (the ipcBeginProcess is just launching "sleep 15" to illustrate the principle) all the fields will be re-enabled again.

    procedure(abDisplayBigLayoutForm(numFields)
        abCreateBigLayoutForm(numFields)
        hiDisplayForm(abBigLayoutForm)
    )
    
    procedure(abCreateBigLayoutForm(numFields)
        let((fields field label gridLay)
            for(i 0 numFields
                field=hiCreateStringField(?name concat('myfield i))
                label=hiCreateLabel(?name concat('label i) ?labelText
                    sprintf(nil "Field %d" i)
                )
                fields=tconc(fields list(label 'row i 'col 0))
                fields=tconc(fields list(field 'row i 'col 1))
            )
            fields=tconc(fields list('col_stretch 0 0))
            fields=tconc(fields list('col_stretch 1 1))
            fields=car(fields)
            gridLay=hiCreateGridLayout(
                'gridLay
                ?items fields
            )
            hiCreateLayoutForm(
                'abBigLayoutForm
                "Big layout form"
                ;------------------------------------------------------------
                ; Add a stretchable region below the grid so that 
                ; the fields don't spread out vertically
                ;------------------------------------------------------------
                hiCreateVerticalBoxLayout(
                    'vbox
                    ?items list(
                        gridLay
                        list('stretch_item 1)
                    )
                )
                ?minSize 600:200
                ?callback 'abBigLayoutFormCB
            )
        )
    )
    
    procedure(abBigLayoutEnableFields(form enable)
        foreach(field form->fieldList
            hiSetFieldEnabled(get(form field) enable)
        )
    )
    
    procedure(abBigLayoutFinished(ipcId status)
        printf("FINISHED\n")
        abBigLayoutEnableFields(abBigLayoutForm t)
    )
    
    procedure(abBigLayoutOutput(ipcId data)
        printf("OUTPUT: %L\n" data)
    )
    
    procedure(abBigLayoutFormCB(form)
        let((ipcId)
            abBigLayoutEnableFields(form nil)
            ipcId=ipcBeginProcess("sleep 15" "" 'abBigLayoutOutput
                'abBigLayoutOutput 'abBigLayoutFinished
            )
        )
    )
    • 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