//routemwsb1.bcpl // Board-specific Route routines for the D0 Multi-Wire Main Logic Board // Part 1 of 2, last modified by S. Tom Chang, November 27, 1978 9:04 AM // all co-ordinates are described with respect to the bottom or // wiring side of the board. LevelTransform fixes these as necessary. // change ZeroTable names to match these used in old WL // correction on Gnd and voltage pins on odd locations get "route.defs" static [ maxICs = 200; boardInterfaceVersion = interfaceVersion ] external [ Pin1of3W; Pin1of4W; Pin1of6W ] let DeclareInitialNets(BuildTWNet, BuildTermNet, BuildConnector) be [(635) BuildConnector("E", 200, EPinPos) BuildConnector("C", 765, CPinPos) BuildTWNet("GND", 216, GNDPinPos) BuildTWNet("VCC", 171, VCCPinPos) BuildTWNet("VDD", 171, VDDPinPos) BuildTWNet("VEE", 171, VEEPinPos)l4269 ] and ZeroTablePoint(point) = selecton point into [ case 0: "Sk" // board type case 1: "Z-i1.10" case 2: "E98" case 3: "E2" case 4: "Z-a1.1" default: emptyl4269 ] and LevelTransform(level, x, y, px, py, pName, pPullComponents, pWire; numargs na) = valof [ DefaultArgs(lv na, -1, 0, 0, lv na, lv na, lv na, lv na, lv na) switchon level into [l4269 case TopLevel:l5539 @px = x @py = 500-y @pName = "Component side" @pPullComponents = true @pWire = false resultis truel6809 case BottomLevel:l5539 @px = x @py = y @pName = "Wiring side" @pPullComponents = false @pWire = true resultis truel6809 default: resultis falsel5539 ]l4269 ] and EPinPos(icinst, pin, px, py) = valof [ if (pin ls 2) % (pin gr 199) then resultis illegal if ((pin eq 100)%(pin eq 101)) then resultis illegal // +12 volts let pv = pin rem 50 if ((pv eq 0)%(pv eq 1)) then resultis illegal // +5 volts let pg = pin rem 10 if (pg eq 0) then resultis illegal // ground Epins let pd = 99 - (pin rem 100) @px = 4 + pd*4 + (pd le 48?0,20) @py = 500 - ((pin - 1)/100)*4 resultis absolutel4269 ] and CPinPos(icinst, pin, px, py) = valof [ let pn = pin rem 100 - 1 let pd = pn rem 50 @px = 0 @py = 0 switchon pin/100 into [l4268(1270) case 0:l4268d5184 [l4268d5184 if ((pd ge 19)&(pd le 36)) then @py = 4 if ((pn ge 0)&(pn le 36)) then @px = table [ 312; 308; 304; 296; 292; 288; 284; 280; 276; 272;l6080 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 if ((pn ge 50)&(pn le 86)) then @px = table [ 184; 180; 176; 172; 168; 164; 160; 156; 148; 144;l6080 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 resultis absolutel6080 ] l8352d5184 case 1: [l5184 if ((pd ge 19)&(pd le 36)) then @py = 4 if ((pn ge 0)&(pn le 36)) then @px = table [ 232; 236; 240; 244; 248; 252; 256; 260; 268; 272;l6080 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 if ((pn ge 50)&(pn le 86)) then @px = table [ 104; 108; 112; 116; 124; 128; 132; 136; 140; 144;l6080 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 resultis absolutel6080 ] case 2: [l5184 if ((pd ge 13)&(pd le 24)) then @py = 4 if ((pn ge 0)&(pn le 24)) then @px = table [ 284; 280; 276; 272; 268; 260; 256; 252; 248; 244;l6080 240; 236; 232; 280; 276; 272; 268; 260; 256; 252; 248; 244; 240; 236; 232 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 184; 180; 176; 172; 168; 164; 160; 156; 148; 144;l6080 140; 136; 132; 184; 180; 176; 172; 168; 164; 160; 156; 148; 144; 140; 136 ]!pdl9248 resultis absolutel6080 ] case 3: [l5184 if ((pd ge 13)&(pd le 24)) then @py = 4 if ((pn ge 0)&(pn le 24)) then @px = table [ 232; 236; 240; 244; 248; 252; 256; 260; 268; 272;l6080 276; 280; 284; 232; 236; 240; 244; 248; 252; 256; 260; 268; 272; 276; 280 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 132; 136; 140; 144; 148; 156; 160; 164; 168; 172;l6080 176; 180; 184; 136; 140; 144; 148; 156; 160; 164; 168; 172; 176; 180; 184 ]!pdl9248 resultis absolutel6080 ] case 4: [l5184 if ((pd ge 8)&(pd le 14)) then @py = 4 if ((pn ge 0)&(pn le 14)) then @px = table [ 328; 324; 320; 316; 312; 308; 304; 296; 328; 324;l6080 320; 316; 312; 308; 304 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 184; 180; 176; 172; 168; 164; 160; 156; 184; 180;l6080 176; 172; 168; 164; 160 ]!pdl9248 resultis absolutel6080 ] case 5: [l5184 if ((pd ge 8)&(pd le 14)) then @py = 4 if ((pn ge 0)&(pn le 14)) then @px = table [ 296; 304; 308; 312; 316; 320; 324; 328; 304; 308;l6080 312; 316; 320; 324; 328 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 156; 160; 164; 168; 172; 176; 180; 184; 160; 164;l6080 168; 172; 176; 180; 184 ]!pdl9248 resultis absolutel6080 ] case 6: [l5184 if ((pd ge 8)&(pd le 14)) then @py = 4 if ((pn ge 0)&(pn le 14)) then @px = table [ 260; 256; 252; 248; 244; 240; 236; 232; 256; 252;l6080 248; 244; 240; 236; 232 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 116; 112; 108; 104; 100; 96; 92; 88; 112; 108;l6080 104; 100; 96; 92; 88 ]!pdl9248 resultis absolutel6080 ] case 7: [l5184 if ((pd ge 8)&(pd le 14)) then @py = 4 if ((pn ge 0)&(pn le 14)) then @px = table [ 232; 236; 240; 244; 248; 252; 256; 260; 232; 236;l6080 240; 244; 248; 252; 256 ]!pnl9248 if ((pn ge 50)&(pn le 74)) then @px = table [ 88; 92; 96; 100; 104; 108; 112; 116; 88; 92;l6080 96; 100; 104; 108; 112 ]!pdl9248 resultis absolutel6080 ]l5184 ] resultis illegall4269(635) ] and VDDPinPos(icinst, pin, px, py, pInfo; numargs na) = valof [ DefaultArgs(lv na, -4, lv na) @pInfo = noDisconnect+noReconnect+TopLevel if pin le 0 then resultis illegal let noexpin = 0 if pin le 171 then [l4269 pin=pin-1 let VddRow = (pin/9)+1 let VddCol = 9 - (pin rem 9) @px = 44*VddCol - 4 + (VddCol ge 6?16,0) @py = 24*VddRow - 12 +(VddRow ge 9?12,0) +(VddRow ge 13?12,0) if (VddRow rem 5) eq 0 thenl5539 [ if (VddCol eq 1)%(VddCol eq 9) then noexpin = 1 @px = 48*VddCol - 24 + (VddCol ge 6?16,0) ]l6464 if (VddRow eq 8)%(VddRow eq 12) thenl5539 [ if (VddCol eq 1)%(VddCol eq 6) then noexpin = 1 if VddCol ge 7 then VddCol = VddCol - 1 @px = 52*VddCol - 44 + (VddCol gr 5?16,0) ]l6464 if (VddRow eq 19) then @py = @py - 8 if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5539 ] resultis illegall4269 ] and VEEPinPos(icinst, pin, px, py, pInfo; numargs na) = valof [ DefaultArgs(lv na, -4, lv na) @pInfo = noDisconnect+noReconnect+TopLevel if pin le 0 then resultis illegal let noexpin = 0 if pin le 171 then [l4269 pin=pin-1 let VeeRow = (pin/9)+1 let VeeCol = 9 - (pin rem 9) @px = 44*VeeCol - 32 + (VeeCol ge 6?16,0) @py = 24*VeeRow - 8 + (VeeRow ge 9?12,0) + (VeeRow ge 13?12,0) if (VeeRow rem 5) eq 0 thenl5539 [ if VeeCol eq 1 % VeeCol eq 9 then noexpin = 1 @px = 48*VeeCol - 56 + (VeeCol ge 6?16,0) ]l6464 if (VeeRow eq 8)%(VeeRow eq 12) thenl5539 [ if (VeeCol eq 1)%(VeeCol eq 6) then noexpin = 1 if VeeCol ge 7 then VeeCol = VeeCol - 1 @px = 52*VeeCol - 76 + (VeeCol gr 5?16,0) @py = @py + 8 ]l6464 if (VeeRow eq 19) then @py = @py - 4 if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5539 ] resultis illegall4269 ]  and GNDPinPos(icinst, pin, px, py, pInfo; numargs na) = valof [ DefaultArgs(lv na, -4, lv na) @pInfo = Disconnect+noReconnect+BottomLevel if pin le 0 then resultis illegal pin=pin-1 let GndRow = (pin/9) + 1 let GndCol = 9 - (pin rem 9) let noexpin = 0 if pin ls 171 then [l4269 @px = 44*GndCol - 36 + (GndCol ge 6?16,0) @py = 24*GndRow - 16 + (GndRow ge 8?12,0) + (GndRow ge 12?12,0) if (GndRow rem 5) eq 0 thenl5536 [ @px = @px + 4*GndCol + (GndCol eq 1?16,0) - 24 ]l5536 if (GndRow eq 8)%(GndRow eq 12) thenl5536 [ if (GndCol eq 1)%(GndCol eq 6) then noexpin = 1 if GndCol ge 7 then GndCol = GndCol - 1 @px = 52*GndCol - 84 + (GndCol gr 5?16,0) ] if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5536 ] if (pin ge 171)&(pin ls 189) then [l4269 if (GndCol eq 1)%(GndCol eq 6) then noexpin = 1 if GndCol ge 7 then GndCol = GndCol - 1 @px = 52*GndCol - 84 + (GndCol gr 5?16,0) @py = 176 + (pin ge 180?108,0) if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5536 ] if (pin ge 189)&(pin ls 216) then [l4269 if (GndCol eq 1)%(GndCol eq 9) then noexpin = 1 GndCol = GndCol - 1 @px = 48*GndCol + (GndCol ge 5?16,0) @py = 132*((pin -189)/9) + 100 if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5536 ] resultis illegall4269 ] and VCCPinPos(icinst, pin, px, py, pInfo; numargs na) = valof [ DefaultArgs(lv na, -4, lv na) @pInfo = Disconnect+noReconnect+TopLevel if pin le 0 then resultis illegal let noexpin = 0 if pin le 171 then [l4269 pin=pin-1 let VccRow = (pin/9) + 1 let VccCol = 9 - (pin rem 9) @px = 44*VccCol + (VccCol ge 6?16,0) @py = 24*VccRow - 4 + (VccRow ge 8?12,0) + (VccRow ge 12?12,0) if (VccRow rem 5) eq 0 thenl5536 [ @px = @px + 4*VccCol - (VccCol eq 9?16,0) - 20 ]l5536 if (VccRow eq 8)%(VccRow eq 12) thenl5536 [ if (VccCol eq 1)%(VccCol eq 6) then noexpin = 1 if VccCol ge 7 then VccCol = VccCol - 1 @pInfo = noDisconnect+noReconnect+TopLevel @px = 52*VccCol - 40 + (VccCol gr 5?16,0) ] if noexpin ne 0 then [ @px = 412; @py = 500 ] resultis absolutel5539 ] resultis illegall4269 ] and Pin1of3W(row, col, px, py) = valof [ unless OffsetLegal(row, 1, 1, 19)&OffsetLegal(col, 1, $a-$a, $i-$a) do resultis false @px = (9 - col)*44 + (col le $d-$a?16,0) @py = row*24 - 16 + (row ge 8?12,0) + (row ge 12?12,0) if ((row rem 5) eq 0) then @px = @px + 16 - col*4 - (col eq $a-$a?16,0) if (row eq 8)%(row eq 12) then @px = @px + 32 - col*8 -(col le $c-$a?52,0) resultis truel4256 ] and Pin1of4W(row, col, px, py) = valof [ unless ((row rem 5) eq 0)&OffsetLegal(col, 1, $b-$a, $h-$a) do resultis false @px = (8 - col)*48 + 28 + (col le $d-$a?16,0) @py = 100 + ((row/5) - 1)*132 resultis truel4256 ] and Pin1of6W(row, col, px, py) = valof [ unless OffsetLegal(row, 4, 2, 3)&OffsetLegal(col, 1, $a-$a, $h-$a)&(col ne $d) do resultis false @px = (8 - col)*52 + 12 - (col le $c-$a?36,0) @py = 176 + (row eq 12?108,0) resultis truel4256 ]