Is there a function that I can use to center only the clines inside the BGA area?
If so how do go I about it?
For instance, what skill code can I use to shove/move single clines or dual clines in between (or in the middle of) the BGA vias?
- where if there are two clines in between vias, the air gap is 1x or 2x of the trace width.
Below is a simple illustration:
Single cline centered in between BGA vias:
o I o I o I o
Dual CLine centered in between BGA vias::
o IxI o IxI o
o = via
I = Cline
x = air gap between two clines.
In some areas of the BGA, the vias are in-line while in some areas (at the periphery) the via pitch is mixed, that is a combination of 10mm and 8mm - stagered pitch.
Route--->Custom smooth (Enable only Cline segs on find window) option may working for you,if u set the Spacing constraints values properly.
In reply to PRASH36:
Thanks Prashanth for the feedback.Yes, I can use this option IF the BGA pitch is the same on all vias. However in my design I have different bga pitch so using different setting will be very difficult. I was looking for a code where the pitch (distance) between vias is used to place clines mid-center.
In reply to eddieb1:
Experts, any idea?
Just thinking out loud... manipulating your grids and using axlShoveItems and could be a way to go.
i.e. Set your grid origin to the first via and the grid spacings to what you need between that and the next via. Then use axlShoveItems (gridded) to move the clines.
Might work but I'm sure that there are plenty of alternative methods.
In reply to eDave:
Thanks Dave for the repl.
Reading through the material, I thought of that too along wih axlPathOffset. But I wasn't sure it would work. In any case do you have a sample code that I play with?
I sure would like to see if I can move one cline in between two vias using the code you've suggested using.
Can't wait to see it.
BTW - I tried the one that's in the Glossing Controler > Center lines between pads. It didn't work and made things worst as it moved the clines loop around pads and made them longer. It also introduced new errors by crossing clines.
Well, this code sort of works. However it's not of much use to you without a lot of work. I'm only handling a single cline. You will need to use complex grid settings for multiple clines.
defun( DE_BGAClineCentre (via1, via2, clineSeg)
via1xy = via1 ->xy
via2xy = via2 ->xy
; Set grids:
layer = clineSeg ->layer
grid = axlDBGridGet(layer)
originalGrid = copy(grid)
grid ->xOrigin = car(via1xy)
grid ->yOrigin = cadr(via1xy)
if(axlGeoEqual(car(via1xy), car(via1xy)); I'm assuming that the vias are on orthogonal locations. Otherwise this method will not work.
then grid ->yGrids = axlDistance(via1xy, via2xy) / 2.0; The shoved cline needs to be centered on the y grid
else grid ->xGrids = axlDistance(via1xy, via2xy) / 2.0; The shoved cline needs to be centered on the x grid
; Shove the cline segment
shoveMode = 0
cornerType = 45
gridded = 1
params = list(shoveMode cornerType gridded)
;Restore the original grid.
It's a start. I'll give a whirl and let you know if it's something I can use.
BTW, is there a function when vias in diagonal formation, as in staggered formation?
I can't seem to get the code to work. Not sure why.
In any case, I found a code that might work but it also needs modification.
It's a code for replacing pins. As shown below I replaced all the functions and sprintf texts to get it to work. Unfortunately I'm stuck as how to make the axlShoveItems function work in conjucntion with the grid. Maybe you can take a look at it if there's somthing that can be done to make it work.
So far here's what the code can do:
1. Allows you to select cline segments.
2. Lets you know how many segments was selected
3. Opens up a dialog window to select the dabase shape_symbols (I was thinking of creating a grid setting as a shape symbol.
4. Reports how segments we're moved.
;;#####################################################################################################axlCmdRegister( "cntrLn" `Cntr_lns ?cmdType "general") (defun Cntr_lns () (let (mypopup cnt msg CLINES2center cntr_with grid_name mark) (setq mypopup (axlUIPopupDefine nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun)) ) );setq axlUIWPrint(nil "Pick or window the clines needed to be centered then RMB > Done or Cancel.") (axlUIPopupSet mypopup) (axlClearSelSet) (axlSetFindFilter ?enabled `("NOALL" "CLINESEGS") ?onButtons `("CLINESEGS")) (axlSelect ?groupMode t) (setq cnt axlGetSelSetCount()) (sprintf msg "Do you want to Center the %d CLINE_SEGS?. Make sure that that you're using the correct GRID or else the clines will not be centered" cnt) (if (axlUIYesNo msg) then (setq CLINES2center (axlGetSelSet)) axlClearSelSet() (setq cntr_with (axlUIDataBrowse 'SHAPE_SYMBOL '(EXAMINE_DATABASE DATABASE_FIXED RETRIEVE_OBJECT) "Shape_Symbol" t)) (setq grid_name (car cntr_with))
(setq ldbid (axlShoveItems CLINES2center))<-- here's the funtion. Not sure what to do from here on.
(if (length ldbid) != cnt then (sprintf msg "WARNING: Centered only %d out of %d CLINES.\n\nCheck for FIXED property or add the correct grid setting to the database (current grid list) then retry" (length ldbid) cnt) axlUIConfirm(msg) else (sprintf msg "Info: Centered %d out of %d clines." (length ldbid) cnt) axlUIConfirm(msg) ); );if (axlClearSelSet) (axlFinishEnterFun) );let );defun
This isn't trivial. It will require a reasonable programming effort. I could do this but it would take me several hours and I would need a reference design to ensure I was actually meeting your requirement.
You need to set your shove parameters. You need to be shoving using the gridded option.
The key is to set the grid up correctly. On a staggered grid this will be fun and probably not possible if the vias are not on a 45 degree grid.
I sent you a board file that I just created in Allegro Editor 16.6. I hope it helps.
It has few clines so as not complicate the board since the bga is a satagered pitch via.
Thanks again Dave.
If you want to know whether my suggested method would be possible with this design, my answer is yes, probably. Substantial coding would be required. For a one-off exercise it may be quicker to "gloss" this by hand. However, I'm sure that the layout experts out there with familiarity with constraint regions and the glossing tools would recommend that you use the existing inbuilt Allegro tools.