Allegro는 Skill을 이용하여 BGA 패키지의 자동 부채질 기능을 구현합니다.

9653 단어 02_소프트웨어
이 코드는 오리지널이 아니라 Cadence Skill 포럼의 코드 수정에 따른 것으로, 주요 기능은 다음과 같습니다.
BGA 캡슐이 필요한 비트 번호와 오버홀을 직접 지정하여 비트 번호의 자동 슬라이싱 기능(자동 펀치 +오버홀딩 및 용접판 자동 연결)을 구현합니다. 코드는 다음과 같습니다.
procedure(bga_fanout(RefDes)
	logFile = "./bga_fanout_debug.log"                  ;LogFile Used for Debug
	
	bga_fanout_version()								;Display the version
	notdone = t
	/*
	bga_fanout_popup = axlUIPopupDefine(nil (list		;Define the menu
					(list "Done" 'bga_fanout_done )
					(list "Cancel" 'bga_fanout_cancel))
					)
					*/
	;axlUIPopupSet(bga_fanout_popup) ;by lyn
	while(notdone
	bg_log = outfile(logFile)
	fprintf(bg_log "======== Bga Fanout Debug Message ========
") axlClearSelSet() axlSetFindFilter(?enabled list("noall" "symbols") ?onButtons (list "noall" "symbols")) ;axlSingleSelectPoint(); ;axlSelectByName("COMPONENT" "U187"); axlSelectByName("COMPONENT" RefDes); SelBga = car(axlGetSelSet()) lowerLeftPin = nil lowerRightPin = nil upperLeftPin = nil upperRightPin = nil centerPoint = nil beginPoint = nil endPoint = nil isBga = t BgaSize = 0 when(length(SelBga->pins) < 6 isBga = nil fprintf(bg_log "The Device isn't Bga!
") );end when when(SelBga && isBga fprintf(bg_log "%s
" SelBga) fprintf(bg_log "Symbol name: %s

" SelBga->name) ;fprintf(bg_log "lowerLeftPin: (%P)
" lowerLeftPin) ;fprintf(bg_log "upperRightPin: (%s)
" upperRightPin) pin_definition = car(SelBga->pins)->definition->name count_pin_name = 0 pin_name_index = 0 for(i 1 4 temp_pin = nth(i SelBga->pins) when(temp_pin->isThrough == t isBga = nil );end when if(pin_definition == temp_pin->definition->name then count_pin_name = count_pin_name + 1 else pin_name_index = i );end if );end for fprintf(bg_log "count_pin_name %d
" count_pin_name) fprintf(bg_log "pin_name_index %d
" pin_name_index) fprintf(bg_log "pin_definition: %s

" pin_definition) when(count_pin_name < 3 pin_definition = nth(pin_name_index SelBga->pins)->definition->name );end if fprintf(bg_log "pin_definition: %s
" pin_definition) if(SelBga->isMirrored then pinLayer = "Etch/BOTTOM" else pinLayer = "Etch/TOP" );end if ;Compute the Symbol wether is Bga and the centerPoint foreach(bga_pin SelBga->pins when(bga_pin->definition->name == pin_definition ;initialize then Coordinate when(lowerLeftPin == nil lowerLeftPin = bga_pin->xy upperRightPin = bga_pin->xy lowerRightPin = bga_pin->xy upperLeftPin = bga_pin->xy );end when ;fprintf(bg_log "Pin name: %s
" bga_pin->name) ;fprintf(bg_log "Pin's Net: %s
" bga_pin->net->name) ;fprintf(bg_log "Pin's Number: %s
" bga_pin->number) ;fprintf(bg_log "Pin's Coordinate: (%P)
" bga_pin->xy) when(bga_pin->number == "C1" beginPoint = bga_pin->xy );end when when(bga_pin->number == "C2" endPoint = bga_pin->xy );end when when(xCoord(bga_pin->xy) <= xCoord(lowerLeftPin) && yCoord(bga_pin->xy) <= yCoord(lowerLeftPin) lowerLeftPin = bga_pin->xy ) when(xCoord(bga_pin->xy) >= xCoord(upperRightPin) && yCoord(bga_pin->xy) >= yCoord(upperRightPin) upperRightPin = bga_pin->xy ) when(xCoord(bga_pin->xy) >= xCoord(lowerRightPin) && yCoord(bga_pin->xy) <= yCoord(lowerRightPin) lowerRightPin = bga_pin->xy ) when(xCoord(bga_pin->xy) <= xCoord(upperLeftPin) && yCoord(bga_pin->xy) >= yCoord(upperLeftPin) upperLeftPin = bga_pin->xy ) ;fprintf(bg_log "Pin's definition: %s
" bga_pin->definition->name) ;fprintf(bg_log "Pin's ID: %s
" bga_pin) pinPadName = axlDBGetPad(bga_pin pinLayer "REGULAR") ;fprintf(bg_log "Pin's pad figure: %s
" pinPadName->figureName) when(bga_pin->isThrough == t || pinPadName->figureName != "CIRCLE" isBga = nil axlUIWPrint(nil "- The Device isn't Bga!Please select again! -
") );end when fprintf(bg_log "
") );end when );end foreach if(isBga then fprintf(bg_log "The Device is Bga!
") when(xCoord(lowerLeftPin) > xCoord(upperLeftPin) lowerLeftPin = xCoord(upperLeftPin):yCoord(lowerLeftPin) );end when when(yCoord(lowerLeftPin) > yCoord(lowerRightPin) lowerLeftPin = xCoord(lowerLeftPin):yCoord(lowerRightPin) );end when when(xCoord(upperRightPin) < xCoord(lowerRightPin) upperRightPin = xCoord(lowerRightPin):yCoord(upperRightPin) );end when when(yCoord(upperRightPin) < yCoord(upperLeftPin) upperRightPin = xCoord(upperRightPin):yCoord(upperLeftPin) );end when fprintf(bg_log "lowerLeftPin: (%P)
" lowerLeftPin) fprintf(bg_log "upperRightPin: (%P)
" upperRightPin) fprintf(bg_log "lowerRightPin: (%P)
" lowerRightPin) fprintf(bg_log "upperLeftPin: (%P)

" upperLeftPin) centerPoint = xCoord(upperRightPin)-(xCoord(upperRightPin)-xCoord(lowerLeftPin))/2:yCoord(upperRightPin)-(yCoord(upperRightPin)-yCoord(lowerLeftPin))/2 fprintf(bg_log "centerPoint: (%P)

" centerPoint) ;Get Bga Size(Absolute value) BgaSize = abs(xCoord(beginPoint) - xCoord(endPoint))/2 fprintf(bg_log "xCoord: %f %f
" xCoord(nth(6 SelBga->pins)->xy) xCoord(nth(7 SelBga->pins)->xy)) when(BgaSize == 0 BgaSize = abs(yCoord(beginPoint) - yCoord(endPoint))/2 fprintf(bg_log "yCoord: %f %f
" yCoord(nth(6 SelBga->pins)->xy) yCoord(nth(7 SelBga->pins)->xy)) fprintf(bg_log "selected Pin: (%P) (%P)

" nth(6 SelBga->pins)->xy nth(7 SelBga->pins)->xy) );end when fprintf(bg_log "BgaSize is : %f
" BgaSize) ;Create Clines And Vias ;fanoutVia = car(axlUIDataBrowse('PADSTACK '(RETRIEVE_NAME) "Please Select A Via..." t)) ;Select the Via to Fanout fanoutVia="Via8d16"; , if(fanoutVia then /* bga_pin = car(SelBga->pins) when(bga_pin->definition->name == pin_definition && bga_pin->net->name != "" lineWidth = 6;axlCNSDesignValueGet(bga_pin->net "MIN_LINE_WIDTH") pinNet = bga_pin->net->name fanout_dir(centerPoint bga_pin->xy) linePath = list(bga_pin->xy xCoord(bga_pin->xy)+x*BgaSize:yCoord(bga_pin->xy)+y*BgaSize) axlDBCreateLine(linePath lineWidth pinLayer pinNet) axlDBCreateVia(fanoutVia cadr(linePath) pinNet) axlUIWPrint(nil "Fanout NET \"%s\" At %P" pinNet bga_pin->xy) );end when */ foreach(bga_pin SelBga->pins when(bga_pin->definition->name == pin_definition && bga_pin->net->name != "" lineWidth = 6;axlCNSDesignValueGet(bga_pin->net "MIN_LINE_WIDTH") pinNet = bga_pin->net->name fanout_dir(centerPoint bga_pin->xy) linePath = list(bga_pin->xy xCoord(bga_pin->xy)+x*BgaSize:yCoord(bga_pin->xy)+y*BgaSize) axlDBCreateLine(linePath lineWidth pinLayer pinNet) axlDBCreateVia(fanoutVia cadr(linePath) pinNet) axlUIWPrint(nil "Fanout NET \"%s\" At %P" pinNet bga_pin->xy) );end when );end foreach axlUIWPrint(nil "- BGA Fanout Success! -") notdone = nil axlCancelEnterFun() else axlUIWPrint(nil "- BGA Fanout Failed! -") notdone = nil axlCancelEnterFun() );end if else fprintf(bg_log "The Device isn't Bga!
") ) );end when axlDehighlightObject(SelBga) close(bg_log) ;axlUIViewFileCreate(logFile "Bga Fanout Debug Message" nil) );end while );end procedure procedure(fanout_dir(centerPoint CurrentPoint) if(xCoord(centerPoint) >= xCoord(CurrentPoint) then x = -1 else x = 1 );end if if(yCoord(centerPoint) >= yCoord(CurrentPoint) then y = -1 else y = 1 );end if );end procedure procedure(bga_fanout_done() axlUIWPrint(nil "- Done -") notdone = nil axlCancelEnterFun() ) ;Cancel Command procedure(bga_fanout_cancel() axlUIWPrint(nil "- Cancel -") notdone = nil axlCancelEnterFun() ) procedure(bga_fanout_version() axlUIWPrint(nil "------ Bga Fanout V1.0 ---- Written By VivienLuo ------") axlUIWPrint(nil "------ E-mail : [email protected] ------ Mar 16, 2013 ------") );End Procedure

주의 3:
1. fanoutVia="Via8d16";직접 구멍을 지정해야 용접 디스크 라이브러리에서 찾을 수 있습니다
2. lineWidth = 6, 이 단계는 용접판에서 구멍이 난 Cline까지의 선가중치를 사용자가 지정할 수 있도록 지정합니다
3. 코드는 마지막으로 원작자의 정보입니다.
코드는 다음과 같이 사용됩니다.
1. Notepad 새 *.il 파일, 그리고 상기 코드를 이 파일에 복사하여 저장하면 됩니다.
2. Allegro 명령줄에서 수행: skill load("*.il의 전체 경로")
3. Allegro 명령줄에:skill을 입력하면 skill 창으로 전환하고 bgafanout("U187"), U187은 사용자가 스스로 선택해야 하며, 리턴이 실행이 끝날 때까지 기다리면 자동으로 부채질을 완성할 수 있다.
하나의 보드에서 자동으로 부쳐야 하는 IC가 많지 않기 때문에, 스스로 위치 번호를 지정하는 것이 사용자에게 더욱 편리할 수 있습니다.

좋은 웹페이지 즐겨찾기