Home > Community > Forums > PCB Design > TCL/TK with Skill

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 TCL/TK with Skill 

Last post Fri, Sep 24 2004 2:18 AM by archive. 5 replies.
Started by archive 24 Sep 2004 02:18 AM. Topic has 5 replies and 2952 views
Page 1 of 1 (6 items)
Sort Posts:
  • Fri, Sep 24 2004 2:18 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    TCL/TK with Skill Reply

    I just started writing Skill programs on ConceptHDL. I am looking for some help on how to create/use UI forms. Any suggestion as to where should I start? I am thinking to do the UI forms in TCL/Tk & try and use the forms inside skill program.


    Originally posted in cdnusers.org by stanley j
    • Post Points: 0
  • Fri, Sep 24 2004 5:44 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: TCL/TK with Skill Reply

    Stanley,

    Could you provide a brief description of what product the forms in SKILL you reference apply? This topic may move to either the Allegro or Concept forums depending on its applicability.


    Originally posted in cdnusers.org by skyhawk
    • Post Points: 0
  • Fri, Sep 24 2004 8:07 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: TCL/TK with Skill Reply

    Not sure what your question is, but it is very easy to use tcl/tk within skill and therefore other cdn apps such as Allegro DE HDL (formerly known as ConceptHDL). contact me directly if you like a copy of the white paper I presented at ICU2003.

    Below is a very simple example of an tcl app that performs zoom functions in concept. Note that you need to install tcl/tk. you can get it at www.tcltk.com

    =======================================================
    ;;set ConceptSKILL global variables
    verbose = cnSetRunOptions(?result cnOUT_VERBOSE ?display cnOUT_VERBOSE)
    silent = cnSetRunOptions(?result cnOUT_SILENT ?display cnOUT_SILENT)

    (defun tclInterp (childID data)
    ;; send the command you recieved to concepthdl
    cnSendCommand(cnhandle, data)
    ;; send the command back to tcl app
    ;; this is just to see that the data got to skill
    ipcWriteProcess(childID data)

    )
    ;; add the dfII/bin path to the path environment variable
    ;; otherwise the ipc server will not launch when ipcBeginProcess is invoked.
    sprintf( dfii_bin_path ""%s\\tools\\dfII\\bin"" getShellEnvVar(""CDSROOT""))
    setShellEnvVar( sprintf(nil ""path=%s;%s"" getShellEnvVar(""path"") , dfii_bin_path ) )

    cnhandle = cnmpsImport()
    tclp = ipcBeginProcess(""wish tcl_skill.tcl"" """" 'tclInterp )

    =========================================================

    Here is the tcl program (name it tcl_skill.tcl
    otrherwise the ipcBeginProcess call will do nothing):

    =========================================================

    #!/usr/bin/sh
    #\
    exec wish ""$0"" ""$@""
    # prog below used to send data to skill on stdout
    proc TCLSkill_Send {command} {
    set list [file channels]
    puts stdout $command
    flush stdout
    }
    # prog used to display recieved data
    proc TCLSkill_Recv {} {
    set response [read stdin]
    while {! [info complete $response]} {
    append response [read stdin]
    }
    # print the reponse in the text widget
    .t insert end ""R> $response""
    .t yview moveto 1

    }
    button .b1 -text ""zoom in"" -command [list TCLSkill_Send ""zoom in""]
    button .b2 -text ""zoom out"" -command [list TCLSkill_Send ""zoom out""]
    button .b3 -text ""zoom fit"" -command [list TCLSkill_Send ""zoom fit""]
    grid .b1 -in . -row 0 -column 0 -sticky nswe -padx 10 -pady 10
    grid .b2 -in . -row 1 -column 0 -sticky nswe -padx 10 -pady 10
    grid .b3 -in . -row 2 -column 0 -sticky nswe -padx 10 -pady 10
    text .t -width 50 -height 10
    grid .t -in . -row 3 -column 0 -sticky nswe
    update
    update idletasks

    # configure stdin channel so we can recieve data and deal with it to....
    fconfigure stdin -buffering none -blocking 0 -translation auto
    fileevent stdin readable ""TCLSkill_Recv""
    wm title . ""TCL/Skill""

    Hope this helps
    Andy


    Message was edited by: Andy_Kulik


    Originally posted in cdnusers.org by Andy_Kulik
    • Post Points: 0
  • Fri, Sep 24 2004 9:15 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: TCL/TK with Skill Reply

    I am talking about ConceptHDL


    Originally posted in cdnusers.org by stanley j
    • Post Points: 0
  • Fri, Sep 24 2004 9:37 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: TCL/TK with Skill Reply

    Hi Andy,

    Thanks for your reply. It gives me a good starting point for me to learn TCL/TK interfacing with Skill for CONCEPTHDL. I can't find your email id....Could you please attach the white paper in your reply. There is ""Attach Files"" button.

    Thanks for your help.

    Stanley


    Originally posted in cdnusers.org by stanley j
    • Post Points: 0
  • Sun, Sep 26 2004 10:00 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: TCL/TK with Skill Reply

    Hi Stanley,

    I attached the paper, slides and sample project I used.
    Let me know if you need anything else. I am more than happy to help out.

    Andy

    PS: Just noticed that the zip file was corrupted after uploading it. MAy be Cadence support can check their upload functions. The paper has my contact info in case you need the example project.......


    Message was edited by: Andy_Kulik


    Originally posted in cdnusers.org by Andy_Kulik
    • Post Points: 0
Page 1 of 1 (6 items)
Sort Posts:
Started by archive at 24 Sep 2004 02:18 AM. Topic has 5 replies.