⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 height_check.il

📁 skill语言在Cadence平台二次开发中大量使用
💻 IL
📖 第 1 页 / 共 2 页
字号:
		(1
			if( (mir==nil) then
				
				(case checkLimitValue
						
					(1
						if( (Maxheightofsymbol>axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
							
					(2
						if( (Maxheightofsymbol<axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
							
					(3
						if( (Maxheightofsymbol==axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
					
					(4
						if( (Maxheightofsymbol>currentmaxheight) then
							currentmaxheight=Maxheightofsymbol
							currenthighestcomp=sym_db
							currenthighestcompname=sym_refdes
						);end if
					);
					
				);end case checkLimitValue
			);end if
			
			if( (highlight==1) && (mir==nil) then					;if 'topside' was selected
				axlAddSelectObject(sym_db)						;highlight symbol
				message=sprintf(nil "%n Symbols Highlighted" count)
				axlUIWPrint(height_chker_form1 message)
				highlight=0
			else
				message=sprintf(nil "%n Symbols Highlighted" count)
				axlUIWPrint(height_chker_form1 message)
			);end if
		);end side 1
		
		(2
			if( (mir==t) then
				
				(case checkLimitValue
								
					(1
						if( (Maxheightofsymbol>axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
									
					(2
						if( (Maxheightofsymbol<axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
									
					(3
						if( (Maxheightofsymbol==axlFormGetField(height_chker_form1 "TestNumber")) then
							count=count+1
							highlight=1
						);end if
					);
					
					(4
						if( (Maxheightofsymbol>currentmaxheight) then
							currentmaxheight=Maxheightofsymbol
							currenthighestcomp=sym_db
							currenthighestcompname=sym_refdes
						);
					);
									
				);end case checkLimitValue
				
			);end if
					
			if( (highlight==1) && (mir==t) then					;if Botside was selected
				axlAddSelectObject(sym_db)						;highlight symbol
				message=sprintf(nil "%n Symbols Highlighted" count)
				axlUIWPrint(height_chker_form1 message)
				highlight=0
			else
				message=sprintf(nil "%n Symbols Highlighted" count)
				axlUIWPrint(height_chker_form1 message)
			);end if
		);end side 2
		
		
		(3
			(case checkLimitValue
								
				(1
					if( (Maxheightofsymbol>axlFormGetField(height_chker_form1 "TestNumber")) then
						count=count+1
						highlight=1
					);end if
				);end 1
										
				(2
					if( (Maxheightofsymbol<axlFormGetField(height_chker_form1 "TestNumber")) then
						count=count+1
						highlight=1
					);end if
				);end 2
										
				(3
					if( (Maxheightofsymbol==axlFormGetField(height_chker_form1 "TestNumber")) then
						count=count+1
						highlight=1
					);end if
				);end 3
				
				(4
					if( (Maxheightofsymbol>currentmaxheight) then
						currentmaxheight=Maxheightofsymbol
						currenthighestcomp=sym_db
						currenthighestcompname=sym_refdes
					);end if
				);end 4
										
			);end case checkLimitValue
						
			if( (highlight==1) then								;if bothsides was selected
				axlAddSelectObject(sym_db)						;highlight symbol
				
				if( (makelisting==1) then
					if( (mir==t) then
						side="Bottom"
					else
						side="Top   "
					);end if
					fprintf(List, "%s \t %n \t %s \t %s \n" sym_refdes Maxheightofsymbol side sym_db->name)
				);end if
		
				highlight=0
			
			);end if
			
			message=sprintf(nil "%n Symbols Highlighted" count)
			axlUIWPrint(height_chker_form1 message)
			
		);end side 3
		
			
		);end case checkSideValue
	);end foreach
	
	if( (checkLimitValue==4) then
		axlAddSelectObject(currenthighestcomp)						;highlight symbol
		message=sprintf(nil "Highest Comp: %s  at %n mils" currenthighestcompname currentmaxheight)
		axlUIWPrint(height_chker_form1 message)
	);end if
	;makelisting=0
);end defun Calc

;***************************************************************************************************

(defun getHeights ()

	axlSetFindFilter( ?enabled list("symbols") ?onButtons "symbols")
	axlOpenFindFilter()
	symbol_db_list = axlGetSelSet(axlAddSelectAll())		;Make a list of all symbols
	axlClearSelSet()
	
	foreach(symbol_db symbol_db_list
		refdes = symbol_db->refdes
		if( (refdes!=nil) then
			mir = symbol_db->isMirrored
			shapefound=0
			propfound=0
			twoshapes=0
			shape_bot_found=0
		
			children_db_list = symbol_db->children
	
			if( neq(children_db_list nil) then			; checks if symbol has attached shapes
				foreach(children_db children_db_list
					isShape = children_db->objType
					shape_layer = children_db->layer
						
					if( equal(isShape "shape") then
							
					; checks if shape is on package geometry/place_bound_top
					 
							
						if( equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_TOP") then
							shapefound=1
							if( (shape_bot_found==1) then
								twoshapes=1
							);end if
							proplist=axlDBGetProperties(children_db)
							foreach(prop proplist
								propS=symbolToString(car(prop))
									
								if( (propS=="PACKAGE_HEIGHT_MAX") then
									prop=cons(mir cdr(prop))
									symlist[refdes]=cons(symbol_db prop)
									;printf("%L \n" symlist)
									propfound=1
								);end if		
								 
							);end foreach
								
						) ; end if package geometry
							
						if( equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_BOTTOM") then
							if((shapefound==1) then
								twoshapes=1
							);end if
							shapefound=1
							shape_bot_found=1
							proplist=axlDBGetProperties(children_db)
							foreach(prop proplist
								propS=symbolToString(car(prop))
									
									if( (propS=="PACKAGE_HEIGHT_MAX") then
										prop=cons(mir cdr(prop))
										symlist[refdes]=cons(symbol_db prop)
										;printf("%L \n" symlist)
										propfound=1
									);end if		
														 
								);end foreach
														
							) ; end of package geometry
							
						) ; end of is shape	
						
					) ; end of foreach
				
				) ; end of if children
			
			
				if( (shapefound==0) then
					fprintf(p, "%L has no Place bound shape! \n" refdes)
					Entries=1
				);end if
				if( (propfound==0) then
					fprintf(p, "%L has no Place bound height property! \n" refdes)
					Entries=1
				);end if
				if( (twoshapes==1) then
					fprintf(p, "%L has two Place_bound shapes! May highlight improperly!! \n" refdes)
					Entries=1
				);end if
			
		);end if refdes=nil
		
	) ; end of foreach symbol_db
	
	symlist2=sortcar(tableToList(symlist) 'alphalessp)
	
);end defun getHeights

;********************************************************************************************

(defun Pickit ()
	
	axlSetFindFilter( ?enabled list("symbols") ?onButtons "symbols")
	axlOpenFindFilter()
	comp = car(axlGetSelSet(axlSingleSelectPoint()))	
	axlClearSelSet()
	PBshapefound=0
	PBpropfound=0
	refdes=comp->refdes
	
	if( refdes!=nil then					;excludes symbols that are not components
	
		if( (comp!=nil) then
			childrenlist=comp->children
			compheight=0
	
			if( neq(childrenlist nil) then
				foreach(children_db childrenlist
					isShape = children_db->objType
					shape_layer = children_db->layer
				
					if( equal(isShape "shape") then
										
						if( equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_TOP") || equal(shape_layer "PACKAGE GEOMETRY/PLACE_BOUND_BOTTOM") then
					
							proplist=axlDBGetProperties(children_db)
							PBshapefound=1
							foreach(prop proplist
								propS=symbolToString(car(prop))
															
								if( (propS=="PACKAGE_HEIGHT_MAX") then
									;printf("%s \n" car(cdr(prop)))
									PBpropfound=1
									compheight=car(cdr(prop))
								);end if
							);end foreach
						
						);end if
					);end if
				);end foreach
			);end if
			
			if( (PBshapefound!=0) && (PBpropfound!=0) then
				axlAddSelectObject(comp)
				message=sprintf(nil "%s  is  %s  high" refdes compheight)
				axlUIWPrint(height_chker_form1 message)
			else
				if( PBpropfound==0 then missing="PB Property")
				if( PBshapefound==0 then missing="PB Shape")
				axlAddSelectObject(comp)
				message=sprintf(nil "%s  is  missing a  %s" refdes missing)
				axlUIWPrint(height_chker_form1 message)
			
			);end if
		else
			message=sprintf(nil "Component Not Found")
			axlUIWPrint(height_chker_form1 message)
		);end if
	);end if
);end defun

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -