ADS PDK Automation Part.2 CallBack Function

/*
    Type: ADS AEL Code
    
    Functions for QA script generation

    Requirement
    1.function name is protected and should be keepe onece been created;

    Log:
    2018.11.15 Hxj New
    2018.11.15 Hxj Add:DeviceLayoutGeneration
    2018.11.30 Hxj Add:DeviceSchematicGernation_Based_On_DeviceLayoutGeneration
    2018.12.01 Hxj Add:AddPinSchematic,AddPinLayout
    2018.12.03 Hxj Modify:DeviceLayoutGeneration,DeviceSchemaaticGeneration
    2018.12.07 Hxj Modify:DeviceLayoutGeneration now can got item Bbox and ajust layout space

*/

defun DeviceLayoutGeneration(PcellPath,LayoutPath,ParameterNameList,ParameterValueList,LocationList)
// LocationList=((case1 x,y),(case2 x,y)....)
{    //generate 1 kind of device with n instance
    //2018.12.03 Hxj:Create Layout View if not exist
    decl Lib=nth(0,LayoutPath);
    decl Cell=nth(1,LayoutPath);
    decl Layout= nth(2,LayoutPath);
    decl DesignName=strcat(Lib,":",Cell,":",Layout);
    decl context = de_find_design_context_from_name(DesignName);
    if (context == NULL){
        context = db_oa_create_empty_design(Lib,Cell,Layout, 2);
    }
    de_show_context_in_new_window(context); //symbol or layout cannot be placed if the context is not showed
    //Place Device on Layout
    decl PcellLib=nth(0,PcellPath);
    decl PcellCell=nth(1,PcellPath);
    decl PcellLayout= nth(2,PcellPath);
    decl Component=strcat(PcellLib,":",PcellCell,":",PcellLayout);
    
    decl ItemInfo = de_init_item(Component);
    
    decl Num=listlen(ParameterValueList);
    decl ParaNum=listlen(ParameterNameList);    
    decl dX=0;
    decl dY=0;
    decl X=0;
    decl Y=0;
    decl SpaceX=nth(0,nth(0,LocationList))+30; // 10 prevent inter SpaceX=0 which will cause 2 layout connected 
    decl SpaceY=nth(1,nth(0,LocationList))+30;
    decl i=0;
    for(i=0;i<Num;i=i+1)
    {
        // 1. SET LOCATION
        //dX = nth(0,nth(i,LocationList));
 &n
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值