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

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

日志

skill language user guide 34--36

热度 11已有 1088 次阅读| 2023-5-25 16:01 |系统分类:芯片设计

Solving Some Common Problems

Here are three of the most common SKILL problems.


System Doesn’t Respond


If you type in a SKILL function and press Return but nothing happens, you most likely have one of these problems.

如果你输入了一个SKILL函数并按了回车键,但是没有任何反应,那么你很可能遇到了以下问题。


1)Unbalanced parentheses   括号不平衡

2)Unbalanced string quotes  

3)The wrong log file filter set


You might have entered more left parentheses than right parentheses. The following steps trigger a system response in most cases.

您可能输入了比右括号多的左括号。以下步骤在大多数情况下会触发系统响应。


1)Type a closing right bracket ( ] ) character. This character closes all outstanding right parentheses.

输入一个右闭括号(])字符。此字符可以关闭所有未匹配的右括号。

2)If you still don’t get a response, type a double quote (") character followed by a right bracket ( ] ) character.

如果您仍然没有得到响应,请先输入一个双引号(")字符,然后再输入一个右闭括号(])字符。


In most cases, the system then responds.


solve  /sɒlv/ vt 解决;处理;解答;破解 

respond  /rɪˈspɒnd/   回应;响应;作出反应;

spond  承诺,约定

trigger  /ˈtrɪɡə(r)/   vt 触发;引起;发动;开动;起动

bracket   /ˈbrækɪt/  n 支架;括号  

                              vt 用括弧括上;把…等同考虑;


Inappropriate Space Characters


Do not put any space between the function name and the left parenthesis. Notice that the following error messages do not identify the extra space as the cause of the problem.

在函数名和左括号之间不要加入任何空格。请注意,以下错误消息不会将额外的空格标识为问题的原因。


1)Trying to use the strcat function to concatenate several strings.

strcat   ( "Mary" " had" " a" " little" " lamb")

Message: *Error* eval: not a function - "Mary"

2)Trying to make an assignment to a variable.

greeting = strcat   ( "happy" " birthday" )

Message: *Error* eval: unbound variable - strcat


Inappropriate  /ˌɪnəˈprəʊpriət/  adj 不恰当的;不适当的;不合适的

extra  /ˈekstrə/   adj 额外的;分外的;外加的;附加的

concatenate  /kɒnˈkætɪneɪt/   v 连接;使连续(衔接)起来;连锁;串级

unbound  /ʌnˈbaʊnd/  v 解开;松开 unbind unbind

                                   adj  解除绑缚的;未装订(成书)的;【化】非结合的


Data Type Mismatches


An error occurs when you pass inappropriate data to a SKILL function. The error message includes a type template that indicates the expected type of the offending argument.

当您向SKILL函数传递不合适的数据时,会发生错误。错误消息包括一个类型模板,指示有问题参数的预期类型。

strcat( "Mary had a" 5 )

Message: *Error* strcat: argument #2 should be either a string or a symbol (type template = "S") - 5

错误消息:Error strcat: 第二个参数应该是字符串或者符号(类型模板为"S") - 5。


Here are the characters used in type templates for some common data types.

Some Common Data Types

Data Type                        Character in Type Template


integer number                        x 

floating point number               f 

symbol or character string      S 

character string (text)              t 

any data type (general)           g


For a complete list of data types supported by SKILL, see Data Types on page 67.

要查看 SKILL 支持的完整数据类型列表,请参阅第67页的数据类型


occur  /əˈkɜː(r)/  vi 发生;出现;存在于;出现在

template  /ˈtempleɪt/  n 样板;模板;型板;模框;标准

indicate  /ˈɪndɪkeɪt/  v 表明;显示;象征;暗示;间接提及;示意;指示;

support   /səˈpɔːt/  vt 支持;拥护;鼓励;帮助;援助;


SKILL Lists

A SKILL list is an ordered collection of SKILL data objects. The list data structure is central to SKILL and is used in many ways.

SKILL 列表是 SKILL 数据对象的有序集合。列表数据结构在 SKILL 中非常重要,被多种方式使用。

The elements of a list can be of any data type, including variables and other lists. A list can contain any number of objects (or be empty). The empty list can be represented either by empty parentheses “( )” or the special atom nil. The list must be enclosed in parentheses. Lists can contain other lists to form arbitrarily complex data structures. Here are some examples:

列表的元素可以是任何数据类型,包括变量和其他列表。列表可以包含任意数量的对象(或为空)。空列表可以用空括号“()”或特殊原子nil表示。列表必须用括号括起来。列表可以包含其他列表,形成任意复杂的数据结构。这里是一些例子:

Sample Lists

List                               Explanation

(1 2 3)                          A list containing the integer constants 1, 2, and 3 

(1)                                A list containing the single element 1 

( )                                 An empty list (same as the special atom nil)

(1 (2 3) 4)                    A list containing another list as its second element


SKILL displays a list with parentheses surrounding the members of the list. The following example stores a list in the variable shapeTypeList, then retrieves the variable’s value.

SKILL 显示一个包含列表成员的括号列表。下面的示例将一个列表存储在变量shapeTypeList中,然后检索该变量的值。

shapeTypeList = '( "rect" "polygon" "rect" "line" ) 

shapeTypeList => ( "rect" "polygon" "rect" "line" )


SKILL provides an extensive set of functions for creating and manipulating lists. Many SKILL functions return lists. SKILL can use multiple lines to display lists. SKILL stores the appropriate integer value in the _itemsperline global variable

SKILL 提供了一系列广泛的函数用于创建和操作列表。许多 SKILL 函数返回列表。SKILL 可以使用多行来显示列表。SKILL 将适当的整数值存储在全局变量 _itemsperline 中。

如何创建列表:

1)使用「‘」创建列表虽然方便,但是不能够传递变量,例如在有一系列变量的情况下,用户需要创建由变量值构成的列表时,使用下面的方法并不能达到目的。

a=1 b=2 c=3

lista='(1 2 3)  ==>(1 2 3)

listb=‘(a b c)  ==>(a b c)   ; 操作符无法对变量进行求值

2)使用list()函数创建列表:list()函数实现列表不仅方便实用,而且可以实现一部分「‘」运算符无法实现的功能

a=1 b=2 c=3

lista='(1 2 3)  ==>(1 2 3)

listb=‘(a b c)  ==>(a b c)   ; 操作符无法对变量进行求值

listc=list(a b c) ==>(1 2 3)  ; list可以对变量“a b c"求值

3)使用cons()函数创建列表:cons()函数可以将一个元素添加到已有列表的开始位置,注意cons()函数使用时必须传递两个参数,其中第一个参数是需要添加到已有列表的元素,第二个参数是目标列表(必须是列表)。

cons(a b) ==> "Error ,cons : argument #2 should be list

cons(a listb) ==> (1 a b c)  ;一个元素添加到已有列表的开始位置

cons(a listc) ==> (1 1 2 3)

cons("test" listc) ==>("test" 1 2 3)  ;"test" a symble





1

点赞

刚表态过的朋友 (1 人)

评论 (0 个评论)

facelist

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

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

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 28

    粉丝
  • 7

    好友
  • 19

    获赞
  • 8

    评论
  • 131

    访问数

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

GMT+8, 2024-6-20 15:12 , Processed in 0.096034 second(s), 14 queries , Gzip On, Redis On.

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