• 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. Text editor or framework for SKILL...

Stats

  • Locked Locked
  • Replies 29
  • Subscribers 153
  • Views 31798
  • 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

Text editor or framework for SKILL...

ToMWUT
ToMWUT over 16 years ago
Hello All,

I've got some general questions about tools which could be used to write programs in SKILL. First of all could you recommend some text editor which highlights the SKILL syntax. Right now my main problems concerns syntax errors based on the problem that I'm for example passing wrong argument types to my procedures... Is there maybe a tool which could help me with this problem in SKILL, such as for example Eclipse for J2EE or Visual Studio for .Net? If not – even some text editor with the right syntax highlight for SKILL will be sufficient.

Thanks,

ToM
  • Cancel
  • jck22
    jck22 over 16 years ago
    Sorry for blasting the whole board. I am still new to the Cadence community. Thank you for sending me the skillmode for emacs.

    Jerry
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jling
    jling over 15 years ago
    Hi Andrew,

    Do you mind sending me a copy of the skillMode for emacs also?

    Also, how would I install the skillMode file for emacs?

    Thanks

    John
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    John,

    I sent this to you directly.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbriet
    mbriet over 15 years ago
     Hello Andrew,

     Could you also email me a copy of skillMode for emacs ? (sorry for this recurrent request ...)

     Thanks,

     Michel.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Michel,

    Please send me a personal message (you can do this via the community forums) with your email address, and then I can send it to you,

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MacJin
    MacJin over 14 years ago
    Dear Andrew, I got a SKILL mode package from Mr. Kenneth Brun Nielsen. Probably he got it from you. But I can't use it because of an error as bellow, Invalid read syntax: "invalid multibyte form". My Emacs's version is as follow, GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-04-02 on GNUPACK Copyright (C) 2011 Free Software Foundation, Inc. I googled about this error, and I've known it was caused on Emacs 23.X.X. I tried to avoid the error, but I couldn't. Please help me to avoid the error if you have any ideas.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ebecheto
    ebecheto over 14 years ago

    Hi MacJin,

    Here is an example of skill mode that work. Probaly less powerfull than the one you expect to use, but quite convenient.

    Hope it helps. ++

     

    skillMode.el

    ;--- mode for SKILL ---
    ; created    07/02/07 by M.Masar
    ; modified   10/02/24 by ebecheto : added send-[region/line/buffer]-to-icfb with idea of http://www.cadence.com/community/forums/T/12956.aspx
    ;; ;; load the following 4 lines within a menu or directly into icfb; if you want to load lines from emacs to icfb.
    ;; procedure(socketHandler(ipcId data) let((inPort nextline)
    ;; inPort=infile(data)  when(inPort while(gets(nextLine inPort) printf("\n%s \n" nextLine)))          close(inPort)
    ;; inPort=infile(data)  when(inPort while(gets(nextLine inPort) return(print(evalstring(nextLine))))) close(inPort) ))
    ;; ipcBeginProcess("emacs ~/Skill/my-log.txt" "" 'socketHandler)
    
    ; put this file in the directory ~/.emacs.d/ 
    ; add the line : (add-to-list 'load-path "~/.emacs.d/")  (load "skillMode.el") ; in your ~/.emacs file
    ; Skill-mode, associated with the .il .ocn and .cdf files
    ; To use the skill mode for another file, use "M-x skill-mode"
    
    (defvar skill-mode-hook nil)
    
    (defun skill-indent-line ()
      (interactive)  
      (newline)
      (indent-relative)
    )
    
    (provide 'skill-indent-line)
    
    ;; Ed modifs.end
    (setq comment-start ";; ")
    (global-set-key  "\C-cu" 'uncomment-region)
    ;; (global-set-key  "\C-cc" 'comment-region);; ca marchouille
    (global-set-key  [(control c) (control c)] 'comment-region)
    
    
    (defvar skill-mode-map
      (let ((skill-mode-map (make-keymap)))
        (define-key skill-mode-map "\C-j" 'skill-indent-line)
        skill-mode-map)
      "Keymap for SKILL major mode")
    
    ;binding with file endings
    (add-to-list 'auto-mode-alist '("\\.il\\'" . skill-mode))
    (add-to-list 'auto-mode-alist '("\\.ocn\\'" . skill-mode))
    (add-to-list 'auto-mode-alist '("\\.cdf\\'" . skill-mode))
    
    (defconst skill-font-lock-keywords-1
      (list
           (cons (concat "\\<" (regexp-opt '( "add1" "and" "apply" "argc" "argv" "arrayp" "arrayref" "atof" "atoi" "atom" "band" "begin" "bitfield1" "bitfield"
                                              "blankstrp" "bnand" "bnor" "bnot" "booleanp" "bor" "boundp" "bxnor" "bxor" "case" "caseq" "ceiling" "concat" "cond"
                                              "cons" "constar" "copy" "copyDefstructDeep" "declare" "declareLambda" "declareNLambda" "declareSQNLambda" "define"
                                              "defmacro" "defprop" "defstruct" "defstructp" "defun" "defUserInitProc" "defvar" "do" "dtpr" "eq" "equal" "eqv" "err"
                                              "error" "errset" "errsetstring" "eval" "evalstring" "evenp" "exit" "expandMacro" "fboundp" "fixp" "floatp" "for"
                                              "forall" "foreach" "funcall" "funobj" "gc" "gensym" "geqp" "get" "get_pname" "get_string" "getd" "getFnWriteProtect"
                                              "getFunType" "getq" "getqq" "getVarWriteProtect" "greaterp" "if" "then" "else" "inportp" "inScheme" "inSkill" "integerp"
                                              "intToChar" "isCallable" "isInfinity" "isNaN" "lambda" "leftshift" "leqp" "lessp" "let" "letrec" "letseq" "listp"
                                              "listToVector" "load" "loadi" "loadstring" "makeTable" "makeVector" "map" "mapc" "mapcan" "mapcar" "maplist" "minus"
                                              "minusp" "mod" "modulo" "mprocedure" "needNCells" "negativep" "neq" "nequal" "newline" "nindex" "nlambda" "not"
                                              "nprocedure" "null" "numberp" "oddp" "onep" "openportp" "or" "otherp" "outportp" "pairp" "plist" "plus" "plusp" "portp"
                                              "postdecrement" "postincrement" "predecrement" "preincrement" "procedure" "procedurep" "prog" "prog1" "prog2" "progn"
                                              "putd" "putprop" "putpropq" "putpropqq" "quote" "quotient" "realp" "regExitAfter" "regExitBefore" "remainder"
                                              "remExitProc" "remprop" "return" "rexCompile" "rexExecute" "rexMagic" "rexMatchAssocList" "rexMatchList" "rexMatchp"
                                              "rexReplace" "rexSubstitute" "rightshift" "round" "set" "setarray" "setFnWriteProtect" "setplist" "setq" "setqbitfield1"
                                              "setqbitfield" "setVarWriteProtect" "stringp" "sub1" "sxtd" "symbolp" "symeval" "symstrp" "system" "tablep" "tailp" "times"
                                              "truncate" "type" "typep" "unalias" "unless" "vector" "vectorp" "warn" "when" "which" "while" "xdifference" "xplus"
                                              "xquotient" "xtimes" "zerop" "zxtd" ) t )
                                  "\\>")  'font-lock-keyword-face)
           (cons (concat "\\<" (regexp-opt '("nil" "t") t)  "\\>")  'font-lock-constant-face)
    
      )
      "Basic SKILL functions - arithmetic&logic operators, type tests, flow control, loops, rounding")
    
    
    (defconst skill-font-lock-keywords-2
      (append skill-font-lock-keywords-1
              (list
               (cons (concat "\\<" (regexp-opt '( "append" "append1" "bcdp" "buildString" "caar" "caaar" "caadr" "cadr" "caddr" "cdar" "cddr" "car" "cdr" "cdsGetInstPath"
                                                  "changeWorkingDir" "charToInt" "clearExitProcs" "close" "compress" "defMathConstants" "deleteDir" "deleteFile" "difference"
                                                  "display" "drain" "exists" "fileLength" "fileSeek" "fileTell" "fileTimeModified" "fprintf" "fscanf" "scanf" "sscanf"
                                                  "get_filename" "getc" "getchar" "getDirFiles" "gets" "getWorkingDir" "infile" "instring" "isDir" "isExecutable" "isFile"
                                                  "isFileEncrypted" "isFileName" "isLargeFile" "isLink" "isMacro" "isReadable" "isWritable" "last" "lconc" "length" "lineread"
                                                  "linereadstring" "list" "makeTempFileName" "member" "memq" "memv" "nconc" "ncons" "nth" "nthcdr" "nthelem" "numOpenFiles"
                                                  "outfile" "parseString" "pprint" "print" "printf" "printlev" "println" "read" "readstring" "readTable" "renameFile" "reverse"
                                                  "rplaca" "rplacd" "setcar" "setcdr" "setof" "simplifyFilename" "sort" "sortcar" "sprintf" "strcat" "strcmp" "stringToFunction"
                                                  "stringToSymbol" "stringToTime" "strlen" "strncat" "strncmp" "subst" "substring" "symbolToString" "tconc" "upperCase"
                                                  "vectorToList" "write" "writeTable" "xcons" "xCoord" "yCoord") t )
                                      "\\>")  'font-lock-keyword-face)
               )
      )
      "Additional SKILL functions - mostly string, list and file operations")
    
    
    
    (defconst skill-font-lock-keywords-3
      (append skill-font-lock-keywords-2
              (list
               (cons (concat "\\<" (regexp-opt '("abs" "acos" "addDefstructClass" "alias" "alphalessp" "alphaNumCmp" "asin" "assoc" "assq" "assv" "atan"
                                                 "atan2" "compareTime" "cos" "cputime" "createDir" "csh" "ed" "edi" "edit" "edl" "envobj" "exp" "expt"
                                                 "fix" "float" "floor" "getCurrentTime" "getInstallPath" "getLogin" "getPrompts" "getTempDir" "getShellEnvVar"
                                                 "getSkillPath" "getSkillVersion" "getVersion" "getWarn" "go" "help" "importSkillVar" "index" "log" "log10"
                                                 "lowerCase" "max" "measureTime" "min" "prependInstallPath" "random" "range" "remd" "remdq" "remove" "remq"
                                                 "rindex" "schemeTopLevelEnv" "setPrompts" "setShellEnvVar" "setSkillPath" "sh" "shell" "sin" "sqrt" "srandom"
                                                 "sstatus" "status" "tableToList" "tan" "theEnvironment" "timeToString" "timeToTm" "tmToTime" "vi" "vii" "vil" ) t)
    
                                      "\\>")  'font-lock-keyword-face) ) )
      "Other SKILL functions")
    
    
    
    (defvar skill-font-lock-keywords skill-font-lock-keywords-3
      "Default highlighting expressions for SKILL mode.")
    
    
    (defvar skill-mode-syntax-table
      (let ((skill-mode-syntax-table (make-syntax-table)))
        
        
        ; block comments
        (modify-syntax-entry ?/ ". 14" skill-mode-syntax-table)
        (modify-syntax-entry ?* ". 23" skill-mode-syntax-table)
    
        ; line comments
        (modify-syntax-entry ?\; "< b" skill-mode-syntax-table)
        (modify-syntax-entry ?\n "> b" skill-mode-syntax-table)
    
     
       skill-mode-syntax-table)
      "Syntax table for skill-mode")
    
    
    
      
    (defun skill-mode ()
      (interactive)
      (kill-all-local-variables)
      (use-local-map skill-mode-map)
      (set-syntax-table skill-mode-syntax-table)
      ;; Set up font-lock
      (set (make-local-variable 'font-lock-defaults) '(skill-font-lock-keywords))
      ;; Register our indentation function
      (setq major-mode 'skill-mode)
      (setq mode-name "SKILL")
      (run-hooks 'skill-mode-hook))
    
    (provide 'skill-mode)
    
    
    ;; ed modif for emacs2icfb
    (defun send-buffer-to-icfb () "" (interactive)
    ;;      (write-region (point-min) (point-max) "~/.emacs2icfb.buffer.il");; pas besoin de creer un fichier, il suffit d'envoyer le fichier en cours (buffer)
            (send-string-to-terminal (buffer-file-name)))
    (defun send-region-to-icfb () "" (interactive)
            (write-region (region-beginning) (region-end) "~/.emacs2icfb.region.il")
            (send-string-to-terminal (format "~/.emacs2icfb.region.il")))
    (defun send-line-to-icfb () "" (interactive)
            (write-region (line-beginning-position) (line-end-position) "~/.emacs2icfb.line.il")
            (send-string-to-terminal (format "load(\"%s\") \n" "~/.emacs2icfb.line.il")))
    (defun send-line-to-icfb-mv-forward () "" (interactive)
    ;;      (write-region (line-beginning-position) (line-end-position) "~/.emacs2icfb.line.il") ;<== il faut rajouter un retour chariot de plus pour icfb
            (write-region (line-beginning-position) (line-beginning-position 2) "~/.emacs2icfb.line.il")
            (send-string-to-terminal "~/.emacs2icfb.line.il")
            (forward-line 1))
    (defun send-function-to-icfb-mv-forward () "" (interactive)
            (write-region (point) (forward-list) "~/.emacs2icfb.function.il")
            (send-string-to-terminal "~/.emacs2icfb.function.il")
    )
    
      (define-key skill-mode-map "\C-c\C-b" 'send-buffer-to-icfb)
      (define-key skill-mode-map "\C-c\C-r" 'send-region-to-icfb)
      (define-key skill-mode-map "\C-c\C-l" 'send-line-to-icfb)
      (define-key skill-mode-map "\C-c\C-v" 'send-line-to-icfb-mv-forward)
      (define-key skill-mode-map "\C-c\C-f" 'send-function-to-icfb-mv-forward)
    
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MacJin
    MacJin over 14 years ago

    Hi ebechero,

    Thank you for posting your script.

    It is less powerful than I expect as you mentioned, but I will improve it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Slayer
    Slayer over 14 years ago

     Also Geany is very nice tool for writing skill code.

    Some basic features of Geany:

    • Syntax highlighting
    • Code folding
    • Symbol name auto-completion
    • Construct completion/snippets
    • Auto-closing of XML and HTML tags
    • Call tips
    • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list)
    • Symbol lists
    • Code navigation
    • Build system to compile and execute your code
    • Simple project management
    • Plugin interface (see Plugins)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeksold
    tweeksold over 13 years ago

    Lots of good stuff in that skillMode.el file--thanks!

     

    But I'm confused why you wrote all those "send-*-to-icfb" functions when you could just run "virtuoso -nographE" in Inferior Lisp mode? 

     

        (set-variable 'inferior-lisp-program "virtuoso -nographE -nocdsinit")

    With that, you can use the usual Lisp mode keys (e.g. C-x C-e and C-M-x) to send SKILL code to Virtuoso for evaluation.  There's also customizable variables to do doc lookups; e.g.

        (set-variable 'lisp-function-doc-command "help %s\n")

    Now you can use C-h C-f to get SKILL finder help on a function.

      --tweeks

    • 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