• 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. Problem updating OutputStringField

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13008
  • 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

Problem updating OutputStringField

climbnc
climbnc over 8 years ago

The following code is assigned to a button i have in a GUI.  When i hit the button i have print statements along the way to tell me when it is generating, when it finishes, and if there were any errors.  I have get() functions along with them to update the outputStringField in my gui to give me the same information.  the only problem is that it only outputs when it is finished or when there was an error, not when it is running.

Could someone take a look and please tell me why the get functions are not functioning like i expect, that is like the printf functions?

I even tried putting the "Generating GDS" get function into a procedure and adding it in front of the wavGenGds() callback and I get the same results.

There is something simple i am missing but cannot figure out what it is.

Thank you very much in advance for your help.

Thanks,

Chris

 

procedure( wavGenGds( @optional (cv getEditRep()) (strmOutRunDir "./CALIBRE/GDS") )

prog( (bin_strmout,libname,cellname,viewname,strmout_str)

bin_strmout="/cad/tools/cadence/ic616_isr14/bin/strmout>/dev/null"

if( cv~>cellViewType != "maskLayout" then
printf("Expecting maskLayout view type !\n")
return(nil)
)

libname= cv~>libName
cellname= cv~>cellName
viewname=cv~>viewName
tf = ciGetTechFile()
techFileName = tf~>libName

if( cv~>modifiedButNotSaved then
printf("%s %s has been modified, but not saved ! - need to save the views\n",cellname,viewname)
return(nil)
)

strmout_str = strcat(
bin_strmout
" "
sprintf(str "-library %s" libname)
" "
sprintf(str "-strmFile %s.gds" cellname)
" "
sprintf(str "-runDir %s" strmOutRunDir)
" "
sprintf(str "-topCell %s" cellname )
" "
sprintf(str "-view %s" viewname )
" "
sprintf(str "-techLib %s" techFileName)
" "
sprintf(str "-logFile %s.log" cellname)
" "
) nil nil

printf("Running wavStrmOut on cell: %s view: %s\n",cellname,viewname)
;wavRunGuiForm~>wavGenGdsField~>value = sprintf(wavGenGdsRun "GENERATING GDS for %s" cellname)
get(wavRunGuiForm wavRunGuiForm~>wavGenGdsField~>value = "Genereating GDS")

if( !system( strmout_str) then
printf("GDS file generation failed - check %s/%s.log file !\n" strmOutRunDir,cellname)
;wavRunGuiForm~>wavGenGdsField~>value = "Streamout Failed - Check Log File"
get(wavRunGuiForm wavRunGuiForm~>wavGenGdsField~>value = "Streamout Failed - Check Log File")
return(nil)
else
printf( "GDS log file located at %s/strmOut.log\n", strmOutRunDir )
printf( "GDS file located at %s/%s.gds\n", strmOutRunDir,cellname )
;wavRunGuiForm~>wavGenGdsField~>value = "GDS CREATED SUCCESFULLY"
get(wavRunGuiForm wavRunGuiForm~>wavGenGdsField~>value = "GDS Created Successfully")
return(t)
) ; end if
) ; end prog
) ; end wavGenGds

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    First of all the calls to get() are completely unnecessary - I don't know why you're doing that. If you just had:

    wavRunGuiForm~>wavGenGdsField~>value = "Genereating GDS" 

    then that would be sufficient. What your code is actually doing is doing that (because it's an argument to get()), and then doing:

    get(wavRunGuiForm "Genereating GDS")

    which almost certainly just returns nil, because there's no field or property called "Genereating GDS". It passes that string because that's the return value of the assignment. So the get() calls are unnecessary - the simple assignment would be enough.

    Now, to your problem. The issue is that the system() call is blocking, and virtuoso is single-threaded (mostly) and so the UI doesn't update until the callback is completed (that's when the UI loop continues). You can solve this using hiFlush() - see the simple example below to see how this works:

    procedure(runSomething(form)
      form->status->value="Generating"
      hiFlush()
      system("sleep 10")
      form->status->value="Finished"
    )

    hiCreateAppForm(
      ?name 'myForm
      ?fields list(
        hiCreateStringField(?name 'status ?editable nil)
      )
      ?formTitle "Silly example"
      ?callback 'runSomething
    )

    hiDisplayForm(myForm)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • climbnc
    climbnc over 8 years ago
    thank you 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