/*
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
ADS PDK Automation Part.2 CallBack Function
最新推荐文章于 2025-05-15 09:32:03 发布