// F U N C T I O N S F O R D0 L O G I C B O A R D // Last Modified May 19, 1978 10:11 AM // VDD and VEE on Row 19 moved due to stiffener get "sysdefs.d" get "gob.defs" manifest [ Mtype = $M-$A ] external [ BoardS ] let BoardS() be [ GetSVCoords=GetSVCoordsS GetSVindex=GetSVindexS SVoltReq = table [ 502; 502; 502 ; 0; 502 ] NetHasSVolt = NetHasSvoltS LegalBloc = LegalBlocS ChiptoPinPos = ChiptoPinPosS GetEpinCoords = GetEpinCoordsS GetCpinCoords = GetCpinCoordsS GetICcoords = GetICcoordsS AddPotentialTerms = AddPotentialTermsS FindBestTerm = ErrTfn SetUpTerms = Nullfn GetBoardPins = GetBoardPinsS maxn = 19 //board locations 1-19 maxalph = $i-$a TableZeroString = "*nZero Table At i1.10: <0> {8,8}*nZero Table At E98: <0> {8,500}*nZero Table At E2: <0> {412,500}*nZero Table At a1.1: <0> {412,8}" ] and NetHasSvoltS(netname) = valof [(1270)\f1 if StEq("VCC",netname) then resultis $F if StEq("GND",netname) then resultis $G if StEq("VEE",netname) then resultis $M if StEq("VDD",netname) then resultis $D resultis 0l4269\f1 ] and GetSVindexS(SVType,bl,pin)=valof [\f1 let alph = bl rem 26 let alf = (bl rem 26) + $a let num = bl/26 if ((num ge 1)&(num le 19)&(alf ge $a)&(alf le $i)) resultis bl resultis 0l4256(4256)\f1 ] and GetSVCoordsS(SVType,SVIndex,cv) be [(1270)\f1 let alph = SVIndex rem 26 let num = SVIndex/26 let ald = 8 - alph let alf = alph + $a cv!0 = 8 + ald*44 + (alf le $d?16,0) cv!1 = 8 + (num - 1)*24 + (num ge 8?12,0) + (num ge 12?12,0) let row = (((num eq 5)%(num eq 10)%(num eq 15))?5,0) + (((num eq 8)%(num eq 12))&((alf ne $d)%(alf ne $i))?8,0) switchon SVType into [l4269\f1 case $G: [l5539\f1 if (row eq 5) then l6809\f1 cv!0 = 4 + ald*48 - (alf le $h?16,0) + (alf le $d?16,0)l6809d8576\f1 if (row eq 8) thenl6809\f1 cv!0 = ald*52 - 32 - (alf le $d?36,0)l6809d8576\f1 returnl6809\f1 ]l5539\f1 l5539\f1 case $F: [l5539\f1 cv!0 = cv!0 + 36 if (row eq 5) then l6809\f1 cv!0 = 28 + ald*48 + (alf le $d?16,0) - (alf eq $a?16,0)l8576\f1 if (row eq 8) thenl6809\f1 cv!0 = 12 + ald*52 - (alf le $d?36,0)l6809d8576\f1 cv!1 = cv!1 + 12 returnl6809\f1 ]l5539\f1 l5539\f1 case $D: case $M: [l5539\f1 cv!1 = cv!1 + 4 + (SVType eq $M?4,0) cv!0 = cv!0 + 4 + (SVType eq $D?28,0) if ((row eq 5)&((alf ge $b)&(alf le $h))) thenl6809\f1 cv!0 = ald*48 -8 + (alf le $d?16,0) + (SVType eq $D?32,0) l8576\f1 if ((row eq 5)&((alf eq $a)%(alf eq $i))) thenl6809\f1 cv!1 = cv!1 - 24 l8576\f1 if (row eq 8) thenl6809\f1 [ cv!0 = ald*52 - 24 + (SVType eq $D?32,0) - (alf le $d?36,0) cv!1 = cv!1 - 4 - (SVType eq $D?8,0) ]l8576\f1 if num eq 19 then cv!1 = cv!1 - (SVType eq $D?8,4) returnl6809\f1 ]l5539\f1 l5539\f1 ]l4269\f1 ] and GetICcoordsS(alph,num,pin,cv) be [\f1 let boardloc = num*26 + alph let tp = Boardvec!boardloc let maxpins = tp>>icdesc.npins //max pins for chip let alf = alph + $a let ald = 8 - alph let pint = (pin le (maxpins/2)?1,0) let bpin = (pin le (maxpins/2)?((maxpins/2) - pin),(pin -1 - (maxpins/2))) if (((num eq 8)%(num eq 12))&((alf ge $a)&(alf le $h)&(alf ne $d))) do [l4268\f1 cv!0 = ald*52 - 32 + bpin*4 - (alf le $d?36,0) cv!1 = (num gr 8?308,200) - ((pint eq 1)?12,0) - ((pint eq 1)&(maxpins eq 24)?12,0) if (maxpins eq 22) thenl5538\f1 ErrBL("*n22 pins IC assigned on row 8 or 12: ",boardloc) returnl5538d7776\f1 ] if (((num eq 5)%(num eq 10)%(num eq 15))&((alf ge $a)&(alf le $i))) do [l4268\f1 cv!0 = 4 + bpin*4 + ald*48 + (alf le $d?16,0) - (alf le $h?16,0) cv!1 = 116 - ((pint eq 1)?12,0) - ((pint eq 1)&(maxpins eq 22)?4,0) + (num/7)*132 returnl5538\f1 ] if ((num ge 1)&(num le 19)&(alf ge $a)&(alf le $i)) do [l4268\f1 cv!0 = 8 + bpin*4 + ald*44 + (alf le $d?16,0) cv!1 = 8 + ((pint eq 0)?12,0) + (num - 1)*24 + (num ge 8?12,0) + (num ge 12?12,0) returnl5538\f1 ] let v = vec 50; v!0 = 0 //bad board location AppendS("*nBad BoardLoc, Pin: ",v) AppendBL(26*num+alph, v) AppendS(", ",v) AppendN(pin,v) WSS(ErFile,v) cv!0=0 cv!1=0 l4268\f1 ] and AddPotentialTermsS() be [\f1 //this function assigns svolt nodes to the corner pins of all TTL ICs for alph = 0 to maxalph do [l4269\f1 for n=1 to maxn do [l5539\f1 let bl = 26*n + alph let icptr = Boardvec!bl if icptr eq 0 then loop let ictype = icptr>>icdesc.ictype let npins = icptr>>icdesc.npins //number of chip pins let bpins = GetBoardPins(bl) switchon ictype into [l6809\f1 case Mtype: //Memory Storage IC with four volt pins AddSVoltNode($M,bl,((npins/2) + 1)) AddSVoltNode($F,bl,1) AddSVoltNode($D,bl,npins) endcase case Ntype: //N TTL case Htype: //H TTL case Stype: //S TTL if (npins ls bpins) then AddSVoltNode($F,bl,npins) endcasel8079\f1 ]l6809\f1 ]l5539\f1 ]l4269\f1 ] and LegalBlocS(bl) = valof [\f1 let alph = (bl rem 26)+$a; let num = bl/26 if (alph eq $d)&((num eq 8)%(num eq 12)) then resultis false//d8 or d12 is illegal if (alph eq $i)&((num eq 8)%(num eq 12)) then resultis false//i8 or i12 is illegal if (alph gr $i) then resultis false //letter always le i if (num eq 0)%(num gr 19) then resultis false //number always le 19 resultis truel4268\f1 ] and ChiptoPinPosS(boardloc,chippin) = valof [\f1 let tp = Boardvec!boardloc let ictype = tp>>icdesc.ictype let Halfmaxpins = (tp>>icdesc.npins)/2 if (ictype eq Mtype) thenl4268\f1 [l4268d5184\f1 test chippin gr Halfmaxpins ifso resultis chippin - Halfmaxpins ifnot resultis chippin + Halfmaxpinsl5568\f1 ]l4268d5184\f1 resultis chippinl4268\f1 ] and GetCpinCoordsS(pin,cv) be [\f1 let pn = pin rem 100 - 1 let pd = pn rem 50 cv!0 = 0 cv!1 = 0 switchon pin/100 into [l4268\f1 case 0:l4268d5184\f1 [l4268d5184\f1 if ((pd ge 19)&(pd le 36)) then cv!1 = 4 if ((pn ge 0)&(pn le 36)) then cv!0 = table [ 312; 308; 304; 296; 292; 288; 284; 280; 276; 272;l6080\f1 268; 260; 256; 252; 248; 244; 240; 236; 232; 312; 308; 304; 292; 288; 284; 280; 276; 272; 268; 260; 256; 252; 248; 244; 240; 236; 232 ]!pnl9248\f1 if ((pn ge 50)&(pn le 86)) then cv!0 = table [ 184; 180; 176; 172; 168; 164; 160; 156; 148; 144;l6080\f1 140; 136; 132; 128; 124; 116; 112; 108; 104; 184; 180; 176; 172; 168; 164; 160; 156; 148; 144; 140; 136; 132; 128; 124; 112; 108; 104 ]!pdl9248\f1 returnl6080\f1 ] l8352d5184\f1 case 1: [l5184\f1 if ((pd ge 19)&(pd le 36)) then cv!1 = 4 if ((pn ge 0)&(pn le 36)) then cv!0 = table [ 232; 236; 240; 244; 248; 252; 256; 260; 268; 272;l6080\f1 276; 280; 284; 288; 292; 296; 304; 308; 312; 232; 236; 240; 244; 248; 252; 256; 260; 268; 272; 276; 280; 284; 288; 292; 304; 308; 312 ]!pnl9248\f1 if ((pn ge 50)&(pn le 86)) then cv!0 = table [ 104; 108; 112; 116; 124; 128; 132; 136; 140; 144;l6080\f1 148; 156; 160; 164; 168; 172; 176; 180; 184; 104; 108; 112; 124; 128; 132; 136; 140; 144; 148; 156; 160; 164; 168; 172; 176; 180; 184 ]!pdl9248\f1 returnl6080\f1 ] case 2: [l5184\f1 if ((pd ge 13)&(pd le 24)) then cv!1 = 4 if ((pn ge 0)&(pn le 24)) then cv!0 = table [ 284; 280; 276; 272; 268; 260; 256; 252; 248; 244;l6080\f1 240; 236; 232; 280; 276; 272; 268; 260; 256; 252; 248; 244; 240; 236; 232 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 184; 180; 176; 172; 168; 164; 160; 156; 148; 144;l6080\f1 140; 136; 132; 184; 180; 176; 172; 168; 164; 160; 156; 148; 144; 140; 136 ]!pdl9248\f1 returnl6080\f1 ] case 3: [l5184\f1 if ((pd ge 13)&(pd le 24)) then cv!1 = 4 if ((pn ge 0)&(pn le 24)) then cv!0 = table [ 232; 236; 240; 244; 248; 252; 256; 260; 268; 272;l6080\f1 276; 280; 284; 232; 236; 240; 244; 248; 252; 256; 260; 268; 272; 276; 280 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 132; 136; 140; 144; 148; 156; 160; 164; 168; 172;l6080\f1 176; 180; 184; 136; 140; 144; 148; 156; 160; 164; 168; 172; 176; 180; 184 ]!pdl9248\f1 returnl6080\f1 ] case 4: [l5184\f1 if ((pd ge 8)&(pd le 14)) then cv!1 = 4 if ((pn ge 0)&(pn le 14)) then cv!0 = table [ 328; 324; 320; 316; 312; 308; 304; 296; 328; 324;l6080\f1 320; 316; 312; 308; 304 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 184; 180; 176; 172; 168; 164; 160; 156; 184; 180;l6080\f1 176; 172; 168; 164; 160 ]!pdl9248\f1 returnl6080\f1 ] case 5: [l5184\f1 if ((pd ge 8)&(pd le 14)) then cv!1 = 4 if ((pn ge 0)&(pn le 14)) then cv!0 = table [ 296; 304; 308; 312; 316; 320; 324; 328; 304; 308;l6080\f1 312; 316; 320; 324; 328 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 156; 160; 164; 168; 172; 176; 180; 184; 160; 164;l6080\f1 168; 172; 176; 180; 184 ]!pdl9248\f1 returnl6080\f1 ] case 6: [l5184\f1 if ((pd ge 8)&(pd le 14)) then cv!1 = 4 if ((pn ge 0)&(pn le 14)) then cv!0 = table [ 260; 256; 252; 248; 244; 240; 236; 232; 256; 252;l6080\f1 248; 244; 240; 236; 232 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 116; 112; 108; 104; 100; 96; 92; 88; 112; 108;l6080\f1 104; 100; 96; 92; 88 ]!pdl9248\f1 returnl6080\f1 ] case 7: [l5184\f1 if ((pd ge 8)&(pd le 14)) then cv!1 = 4 if ((pn ge 0)&(pn le 14)) then cv!0 = table [ 232; 236; 240; 244; 248; 252; 256; 260; 232; 236;l6080\f1 240; 244; 248; 252; 256 ]!pnl9248\f1 if ((pn ge 50)&(pn le 74)) then cv!0 = table [ 88; 92; 96; 100; 104; 108; 112; 116; 88; 92;l6080\f1 96; 100; 104; 108; 112 ]!pdl9248\f1 returnl6080\f1 ] l5184\f1 ] ErrN("*nSignal assigned to invalid I/O cable pin: ",pin) ] and GetEpinCoordsS(pin,cv) be [\f1 if ((pin ls 1)%(pin gr 200)) then ErrN("*nSignal assigned to invalid Epin: ",pin) if ((pin eq 1)%(pin eq 101)) then ErrN("*nSignal assigned to +12 volts power Epin: ",pin) if ((pin eq 100)%(pin eq 200)) then ErrN("*nSignal assigned to -5 volts power Epin: ",pin) let pv = pin rem 50 if ((pv eq 0)%(pv eq 1)) then ErrN("*nSignal assigned to +5 volts power Epin: ",pin) let pg = pin rem 10 if (pg eq 0) then ErrN("*nSignal assigned to ground Epin: ",pin) let px = 99 - (pin rem 100) cv!0 = 4 + px*4 + (px le 48?0,20) cv!1= 500 - ((pin - 1)/100)*4l4256\f1 ] and GetBoardPinsS(bl) = valof [\f1 let num = bl/26 let alph = bl rem 26 let n = alph*100 + num if ((n eq 5)%(n eq 10)%(n eq 15)) then resultis 14 if ((n eq 805)%(n eq 810)%(n eq 815)) then resultis 14 if (((n ne 308)&(n ne 808)&(num eq 8))%((n ne 312)&(n ne 812)&(num eq 12))) then resultis 24 if ((num eq 5)%(num eq 10)%(num eq 15)) then resultis 22 if ((num ge 1)&(num le 19)&((alph + $a) ge $a)&((alph + $a) le $i)) then resultis 20 ErrBL("*nIllegal Board Location: ", bl) resultis 0l4268\f1 ] (635)\f1