Index: boxsym-rnd/generator.awk =================================================================== --- boxsym-rnd/generator.awk (revision 4218) +++ boxsym-rnd/generator.awk (revision 4219) @@ -133,9 +133,11 @@ return siden } -function draw_pins(slot, ALIGN, loc, x0, y0, stx, sty, ST,save_last, n,currslot) +function draw_pins(slot, ALIGN, loc, x0, y0, stx, sty, ST,save_last, n,currslot,orig_STx,orig_STy) { if (slot == "") { # all slots + LAST_CRD[loc, "x"] = "" + LAST_CRD[loc, "y"] = "" for(n = 0; n < nslots; n++) draw_pins(SLOTS[n], ALIGN, loc, x0, y0, stx, sty, ST, 1) } @@ -150,6 +152,10 @@ else ST["y"] = y0 + ALIGN[loc, "y0"] + orig_STx = ST["x"] + orig_STy = ST["y"] + + if (ALIGN["cfg", "expand_slot"]) { # generate pins in a per slot fashion until slots run out (or at most 256 of them to avoid infinite loop) for(currslot = 1; currslot <= 256; currslot++) { @@ -161,8 +167,18 @@ draw_pins_(slot, ALIGN, loc, stx, sty, ST, "") if (save_last) { - LAST_CRD[loc, "x"] = ST["x"] - LAST_CRD[loc, "y"] = ST["y"] + # monolith: remember last X and Y st so the next slot can continue from there + # if not the first slot on the given side, also add step (stx/sty) to separate + if (orig_STx != ST["x"]) { + if (LAST_CRD[loc, "x"] != "") + ST["x"] += stx + LAST_CRD[loc, "x"] = ST["x"] + } + if (orig_STy != ST["y"]) { + if (LAST_CRD[loc, "y"] != "") + ST["y"] += sty + LAST_CRD[loc, "y"] = ST["y"] + sty + } } }