#!/usr/bin/env python # This is a dump of the VCCX layouts. The array index is the # layout ID and the array entries are the inverted shift # register outputs. The least significant byte is the first # shift register in the chain. vccx_layouts = [ 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000001, 0x000000, 0x000000, 0x002000, 0x000000, 0x000002, 0x000000, 0x000000, 0x080000, 0x000004, 0x000000, 0x000000, 0x010000, 0x004000, 0x000000, 0x000000, 0x000008, 0x000010, 0x000020, 0x000040, 0x000080, 0x000000, 0x000100, 0x000000, 0x000200, 0x000000, 0x000400, 0x000000, 0x000800, 0x000000, 0x008000, 0x000000, 0x001000, 0x000000, 0x020000, 0x000000, 0x040000, #0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x012000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, # 0x000000, 0x000000, 0x000000, 0x000000, ] shreg2zif_map = { # SHREG.PIN : ZIF_PIN # left side # 1 # 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 11 "0.0" : 12, # Q8C # 13 # 14 "1.5" : 15, # Q11C # 16 "0.1" : 17, # Q13C # 18 # 19 "2.3" : 20, # Q16C "0.2" : 21, # Q17C # 22 # 23 "2.0" : 24, # Q20C # right side "2.2" : 48, # Q44C # 47 "2.1" : 46, # Q42C # 45 "1.4" : 44, # Q40C # 43 "1.7" : 42, # Q38C # 41 "1.3" : 40, # Q36C # 39 "1.2" : 38, # Q34C # 37 "1.1" : 36, # Q32C # 35 "1.0" : 34, # Q30C # 33 "0.7" : 32, # Q28C "0.6" : 31, # Q27C "0.5" : 30, # Q26C "0.4" : 29, # Q25C "0.3" : 28, # Q24C # 27 # 26 "1.6" : 25, # Q21C } def printLayouts(): for layoutNr in range(0, len(vccx_layouts)): layout = vccx_layouts[layoutNr] print "ZIF socket VCCX layout %d:" % layoutNr hotPins = [] for reg in range(0, 3): for bit in range(0, 8): mask = (1 << bit) << (reg * 8) if layout & mask == 0: continue string = "%d.%d" % (reg, bit) zifPin = shreg2zif_map[string] hotPins.append(zifPin) print " o---------o" for pin in range(1, 25): left = " " right = "" if pin in hotPins: left = "VCCX >" if (49 - pin) in hotPins: right = "< VCCX" print "%s | %2d | %2d | %s" % (left, pin, 49 - pin, right) print " o---------o" print "" printLayouts()