from collections import defaultdict
from skidl import Pin, Part, Alias, SchLib, SKIDL, TEMPLATE

from skidl.pin import pin_types

SKIDL_lib_version = '0.0.1'

MCU_Parallax = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'P8X32A-D40', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'P8X32A-D40'}), 'ref_prefix':'U', 'fplist':['Package_DIP:DIP-40_W15.24mm'], 'footprint':'Package_DIP:DIP-40_W15.24mm', 'keywords':'microcontroller multicore Parallax Propeller DIP', 'description':'', 'datasheet':'https://www.parallax.com/sites/default/files/downloads/P8X32A-Propeller-Datasheet-v1.4.0_0.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_Parallax.kicad_sym\nP8X32A-D40\n\nmicrocontroller multicore Parallax Propeller DIP', 'pins':[
            Pin(num='1',name='P0',func=pin_types.BIDIR),
            Pin(num='10',name='~{BOE}',func=pin_types.INPUT),
            Pin(num='11',name='~{RES}',func=pin_types.BIDIR),
            Pin(num='12',name='VDD',func=pin_types.PWRIN),
            Pin(num='13',name='P8',func=pin_types.BIDIR),
            Pin(num='14',name='P9',func=pin_types.BIDIR),
            Pin(num='15',name='P10',func=pin_types.BIDIR),
            Pin(num='16',name='P11',func=pin_types.BIDIR),
            Pin(num='17',name='P12',func=pin_types.BIDIR),
            Pin(num='18',name='P13',func=pin_types.BIDIR),
            Pin(num='19',name='P14',func=pin_types.BIDIR),
            Pin(num='2',name='P1',func=pin_types.BIDIR),
            Pin(num='20',name='P15',func=pin_types.BIDIR),
            Pin(num='21',name='P16',func=pin_types.BIDIR),
            Pin(num='22',name='P17',func=pin_types.BIDIR),
            Pin(num='23',name='P18',func=pin_types.BIDIR),
            Pin(num='24',name='P19',func=pin_types.BIDIR),
            Pin(num='25',name='P20',func=pin_types.BIDIR),
            Pin(num='26',name='P21',func=pin_types.BIDIR),
            Pin(num='27',name='P22',func=pin_types.BIDIR),
            Pin(num='28',name='P23',func=pin_types.BIDIR),
            Pin(num='29',name='VSS',func=pin_types.PWRIN),
            Pin(num='3',name='P2',func=pin_types.BIDIR),
            Pin(num='30',name='XI',func=pin_types.INPUT),
            Pin(num='31',name='XO',func=pin_types.OUTPUT),
            Pin(num='32',name='VDD',func=pin_types.PWRIN),
            Pin(num='33',name='P24',func=pin_types.BIDIR),
            Pin(num='34',name='P25',func=pin_types.BIDIR),
            Pin(num='35',name='P26',func=pin_types.BIDIR),
            Pin(num='36',name='P27',func=pin_types.BIDIR),
            Pin(num='37',name='P28',func=pin_types.BIDIR),
            Pin(num='38',name='P29',func=pin_types.BIDIR),
            Pin(num='39',name='P30',func=pin_types.BIDIR),
            Pin(num='4',name='P3',func=pin_types.BIDIR),
            Pin(num='40',name='P31',func=pin_types.BIDIR),
            Pin(num='5',name='P4',func=pin_types.BIDIR),
            Pin(num='6',name='P5',func=pin_types.BIDIR),
            Pin(num='7',name='P6',func=pin_types.BIDIR),
            Pin(num='8',name='P7',func=pin_types.BIDIR),
            Pin(num='9',name='VSS',func=pin_types.PWRIN)], 'unit_defs':[] }),
        Part(**{ 'name':'P8X32A-M44', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'P8X32A-M44'}), 'ref_prefix':'U', 'fplist':['Package_DFN_QFN:QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm'], 'footprint':'Package_DFN_QFN:QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm', 'keywords':'microcontroller multicore Parallax Propeller QFN', 'description':'', 'datasheet':'https://www.parallax.com/sites/default/files/downloads/P8X32A-Propeller-Datasheet-v1.4.0_0.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_Parallax.kicad_sym\nP8X32A-M44\n\nmicrocontroller multicore Parallax Propeller QFN', 'pins':[
            Pin(num='1',name='P4',func=pin_types.BIDIR),
            Pin(num='10',name='P9',func=pin_types.BIDIR),
            Pin(num='11',name='P10',func=pin_types.BIDIR),
            Pin(num='12',name='P11',func=pin_types.BIDIR),
            Pin(num='13',name='P12',func=pin_types.BIDIR),
            Pin(num='14',name='P13',func=pin_types.BIDIR),
            Pin(num='15',name='P14',func=pin_types.BIDIR),
            Pin(num='16',name='P15',func=pin_types.BIDIR),
            Pin(num='17',name='VSS',func=pin_types.PWRIN),
            Pin(num='18',name='VDD',func=pin_types.PWRIN),
            Pin(num='19',name='P16',func=pin_types.BIDIR),
            Pin(num='2',name='P5',func=pin_types.BIDIR),
            Pin(num='20',name='P17',func=pin_types.BIDIR),
            Pin(num='21',name='P18',func=pin_types.BIDIR),
            Pin(num='22',name='P19',func=pin_types.BIDIR),
            Pin(num='23',name='P20',func=pin_types.BIDIR),
            Pin(num='24',name='P21',func=pin_types.BIDIR),
            Pin(num='25',name='P22',func=pin_types.BIDIR),
            Pin(num='26',name='P23',func=pin_types.BIDIR),
            Pin(num='27',name='VSS',func=pin_types.PWRIN),
            Pin(num='28',name='XI',func=pin_types.INPUT),
            Pin(num='29',name='XO',func=pin_types.OUTPUT),
            Pin(num='3',name='P6',func=pin_types.BIDIR),
            Pin(num='30',name='VDD',func=pin_types.PWRIN),
            Pin(num='31',name='P24',func=pin_types.BIDIR),
            Pin(num='32',name='P25',func=pin_types.BIDIR),
            Pin(num='33',name='P26',func=pin_types.BIDIR),
            Pin(num='34',name='P27',func=pin_types.BIDIR),
            Pin(num='35',name='P28',func=pin_types.BIDIR),
            Pin(num='36',name='P29',func=pin_types.BIDIR),
            Pin(num='37',name='P30',func=pin_types.BIDIR),
            Pin(num='38',name='P31',func=pin_types.BIDIR),
            Pin(num='39',name='VSS',func=pin_types.PWRIN),
            Pin(num='4',name='P7',func=pin_types.BIDIR),
            Pin(num='40',name='VDD',func=pin_types.PWRIN),
            Pin(num='41',name='P0',func=pin_types.BIDIR),
            Pin(num='42',name='P1',func=pin_types.BIDIR),
            Pin(num='43',name='P2',func=pin_types.BIDIR),
            Pin(num='44',name='P3',func=pin_types.BIDIR),
            Pin(num='45',name='VSS',func=pin_types.PWRIN),
            Pin(num='5',name='VSS',func=pin_types.PWRIN),
            Pin(num='6',name='~{BOE}',func=pin_types.INPUT),
            Pin(num='7',name='~{RES}',func=pin_types.BIDIR),
            Pin(num='8',name='VDD',func=pin_types.PWRIN),
            Pin(num='9',name='P8',func=pin_types.BIDIR)], 'unit_defs':[] }),
        Part(**{ 'name':'P8X32A-Q44', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'P8X32A-Q44'}), 'ref_prefix':'U', 'fplist':['Package_QFP:LQFP-44_10x10mm_P0.8mm'], 'footprint':'Package_QFP:LQFP-44_10x10mm_P0.8mm', 'keywords':'microcontroller multicore Parallax Propeller LQFP', 'description':'', 'datasheet':'https://www.parallax.com/sites/default/files/downloads/P8X32A-Propeller-Datasheet-v1.4.0_0.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_Parallax.kicad_sym\nP8X32A-Q44\n\nmicrocontroller multicore Parallax Propeller LQFP', 'pins':[
            Pin(num='1',name='P4',func=pin_types.BIDIR),
            Pin(num='10',name='P9',func=pin_types.BIDIR),
            Pin(num='11',name='P10',func=pin_types.BIDIR),
            Pin(num='12',name='P11',func=pin_types.BIDIR),
            Pin(num='13',name='P12',func=pin_types.BIDIR),
            Pin(num='14',name='P13',func=pin_types.BIDIR),
            Pin(num='15',name='P14',func=pin_types.BIDIR),
            Pin(num='16',name='P15',func=pin_types.BIDIR),
            Pin(num='17',name='VSS',func=pin_types.PWRIN),
            Pin(num='18',name='VDD',func=pin_types.PWRIN),
            Pin(num='19',name='P16',func=pin_types.BIDIR),
            Pin(num='2',name='P5',func=pin_types.BIDIR),
            Pin(num='20',name='P17',func=pin_types.BIDIR),
            Pin(num='21',name='P18',func=pin_types.BIDIR),
            Pin(num='22',name='P19',func=pin_types.BIDIR),
            Pin(num='23',name='P20',func=pin_types.BIDIR),
            Pin(num='24',name='P21',func=pin_types.BIDIR),
            Pin(num='25',name='P22',func=pin_types.BIDIR),
            Pin(num='26',name='P23',func=pin_types.BIDIR),
            Pin(num='27',name='VSS',func=pin_types.PWRIN),
            Pin(num='28',name='XI',func=pin_types.INPUT),
            Pin(num='29',name='XO',func=pin_types.OUTPUT),
            Pin(num='3',name='P6',func=pin_types.BIDIR),
            Pin(num='30',name='VDD',func=pin_types.PWRIN),
            Pin(num='31',name='P24',func=pin_types.BIDIR),
            Pin(num='32',name='P25',func=pin_types.BIDIR),
            Pin(num='33',name='P26',func=pin_types.BIDIR),
            Pin(num='34',name='P27',func=pin_types.BIDIR),
            Pin(num='35',name='P28',func=pin_types.BIDIR),
            Pin(num='36',name='P29',func=pin_types.BIDIR),
            Pin(num='37',name='P30',func=pin_types.BIDIR),
            Pin(num='38',name='P31',func=pin_types.BIDIR),
            Pin(num='39',name='VSS',func=pin_types.PWRIN),
            Pin(num='4',name='P7',func=pin_types.BIDIR),
            Pin(num='40',name='VDD',func=pin_types.PWRIN),
            Pin(num='41',name='P0',func=pin_types.BIDIR),
            Pin(num='42',name='P1',func=pin_types.BIDIR),
            Pin(num='43',name='P2',func=pin_types.BIDIR),
            Pin(num='44',name='P3',func=pin_types.BIDIR),
            Pin(num='5',name='VSS',func=pin_types.PWRIN),
            Pin(num='6',name='~{BOE}',func=pin_types.INPUT),
            Pin(num='7',name='~{RES}',func=pin_types.BIDIR),
            Pin(num='8',name='VDD',func=pin_types.PWRIN),
            Pin(num='9',name='P8',func=pin_types.BIDIR)], 'unit_defs':[] })])