Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

20


The Standalone skill Program

The standalone skill application offers an interactive environment for users to execute SKILL functions.

This application supports only the SKILL functions documented in the current reference. It does not include Cadence Virtuoso application components or support related application-specific SKILL functions.

Syntax

The syntax for running skill is as follows:

skill [<options>] [<IL file(s)…>]

options

One or more of these options can be used, separated by spaces.

  • -c: read SKILL functions from a string.
  • -e: abort when a file with an error is encountered.
  • -f: ignore the .ilinit file.
  • -i: switch to interactive mode, instead of exiting, after a specified IL file is loaded.

IL file(s)

When skill is invoked with one or more IL files, the files are loaded in the order in which they are specified and the application exits after loading the last file.

When skill is invoked without any IL file, an interactive prompt is displayed at which the use can enter SKILL functions.

When no options or IL files are specified, the skill program is started in interactive mode where an input prompt is displayed for the user to type in commands or operations.

Examples

Runs skill in interactive mode from the shell prompt. If the user types in 4*10, the value returned is 40. The exit command closes the program and returns the user to the shell prompt:
sh> skill
> 4*10
40
> exit
sh>

Runs skill by reading SKILL functions from a string:
skill -c "144 / 12"
=> 12

Runs skill in interactive mode after the specified IL file is loaded:
skill -i new.il

Runs skill in interactive mode with a prompt at which the use can enter SKILL functions:
skill -I new.il

Runs skill by reading SKILL functions from the specified IL files in the order in which they are specified:
skill new.il new1.il

Use skill as a Script

The skill application can also be used as a script similar to sh or Perl.

The first line of the script must have a command to invoke the 'skill' application. Arguments used in the script are treated as strings, as in the case of other scripting languages. The script must include the exit() call to terminate the script. If it is not included, skill treats the arguments as IL files and will attempt to load them.

A sample script follows:

#! /cdsHier/tools/dfII/bin/skill
printf("Hello world\n")
when( argc() == 2
    printf("Arguments: %s %s\n",argv(1) argv(2))
    printf("Types: %s %s\n",type(argv(1)),type(argv(2)))
)
exit(0)

Before running the script, ensure that the script file has permissions set as follows:

chmod + x 

Related Topics

Scheme/SKILL++ Equivalents Tables

Identifiers Used to Denote Data Types

Data type identifiers are used to indicate the type of value required by an API argument. These data types are denoted by a single letter that is prefixed to the argument label and is separated from the argument by an underscore; for example, t is the data type in t_viewName. Data types and underscores are used only as identifiers; they must not be typed when specifying the argument in a function.

Prefix Internal Name Data Type

a

array

array

A

amsobject

AMS object

b

ddUserType

DDPI object

B

ddCatUserType

DDPI category object

C

opfcontext

OPF context

d

dbobject

Cadence database object (CDBA)

e

envobj

environment

f

flonum

floating-point number

F

opffile

OPF file ID

g

general

any data type

G

gdmSpecIlUserType

generic design management (GDM) spec object

h

hdbobject

hierarchical database configuration object

I

dbgenobject

CDB generator object

K

mapiobject

MAPI object

l

list

linked list

L

tc

Technology file time stamp

m

nmpIlUserType

nmpIl user type

M

cdsEvalObject

cdsEvalObject

n

number

integer or floating-point number

o

userType

user-defined type (other)

p

port

I/O port

pkx

package

package

q

gdmspecListIlUserType

gdm spec list

r

defstruct

defstruct

R

rodObj

relative object design (ROD) object

s

symbol

symbol

S

stringSymbol

symbol or character string

t

string

character string (text)

T

txobject

transient object

u

function

function object, either the name of a function (symbol) or a lambda function body (list)

U

funobj

function object

v

hdbpath

hdbpath

w

wtype

window type

sw

swtype

subtype session window

dw

dwtype

subtype dockable window

x

integer

integer number

y

binary

binary function

&

pointer

pointer type


Return to top
 ⠀
X