Hi all,
I have 2 LEF files i want to perform these task using python
- get list of Pins in first LEF and compare with other LEF and report any missing pins and any extra pins
i completed this task file size of (34000 lines). When i perform different size files its giving me error(IndexError: list index out of range)
if you find anywhere wrong in a code please correct me
please help me to solve this problem, much much much thanks in advance
my code(python)
file1 = open('/home/script/fileabc1.lef', 'r') #LEF1
file2 = open('/home/script/fileabc2.lef', 'r') #LEF2
file00 = open('/home/script/o0.txt', 'r+')
file01 = open('/home/script/o1.txt', 'r+')
file02 = open('/home/script/o2.txt', 'r+')
file03 = open('/home/script/o3.txt', 'r+')
file04 = open('/home/script/o4.txt', 'r+')
for l1 in file1.readlines():
if 'PIN' in l1:
file00.write("%s\n" %(l1))
for l2 in file2.readlines():
if 'PIN' in l2:
file01.write("%s\n" %(l2))
file00_1 = file00.readlines()
file01_1 = file01.readlines()
for i in range(len(file00_1)):
if file00_1[i] != file01_1[i]: # error found here
file02.write("%s" %(file00_1[i]))
else:
file03.write("%s\n" %(file00_1[i]))
for i in range(len(file01_1)):
if file01_1[i] != file00_1[i]:
file04.write("%s\n" %(file01_1[i]))