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'

DSP_Texas = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'TMS320LF2406PZ', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'TMS320LF2406PZ'}), 'ref_prefix':'U', 'fplist':[''], 'footprint':'', 'keywords':'16BIT DSP TMS320 Obsolete', 'description':'', 'datasheet':'http://www.ti.com/lit/ds/symlink/tms320lf2406.pdf', 'search_text':'/usr/share/kicad/symbols/DSP_Texas.kicad_sym\nTMS320LF2406PZ\n\n16BIT DSP TMS320 Obsolete', 'pins':[
            Pin(num='1',name='TRST',func=pin_types.INPUT,unit=1),
            Pin(num='10',name='PLLVcca',func=pin_types.PASSIVE,unit=1),
            Pin(num='100',name='TMS',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='TDIRA/IOPB6',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='T1PWM/T1CMP/IOPB4',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='T2PWM/T2CMP/IOPB5',func=pin_types.BIDIR,unit=1),
            Pin(num='14',name='IOPC0',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='XINT2/IOPD0',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='XINT1/IOPA2',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='TXD/IOPA0',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='RXD/IOPA1',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='2',name='TDIRB/IOPF4',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='21',name='SPI_SIMO/IOPC2',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='SPI_SOMI/IOPC3',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='SPI_TE-/IOPC5',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='SPI_CLK/IOPC4',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='TMS2',func=pin_types.INPUT,unit=1),
            Pin(num='26',name='TCLKINA/IOPB7',func=pin_types.PASSIVE,unit=1),
            Pin(num='27',name='PWM12/IOPE6',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='PWM6/IOPB3',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='30',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='31',name='PWM5/IOPB2',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='PWM11/IOPE5',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='PWM4/IOPB1',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='35',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='36',name='PWM3/IOPB0',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='PWM2/IOPA7',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='PWM10/IOPE4',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='PWM1/IOPA6',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='40',name='VccPROG_5V',func=pin_types.PASSIVE,unit=1),
            Pin(num='41',name='PWM9/IOPE3',func=pin_types.BIDIR,unit=1),
            Pin(num='43',name='PWM8/IOPE2',func=pin_types.BIDIR,unit=1),
            Pin(num='45',name='PWM7/IOPE1',func=pin_types.BIDIR,unit=1),
            Pin(num='46',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='47',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='48',name='CAP6/IOPF1',func=pin_types.BIDIR,unit=1),
            Pin(num='49',name='CANRX/IOPC7',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='T4PWM/T4CMP/IOPF3',func=pin_types.BIDIR,unit=1),
            Pin(num='50',name='CANTX/IOPC6',func=pin_types.BIDIR,unit=1),
            Pin(num='51',name='CLKOUT/IOPE0',func=pin_types.BIDIR,unit=1),
            Pin(num='52',name='CAP3/IOPA5',func=pin_types.BIDIR,unit=1),
            Pin(num='53',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='54',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='55',name='CAP2/QEP2/IOPA4',func=pin_types.BIDIR,unit=1),
            Pin(num='56',name='CAP5/QEP4/IOPF0',func=pin_types.PASSIVE,unit=1),
            Pin(num='57',name='CAP1/QEP1/IOPA3',func=pin_types.BIDIR,unit=1),
            Pin(num='58',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='59',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='6',name='PDPINTA',func=pin_types.INPUT,unit=1),
            Pin(num='60',name='CAP4/QEP3/IOPE7',func=pin_types.BIDIR,unit=1),
            Pin(num='61',name='EMU0',func=pin_types.BIDIR,unit=1),
            Pin(num='62',name='EMU1/OFF-',func=pin_types.BIDIR,unit=1),
            Pin(num='63',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='64',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='65',name='ADCIN15',func=pin_types.INPUT,unit=1),
            Pin(num='66',name='ADCIN07',func=pin_types.INPUT,unit=1),
            Pin(num='67',name='ADCIN06',func=pin_types.INPUT,unit=1),
            Pin(num='68',name='ADCIN14',func=pin_types.INPUT,unit=1),
            Pin(num='69',name='ADCIN05',func=pin_types.INPUT,unit=1),
            Pin(num='7',name='T3PWM/T3CMP/IOPF2',func=pin_types.BIDIR,unit=1),
            Pin(num='70',name='ADCIN04',func=pin_types.INPUT,unit=1),
            Pin(num='71',name='ADCIN13',func=pin_types.INPUT,unit=1),
            Pin(num='72',name='ADCIN03',func=pin_types.INPUT,unit=1),
            Pin(num='73',name='ADCIN12',func=pin_types.INPUT,unit=1),
            Pin(num='74',name='ADCIN02',func=pin_types.INPUT,unit=1),
            Pin(num='75',name='ADCIN11',func=pin_types.INPUT,unit=1),
            Pin(num='76',name='ADCIN10',func=pin_types.INPUT,unit=1),
            Pin(num='77',name='ADCIN01',func=pin_types.INPUT,unit=1),
            Pin(num='78',name='ADCIN09',func=pin_types.INPUT,unit=1),
            Pin(num='79',name='ADCIN00',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='PLLF2',func=pin_types.PASSIVE,unit=1),
            Pin(num='80',name='ADCIN08',func=pin_types.INPUT,unit=1),
            Pin(num='81',name='VrefLO',func=pin_types.PASSIVE,unit=1),
            Pin(num='82',name='VrefHI',func=pin_types.PASSIVE,unit=1),
            Pin(num='83',name='VCCA',func=pin_types.PWRIN,unit=1),
            Pin(num='84',name='VSSA',func=pin_types.PWRIN,unit=1),
            Pin(num='85',name='BIO-/IOPC1',func=pin_types.BIDIR,unit=1),
            Pin(num='86',name='~{BOOT_EN}/XF',func=pin_types.OUTPUT,unit=1),
            Pin(num='87',name='XTAL/CLKIN',func=pin_types.INPUT,unit=1),
            Pin(num='88',name='XTAL2',func=pin_types.OUTPUT,unit=1),
            Pin(num='89',name='TCLKINB/IOPF5',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='PLLF',func=pin_types.PASSIVE,unit=1),
            Pin(num='90',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='91',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='92',name='IOPF6',func=pin_types.BIDIR,unit=1),
            Pin(num='93',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='94',name='TCK',func=pin_types.INPUT,unit=1),
            Pin(num='95',name='PDPINTB',func=pin_types.INPUT,unit=1),
            Pin(num='96',name='TDI',func=pin_types.INPUT,unit=1),
            Pin(num='97',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='98',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='99',name='TDO',func=pin_types.OUTPUT,unit=1)], 'unit_defs':[] })])