Cadence SKILL.html

 
ca de en es fr it nl no pl pt ru ro fi sv tr vo


 

SKILL
Paradigm OOP or Functional
Appeared in 1990
Developer Cadence Design Systems
Typing discipline dynamic
Major implementations Cadence Allegro, Cadence APD, Cadence Concept HDL and Cadence Virtuoso. Major LISP Implementation - Cadence UniCAD.
Dialects SKILL/SKILL++
Influenced by Common Lisp

SKILL is the LISP-like scripting language and PCell (Parameterized Cells) description language of Cadence Design Systems IC design software that was originally put forth in an IEEE paper in 1990.

SKILL will also run under the Cadence Allegro PCB design toolset.

Contents

History

SKILL was originally based on a flavor of Lisp called "Franz Lisp" created by Franz Inc. of Oakland, CA.

Syntax

Skill programmers have a choice of expression syntaxes. Traditional lisp syntax such as

(car mylist)

can be mixed with C-like syntax such as

car(mylist)

. Certain arithmetic operations can be also called using an infix notation. Thus

(plus 1 2)

 plus(1 2)

1+2

are all recognized.

Note that all variables in Skill are considered special.

Additional commands with a prefix of axl are added for functions specific to the PCB Editor, such as (axlDBGetDesign). Commands with a prefix of cn are added for functions specific to the Design Entry tool, such as (cnGetDwgInfo).

Example

procedure(pcGenCell(pcCellView "d")
  prog((fingers m w_microns l_microns)
 
       if(! pcCellView return())
 
       fingers = pcCellView~>parameters~>fingers
       if(! fingers then fingers = 1)
       if(! fixp(fingers) then fingers = 1)
       m = pcCellView~>parameters~>m
       if(! m then m = 1)
       if(! fixp(m) then m = 1)
       w_microns = pcCellView~>parameters~>w_microns
       if(! w_microns then w_microns = 1.000000)
       if(! floatp(w_microns) then w_microns = 1.000000)
       l_microns = pcCellView~>parameters~>l_microns
       if(! l_microns then l_microns = 1.000000)
       if(! floatp(l_microns) then l_microns = 1.000000)
 
    (let (cv tf f quantum polyPitch serial bag prop xCorrection yCorrection contactSpacing polySpacing activeContactEnc polyContactSpacing selectActiveEnc wellActiveEnc m1ContactEnc contactSize deep)
      (setq cv pcCellView)
      (setq tf (techGetTechFile cv))
      (setq serial (equal m 1))
      (setq f (max fingers m))
      (setq bag (dbOpenBag (ddGetObj (getSGq tf libName)) "r"))
      (setq prop (dbFindProp bag "minLength"))
      (setq quantum (quotient (getq prop value) 2))
      (setq prop (dbFindProp bag "technology"))
      (setq deep (rindex (getq prop value) "DEEP"))
      (dbCloseBag bag)
      (setq contactSize (times 2 quantum))
      (if (equal (modulo (round (quotient l_microns (quotient quantum 2.0))) 2) 1) then
	(setq xCorrection (quotient quantum 4.0)) else (setq xCorrection 0))
      (if (equal (modulo (round (quotient w_microns (quotient quantum 2.0))) 2) 1) then
	(setq yCorrection (quotient quantum 4.0)) else (setq yCorrection 0))
      (setq contactSpacing (techGetSpacingRule tf "minSpacing" "cc")) ;; 2.0
      (setq polySpacing (techGetSpacingRule tf "minSpacing" "poly"))  ;; 3.0
      (setq polyContactSpacing (techGetSpacingRule tf "minSpacing" "poly" "cc")) ;; 2.0 vs nil
      (setq activeContactEnc (techGetOrderedSpacingRule tf "minEnclosure" "active" "cc")) ;; 1.0 vs nil
      (setq selectActiveEnc (techGetOrderedSpacingRule tf "minEnclosure" "pselect" "active")) ;; 2.0 vs nil
      (setq wellActiveEnc (techGetOrderedSpacingRule tf "minEnclosure" "nwell" "active")) ;; 6.0 vs nil
      (setq m1ContactEnc (techGetOrderedSpacingRule tf "minEnclosure" "metal1" "cc")) ;; 1.0 vs nil
      (if (equal serial t) then (setq polyPitch (plus l_microns polySpacing)) else (setq polyPitch (plus l_microns (times 2 (plus polyContactSpacing quantum)))))
      (let (halfW halfL left right upper lower offset netName idx fig net pin)
	(if (equal deep "DEEP") then (setq halfW (times (plus w_microns (times 5 quantum)) 0.5)) else (setq halfW (times (plus w_microns (times 4 quantum)) 0.5)))
	(setq halfL (times l_microns 0.5))
	(setq offset 0)
	(setq netName "G")
	(setq idx 2)
	(for g 1 f
	     (setq left (plus (minus halfL) offset xCorrection))
	     (setq right (plus halfL offset xCorrection))
	     (setq lower (plus (minus halfW) yCorrection))
	     (setq upper (plus halfW yCorrection))
	     (dbCreateRect cv "poly" (list (range left lower) (range right upper)))
	     (setq fig (dbCreateRect cv (list "poly" "pin") (list (range left lower) (range right upper))))
	     (setq net (dbCreateNet cv netName))
	     (dbCreateTerm net netName "input")
	     (setq pin (dbCreatePin net fig netName))
	     (setSGq pin (list "top" "bottom") accessDir)
	     (setq netName (strcat "G" (sprintf nil "%d" (postincrement idx))))
	     (setq offset (plus offset polyPitch))
	     )
	)
      (let (polyEdgeActiveEdge w h hOffset hOffsetStep actLeft actRight actUpper actLower selLeft selRight selUpper selLower wellLeft wellRight
			       wellUpper wellLower numContacts conLeft conRight conUpper conLower netName idx minWidth rightContactOffset leftContactOffset actChunkWidth)
	(setq polyEdgeActiveEdge (plus polyContactSpacing contactSize activeContactEnc))
	(setq w (plus (times 2 polyEdgeActiveEdge) (times (difference f 1) polyPitch) l_microns))
	(setq h w_microns)
	(setq minWidth (lessp w_microns (plus (times 2 activeContactEnc) contactSize)))
	(if (equal (mod f 2) 1) then
	  (setq offset (times polyPitch (quotient f 2)))
	  else
	  (setq offset (plus (times polyPitch (quotient (difference f 1) 2)) (times polyPitch 0.5)))
	  )
	(setq actLeft (plus (minus (times w 0.5)) offset xCorrection))
	(setq actRight (plus (times w 0.5) offset xCorrection))
	(setq actLower (plus (minus (times h 0.5)) yCorrection))
	(setq actUpper (plus (times h 0.5) yCorrection))
	(dbCreateRect cv "pactive" (list (range actLeft actLower) (range actRight actUpper)))
	(if minWidth then (setq actUpper (plus actLower (times 4 quantum))))
	(setq selLeft (difference actLeft selectActiveEnc))
	(setq selRight (plus actRight selectActiveEnc))
	(if (equal deep "DEEP") then
	  (setq selLower (difference actLower selectActiveEnc (times 0.5 quantum)))
	  (setq selUpper (plus actUpper selectActiveEnc (times 0.5 quantum)))
	  else
	  (setq selLower (difference actLower selectActiveEnc))
	  (setq selUpper (plus actUpper selectActiveEnc))
	  )
	(dbCreateRect cv "pselect" (list (range selLeft selLower) (range selRight selUpper)))
	(setq wellLeft (difference actLeft wellActiveEnc))
	(setq wellRight (plus actRight wellActiveEnc))
	(setq wellLower (difference actLower wellActiveEnc))
	(setq wellUpper (plus actUpper wellActiveEnc))
	(dbCreateRect cv "nwell" (list (range wellLeft wellLower) (range wellRight wellUpper)))
	(if minWidth then (setq numContacts 1)
	    (setq actChunkWidth (plus (times 2 activeContactEnc) contactSize))
	    else
	    (setq numContacts (floor (quotient (plus (difference w_microns (times 2 activeContactEnc)) contactSpacing)
					       (plus contactSize contactSpacing))))
	    )
	(if (equal serial t) then
	  (setq leftContactOffset (plus actLeft activeContactEnc))
	  (setq rightContactOffset (plus leftContactOffset (times 2 (plus quantum polyContactSpacing))
					 (times f l_microns) (times (difference f 1) polySpacing)))
	  (let (vOffset vOffsetStep lower conRight conLower conUpper halfW mid m1Left m1Right m1Lower m1Upper fig net pin)
	    (setq vOffset 0)
	    (setq vOffsetStep (plus contactSize contactSpacing))
	    (setq conRight (plus leftContactOffset contactSize))
	    (setq lower (plus actLower activeContactEnc))
	    (for c 1 numContacts
		 (setq conLower (plus lower vOffset))
		 (setq conUpper (plus conLower contactSize))
		 (dbCreateRect cv "cc" (list (range leftContactOffset conLower) (range conRight conUpper)))
		 (setq vOffset (plus vOffset vOffsetStep))
		 )
	    (setq halfW (plus quantum m1ContactEnc))
	    (setq mid (plus leftContactOffset quantum))
	    (setq m1Left (difference mid halfW))
	    (setq m1Right (plus mid halfW))
	    (setq m1Lower actLower)
	    (setq m1Upper actUpper)
	    (dbCreateRect cv "metal1" (list (range m1Left m1Lower) (range m1Right m1Upper)))
	    (setq fig (dbCreateRect cv (list "metal1" "pin") (list (range m1Left m1Lower) (range m1Right m1Upper))))
	    (setq net (dbCreateNet cv "S"))
	    (dbCreateTerm net "S" "inputOutput")
	    (setq pin (dbCreatePin net fig "S"))
	    (setSGq pin (list "top" "bottom") accessDir)
	    )
	  (let (vOffset vOffsetStep lower conRight conLower conUpper halfW mid m1Left m1Right m1Lower m1Upper fig net pin)
	    (setq vOffset 0)
	    (setq vOffsetStep (plus contactSize contactSpacing))
	    (setq conRight (plus rightContactOffset contactSize))
	    (setq lower (plus actLower activeContactEnc))
	    (for c 1 numContacts
		 (setq conLower (plus lower vOffset))
		 (setq conUpper (plus conLower contactSize))
		 (dbCreateRect cv "cc" (list (range rightContactOffset conLower) (range conRight conUpper)))
		 (setq vOffset (plus vOffset vOffsetStep))
		 )
	    (setq halfW (plus quantum m1ContactEnc))
	    (setq mid (plus rightContactOffset quantum))
	    (setq m1Left (difference mid halfW))
	    (setq m1Right (plus mid halfW))
	    (setq m1Lower actLower)
	    (setq m1Upper actUpper)
	    (dbCreateRect cv "metal1" (list (range m1Left m1Lower) (range m1Right m1Upper)))
	    (setq fig (dbCreateRect cv (list "metal1" "pin") (list (range m1Left m1Lower) (range m1Right m1Upper))))
	    (setq net (dbCreateNet cv "D"))
	    (dbCreateTerm net "D" "inputOutput")
	    (setq pin (dbCreatePin net fig "D"))
	    (setSGq pin (list "top" "bottom") accessDir)
	    )
	  (if minWidth then
	    (dbCreateRect cv "pactive" (list (range actLeft actLower) (range (plus actLeft actChunkWidth) actUpper)))
	    (dbCreateRect cv "pactive" (list (range (difference rightContactOffset activeContactEnc) actLower)
					     (range (plus (difference rightContactOffset activeContactEnc) actChunkWidth) actUpper)))
	    )
	  else
	  (setq hOffset (plus actLeft activeContactEnc))
	  (setq hOffsetStep (plus (times 2 (plus quantum polyContactSpacing)) l_microns))
	  (setq netName "S")
	  (setq idx 2)
	  (for groups 1 f (let (vOffset vOffsetStep lower conRight conLower conUpper halfW mid m1Left m1Right m1Lower m1Upper fig net pin)
			    (setq vOffset 0)
			    (setq vOffsetStep (plus contactSize contactSpacing))
			    (setq conRight (plus hOffset contactSize))
			    (setq lower (plus actLower activeContactEnc))
			    (for c 1 numContacts
				 (setq conLower (plus lower vOffset))
				 (setq conUpper (plus conLower contactSize))
				 (dbCreateRect cv "cc" (list (range hOffset conLower) (range conRight conUpper)))
				 (setq vOffset (plus vOffset vOffsetStep))
				 )
			    (setq halfW (plus quantum m1ContactEnc))
			    (setq mid (plus hOffset quantum))
			    (setq m1Left (difference mid halfW))
			    (setq m1Right (plus mid halfW))
			    (setq m1Lower actLower)
			    (setq m1Upper actUpper)
			    (dbCreateRect cv "metal1" (list (range m1Left m1Lower) (range m1Right m1Upper)))
			    (setq fig (dbCreateRect cv (list "metal1" "pin") (list (range m1Left m1Lower) (range m1Right m1Upper))))
			    (setq net (dbCreateNet cv netName))
			    (dbCreateTerm net netName "inputOutput")
			    (setq pin (dbCreatePin net fig netName))
			    (setSGq pin (list "top" "bottom") accessDir)
			    )
	       (if minWidth then
		 (dbCreateRect cv "pactive" (list (range (difference hOffset activeContactEnc) actLower)
						  (range (plus (difference hOffset activeContactEnc) actChunkWidth) actUpper)))
		 )
	       (setq hOffset (plus hOffset hOffsetStep))
	       (setq netName (strcat "S" (sprintf nil "%d" (postincrement idx))))
	       )
	  (let (vOffset vOffsetStep lower conRight conLower conUpper halfW mid m1Left m1Right m1Lower m1Upper fig net pin)
	    (setq vOffset 0)
	    (setq vOffsetStep (plus contactSize contactSpacing))
	    (setq conRight (plus hOffset contactSize))
	    (setq lower (plus actLower activeContactEnc))
	    (for c 1 numContacts (setq conLower (plus lower vOffset))
		 (setq conUpper (plus conLower contactSize))
		 (dbCreateRect cv "cc" (list (range hOffset conLower) (range conRight conUpper)))
		 (setq vOffset (plus vOffset vOffsetStep))
		 )
	    (setq halfW (plus quantum m1ContactEnc))
	    (setq mid (plus hOffset quantum))
	    (setq m1Left (difference mid halfW))
	    (setq m1Right (plus mid halfW))
	    (setq m1Lower actLower)
	    (setq m1Upper actUpper)
	    (dbCreateRect cv "metal1" (list (range m1Left m1Lower) (range m1Right m1Upper)))
	    (setq fig (dbCreateRect cv (list "metal1" "pin") (list (range m1Left m1Lower) (range m1Right m1Upper))))
	    (setq net (dbCreateNet cv "D"))
	    (dbCreateTerm net "D" "inputOutput")
	    (setq pin (dbCreatePin net fig "D"))
	    (setSGq pin (list "top" "bottom") accessDir)
	    )
	  (if minWidth then
	    (dbCreateRect cv "pactive" (list (range (difference hOffset activeContactEnc) actLower)
					     (range (plus (difference hOffset activeContactEnc) actChunkWidth) actUpper)))
	      )))
      (dbReplaceProp cv "viewSubType" "string" "maskLayoutParamCell")
      (dbReplaceProp cv "function" "string" "transistor")
      )
       t
 
       return(t)
       )
)

References

Academic:

  • G. Wood and H-F S. Law, "SKILL - An Interactive Procedural Design Environment," Proceedings of Custom Integrated Circuits Conference, 1986, pp.544-547
  • Timothy J. Barnes, "SKILL: A CAD System Extension Language," Design Automation Conference, 1990, pp.266-271


User Groups

  • A Skill User Group is currently hosted on "Yahoo Groups" under the name "Skill_School".
  • Cadence also hosts two Skill User Group forums on their "Cadence Community" website. One dedicated to Allegro PCB Skill (PCB SKILL), and one dedicated to IC Skill (Custom IC SKILL).
  • No known user group currently exists for Cadence Concecpt SKILL scripting. (Nov 2008)

Note: Due to Wikipedia's Copyright policy, direct links to all three SKILL UserGroups cannot be given here. Visit Yahoo Groups or the Cadence Community website and search by the exact UserGroup name.


External links

All Right Reserved © 2007, Designed by Stylish Blog.