wangjicheng886的个人空间 https://blog.eetop.cn/1774723 [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

Preface 2

热度 11已有 652 次阅读| 2023-5-20 14:13 |个人分类:英语|系统分类:生活杂谈| 英语


SKILL API Documentation


Cadence tools have their own application procedural interface functions. You can access the

SKILL function references in the CDSDoc library by selecting Docs by Product and opening

the SKILL folder. The set of books you will find there include the following:

Cadence 工具具有自己的应用程序接口函数。您可以通过选择产品文档并打开 SKILL 文件夹,在 CDSDoc 库中访问 SKILL 函数参考。您将在那里找到一组书籍,包括以下内容:


1)

Cadence Design Framework II SKILL Functions Reference contains APIs for the

graphics editor, database access, design management, technology file administration,

online environment, design flow, user entry, display lists, component description format,

and graph browser.

"Cadence Design Framework II SKILL 函数参考包含了用于图形编辑器、数据库访问、设计管理、技术文件管理、在线环境、设计流程、用户输入、显示列表、元件描述格式和图形浏览器等方面的 API。"


2)

Cadence User Interface SKILL Functions Reference contains APIs for

management of windows and forms.

"Cadence 用户界面 SKILL 函数参考包含了用于窗口和表单管理等方面的 API。"


注:SKILL 是一种 Lisp 方言,是 Cadence Design Systems 旗下的电路设计软件 Virtuoso 中用于扩展和自定义功能的宏语言。SKILL API 是 SKILL 提供的应用程序编程接口,可以帮助开发人员使用 SKILL 语言来创建各种自定义工具、插件及其他功能


Document Conventions

The conventions used in this document are explained in the following sections. These include

the subsections used in the definition of each function and the font and style of the syntax

conventions.

这份文档中使用的约定在接下来的几节中会被解释。这些包括用于每个函数定义中的子部分以及语法习惯的字体和样式


Syntax Conventions

This section describes the typographic and syntax conventions used in this manual.

语法习惯

本节介绍了手册中使用的排版和语法约定。

Syntax  /ˈsɪntæks/ 语法;句法;句法学

Conventions  /kənˈvɛnʃənz/   惯例;约定


test                          Indicates text you must type exactly as it is presented.

                               指出你必须按照所示文本完全输入的文本。


z_argument             Indicates text that you must replace with an appropriate

                             argument. The prefix (in this case, z_) indicates the data type

                             the argument can accept. Do not type the data type or

                             underscore.

                             表示您必须使用适当的参数替换的文本。前缀(在这种情况下是z_)表示参数可以接受的数据类型。

                            不要输入数据类型或下划线。


[ ]                         Denotes optional arguments. When used with vertical bars, 

                            they
enclose a list of choices from which you can choose one. 

                            表示可选参数。当与竖线一起使用时,它们将围绕一个选择列表,您可以从中选择一个。


{ }                          Used with vertical bars and encloses a list of choices from which
you must choose one.

                           与竖线一起使用,将围绕一个选择列表,您必须从中选择一个。


|                           Separates a choice of options; separates the possible values
that can be returned 

                            by a Cadence® SKILL language function.

                            “分隔选项的选择;分隔 Cadence® SKILL 语言函数可能返回的可能值。”   


…                          Indicates that you can repeat the previous argument.

                            “表示您可以重复上一个参数。”


=>                     Precedes the values returned by a Cadence SKILL language
function.

                            在 Cadence SKILL 语言函数返回的值之前。


text                   Indicates names of manuals, menu commands, form buttons,
and form fields.

                         表示手册、菜单命令、表单按钮和表单字段的名称。


The language requires many characters not included in the preceding list. You must
type these characters exactly as they are shown in the syntax.

该语言需要许多在上述列表中未包含的字符。必须按照语法中所示的确切方式输入这些字符。


Data Types 

The Cadence SKILL language supports several data types to identify the type of value you
can assign to an argument. Data types are identified by a single letter followed by an
underscore; for example, t is the data type in t_viewNames. Data types and the
underscore are used as identifiers only: they are not to be typed.

数据类型

Cadence SKILL 语言支持多个数据类型,用于标识可以分配给参数的值的类型。数据类型由单个字母后跟下划线来标识;例如,t 是 t_viewNames 中的数据类型。数据类型和下划线仅用作标识符:它们不应该被输入。


The table below lists all data types supported by SKILL.

下表列出了 SKILL 支持的所有数据类型。


          


Prefix     Internal Name

Data Type

array array 
ddUserTypeBoolean C opfcontext OPF context 
ddbobject Cadence database object (CDBA)
 e envobj environment f flonum floating-point number 
opffile OPF file ID
g                general  any data type
G
gdmSpecIlUserTypegdm spec
hhdbobject hierarchical database configuration object
llist linked list
mnmpIlUserType nmpIl user type
M
cdsEvalObject 
n
number integer or floating-point number
ouserType user-defined type (other)
portI/O port
q
gdmspecListIlUserType gdm spec list
r
defstructdefstruct
RrodObj relative object design (ROD) object
ssymbolsymbol
SstringSymbol symbol or character string
t
string character string (text)
u
function

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

a lambda function body (list)

U
 funobj function object
vhdbpath 
w
 wtype window type
x
integer  integer number
ybinary binary function
&
pointer pointer type








 

Getting Started


Cadence® SKILL is a high-level, interactive programming language based on the popular
artificial intelligence language, Lisp. Because SKILL supports a more conventional C-like
syntax, novice users can learn to use it quickly, and expert programmers can access the full
power of the Lisp language. SKILL is as easy to use as a calculator as well as being a
powerful programming language whose applications are virtually unlimited.

Cadence® SKILL 是一种基于流行人工智能语言 Lisp 的高级交互式编程语言。因为 SKILL 支持更传统的类 C 语法,新手用户可以快速学习使用它,而专业程序员可以访问 Lisp 语言的全部功能。SKILL 不仅易于使用,就像一个计算器那样简单,同时也是一种功能强大的编程语言,其应用几乎是无限的。


SKILL brings you a functional interface to the underlying subsystems. SKILL lets you quickly
and easily customize existing CAD applications and helps you develop new applications.
SKILL has functions to access each Cadence tool using an application programming
interface.

SKILL 为你提供了与底层子系统的功能接口。使用 SKILL,你可以快速而容易地定制现有的 CAD 应用程序,同时帮助你开发新应用程序。SKILL 具有访问每个 Cadence 工具的函数,使用应用程序编程接口实现。


This document describes functions that are common to all of the Cadence tools used in either
a graphic or nongraphic environment. Once you master these basic functions, you need to
learn only a few new functions to access any tool in the Cadence environment.

本文档描述了在图形或非图形环境下使用的所有 Cadence 工具中通用的函数。一旦你掌握了这些基本功能,你只需要学习少数几个新函数就可以访问 Cadence 环境中的任何工具。


SKILL’s Relationship to Lisp


Programming Notation


Programming Notation(编程符号)指的是在计算机编程中使用的一些特殊符号和语法规则,用于表示程序代码中的各种操作、逻辑和关系等。常见的编程符号有加减乘除符号、等于符号、括号、花括号、尖括号、逗号、分号、冒号、引号等。编程符号的正确使用对于程序的运行和效果至关重要。


In SKILL, function calls can be written in either of the following notations:

在SKILL中,函数调用可以以以下任一符号表示:


Algebraic notation used by most programming languages: func( arg1 arg2 …)

大多数编程语言使用的代数符号表示法:func(arg1 arg2 ...)。

Prefix notation used by the Lisp programming language: (func arg1 arg2 …)

Lisp编程语言使用的前缀符号表示法:(func arg1 arg2 …)。


For comparison, here is a SKILL program written first in algebraic notation, then the same
program, also implemented in SKILL, using a Lisp style of programming.

为了比较,以下是一段使用代数符号表示法的SKILL程序,以及同样实现相同功能的使用Lisp编程风格的SKILL程序:

procedure( fibonacci(n)

     if( (n == 1 || n == 2) then 

             1 

       else fibonacci(n-1) + fibonacci(n-2) 

     ) 


Here is the same program implemented in SKILL using a Lisp style of programming. 

(defun fibonacci (n) 

      (cond 

   ((or (equal n 1) (equal n 2)) 1)

   (t (plus (fibonacci (difference n 1)) 

               (fibonacci (difference n 2)))) 

       )

   )


Data Manipulation

Because programs in SKILL are represented as lists, just as they are in Lisp, they can be
manipulated like data. You can dynamically create, modify, or selectively evaluate function
definitions and expressions. This ability to manipulate data is one of the primary reasons why
Lisp is the language of choice for artificial intelligence applications. Because it takes full
advantage of the “program is data” concept of Lisp, SKILL can be used to write flexible and
powerful applications.

因为在SKILL中,程序被表示为列表(与Lisp一样),所以它们可以像数据一样进行操作。您可以动态创建、修改或有选择性地评估函数定义和表达式。这种操作数据的能力是Lisp成为人工智能应用首选语言的主要原因之一。由于充分利用了Lisp“程序即数据”的概念,SKILL可以用于编写灵活而强大的应用程序。


Many SKILL list manipulation functions are available. These functions operate, in most cases,
similar to functions of the same name in Lisp, and the Franz Lisp dialect in particular.

许多SKILL列表操作函数都是可用的。这些函数在大多数情况下的操作类似于Lisp中同名的函数,特别是Franz Lisp方言。


SKILL supports a special notation for list construction from templates. This notation is

borrowed from Common Lisp and allows selective evaluation within a quoted form. 

Selective evaluation eliminates the long sequences of calls to list and append. See Backquote,

Comma, and Comma-At on page 65.

SKILL支持一种从模板构建列表的特殊表示法。这个记号借鉴了Common Lisp,并允许在引用形式内进行选择性求值。选择性求值可以消除调用list和append的长序列。请参见第65页的反引号、逗号和大括号逗号。


Characters

字符

Unlike many other programming languages, including Common Lisp, SKILL does not have a
separate character data type. Characters are instead represented by single character
symbols. The character “A,” for example, is the symbol “A.” Unprintable characters can be
referred to using the escape sequences.

与包括Common Lisp在内的许多其他编程语言不同,SKILL没有单独的字符数据类型。字符通过单个字符符号来表示。例如,字符"A"是符号"A"。不可打印的字符可以使用转义序列来引用



1

点赞

刚表态过的朋友 (1 人)

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 28

    粉丝
  • 7

    好友
  • 19

    获赞
  • 8

    评论
  • 128

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-4 10:08 , Processed in 0.017785 second(s), 15 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部