Index: trunk/util/boxsym-rnd/7400.bs =================================================================== --- trunk/util/boxsym-rnd/7400.bs (revision 2861) +++ trunk/util/boxsym-rnd/7400.bs (revision 2862) @@ -16,7 +16,7 @@ loc bottom end pin pinalign top center -# pinalign bottom center + pinalign bottom center end slot @@ -46,6 +46,7 @@ invcirc end pin + pinalign left center pinalign right center end slot Index: trunk/util/boxsym-rnd/generator.awk =================================================================== --- trunk/util/boxsym-rnd/generator.awk (revision 2861) +++ trunk/util/boxsym-rnd/generator.awk (revision 2862) @@ -46,11 +46,17 @@ pname = pin sub(/^.*::/,"", pname) - if (slotidx != "") + if (slotidx == "") { + pnum = PIN[pin, "num"] + if (pnum ~ ":") { +# if slotted, use first and then rely on portmap + sub(":.*$", "", pnum) + } + } + else pnum = SLT[slotidx] - else - pnum = PIN[pin, "num"] + if (PIN[pin, "invcirc"]) pindecor = "circle" @@ -66,7 +72,7 @@ # draw pins of a given slot:loc, with first pin touching the box at x0;y0 # px and py are x and y dir for the pin line, stx and sty are stepping to # the next coord. State is stored in ST -function draw_pins_(slot, ALIGN, loc, stx, sty, ST, currslot ,n,v,i,siden) +function draw_pins_(slot, ALIGN, loc, stx, sty, ST, currslot ,n,v,i,siden,A,pin) { ST["pdir"] = loc siden = 0 @@ -235,6 +241,28 @@ } } +function gen_portmap(slot ,n,i,v,pin,pname,A,AA,cnt) +{ + dbg("generate portmap for " slot ":") + attrarr_reset(AA) + cnt = 0 + for(n = 0; n < SLOT[slot, "npins"]; n++) { + pin = PINS[slot, n] + v = split(PIN[pin, "num"], A, "[:]") + if (v > 1) { + pname = pin + sub(".*::", "", pname) + for(i = 1; i <= v; i++) { + attrarr_append(AA, i "/" pname " -> pcb/pinnum=" A[i]) + cnt++ + dbg(" " i "/" pname " -> pcb/pinnum=" A[i]) + } + } + } + if (cnt > 0) + grp_attrarr_append(SYM, "portmap", AA) +} + function gen_monolith( ALIGN) { ofn=basename ".sym" @@ -260,6 +288,7 @@ draw_box(SYM, ALIGN["box","width"], ALIGN["box","height"], border, "") draw_all_pin(sn, ALIGN, 0) draw_all_labels(sn) + gen_portmap(sn) sym_end() delete SYM ofn=""