Skill Module学习笔记
模块
创建模块定义
axlDBCreateModuleDef(
t_name ;模块定义名称,如果t_name为test,那么模块名称为test.mdd
l_origin ;模块定义原点
l_objects ;模块成员,即模块容纳的对象
)
实例
axlSetFindFilter(?enabled '("noall" "components") ?onButtons '("noall" "components"))
axlSingleSelectName("COMPONENT" "U1")
comp1 = car(axlGetSelSet())
axlSingleSelectName("COMPONENT" "U2")
comp2 = car(axlGetSelSet())
axlDBCreateModuleDef("comps" '(0 0) '(comp1 comp2))
创建多模块实例
axlDBCreateManyModuleInstances(
t_name ;模块实例名称前缀
t_moddefName ;模块定义名称
x_tileStartNum ;起始编号, 每个模块编号加一
l_origin ;第一个模块的位置
l_offset ;模块原点间的偏移列表
x_num_tiles ;模块总数
f_rotation ;模块实例旋转角度
x_logicMethod ;模块逻辑方法
[l_netExcept] ;网络异常列表
)
实例
Add five module instances based on the module definition file mod.mdd,
starting at point (10,10) and offsetting by (5,0) every time:
modinsts = axlDBCreateManyModuleInstances(
"Num"
"mod"
2
10:10
'(5 0)
5
0
2
'("GND" "+5")
)
Creates five module instances named Num2, Num3, Num4, Num5, Num6.
创建Module
axlDBCreateModuleInstance(
t_name ;模块实例名
t_moddef_name ;模块定义名称
l_origin ;模块定义原点坐标
r_rotation ;模块定义旋转角度
i_logic_method ;模块逻辑来源
l_net_except ;可选的网络名称列表
) ⇒
o_result/nil
实例
modinst = axlDBCreateModuleInstance("inst" "mod" '(500 1500) 2 '("GND" "+5"))
获取模块实例定义
axlGetModuleInstanceDefinition(
o_modinst
)
实例
axlSetFindFilter(?enabled '("noall" "groups") ?onButtons '("noall" "groups" ))
axlSingleSelectName("GROUP" "inst")
modinst = car(axlGetSelSet())
axlGetModuleInstanceDefinition(modinst)
= "mod"
Gets the definition of a module instance named inst
获取模块实例位置
axlGetModuleInstanceLocation(
o_modinst
) ⇒
l_loc/nil
实例
axlSetFindFilter(?enabled '("noall" "groups") ?onButtons '("noall" "groups" ))
axlSingleSelectName("GROUP" "inst")
modinst = car(axlGetSelSet())
axlGetModuleInstanceLocation(modinst)
= ((500 1500) 0)
Gets the location of a module instance named inst
获取模块实例逻辑方法
axlGetModuleInstanceMethod(
o_modinst
) ⇒
i_logic/nil
实例
axlSetFindFilter(?enabled '("noall" "groups") ?onButtons '("noall" "groups" ))
axlSingleSelectName("GROUP" "inst")
modinst = car(axlGetSelSet())
axlGetModuleInstanceLogicMethod(modinst)
= 2
Gets the logic method of a module instance named inst.
获取模块实例网络异常列表
axlGetModuleInstanceNetExceptions(
o_modinst
) ⇒
l_nets/nil
实例
axlSetFindFilter(?enabled '("noall" "groups") ?onButtons '("noall" "groups" ))
axlSingleSelectName("GROUP" "inst")
modinst = car(axlGetSelSet())
axlGetModuleInstanceNetExceptions(modinst)
= ("GND" "+5")
Gets the list of net exceptions of a module instance named inst.
Group
创建Group
; 创建一个新的group数据库对象,包含lo_groupMembers列表的成员
axlDBCreateGroup(
t_name ;group名称
t_type ;group类型
lo_groupMembers ;group成员
)
⇒ o_dbid/nil
实例
axlSetFindFilter(?enabled '("noall" "groups") ?onButtons '("noall" "groups" ))
axlSingleSelectName("GROUP" "inst")
group = axlDBCreateGroup(
"B10N1", ;group名称
"generic" ;group类型
members ;group成员
)
添加对象
; 添加指定的数据库对象到Group
axlDBAddGroupObjects(
o_group ;group对象id
lo_members ;group新成员
)
⇒ t/nil
移除对象
; 从指定的Group移除数据库对象,尽管被移除但是并没有被删除
axlDBRemoveGroupObjects(
o_group ;group id
lo_members ;group成员
)
⇒ t/nil
拆散Group
; 拆散数据库group,删除group id,但是并不会删除group成员
axlDBDisbandGroup(
o_group
)
⇒ t/nil
创建MatchGroup
axlMatchGroupCreate(
t_name
)==> o_mgdbid
添加对象
; Adds members to a matched group. Eligible members are:
; nets (if a net is part of an xnet the xnet is added to the group)
; xnets
; pinpairs
axlMatchGroupAdd(
o_mgdbid/t_mgName
o_dbid/lo_dbid
)==> t/nil
移除对象
axlMatchGroupRemove(
o_mgdbid/t_mgName
o_dbid/lo_dbid
)==> t/nil
实例
; To match group in example axlMatchGroupAdd remove one of the nets:
axlMatchGroupRemove(mg car(nets))
添加或移除属性
;添加/移除RELATIVE_PROPAGATION_DELAY属性
;
axlMatchGroupProp(
o_mgdbid/t_mgName ;match group id/match group名称
o_dbid ;合法数据库id
t_value/nil ;nil,表示移除属性; 非nil表示设置属性
)==> t/nil
删除MatchGroup
; 删除match group
axlMatchGroupDelete(
o_mgdbid/t_mgName
) -> t/nil
实例
Delete match group created in axlMatchGroupCreate:
mg = car(axlSelectByName("MATCH_GROUP" "MG1"))
axlMatchGroupDelete(mg)
or
axlMatchGroupDelete("MG1")
实例
; Add two nets to match group created in axlMatchGroupCreate:
mg = car(axlSelectByName("MATCH_GROUP" "MG1"))
nets = axlSelectByName("NET" '("B1_OUT" "B2_OUT"))
n1 = car(nets)
n2 = cadr(nets)
axlMatchGroupAdd(mg nets)
; Add properties:
axlMatchGroupProp(mg n1 "MG1:G:::100 ns:5 %")
axlMatchGroupProp(mg n2 "MG1:G:AD:AR:0 ns:5 %")
; Remove property from n2:
axlMatchGroupProp(mg n2 nil