fname = os.path.join(pth, fname)
with open(fname) as pinmapfile:
for lineno, line in enumerate(pinmapfile):
- line1 = line.split()
+ line1 = line[:-1].split('\t')
if len(line1) <= 1:
continue
self.pinnumbers.append(int(line1[0]))
self.pinnumbers = sorted(self.pinnumbers)
self.upper_offset = self.lower_offset + \
- int(math.log(len(self.muxed_cells), 2))
+ int(math.log(len(self.muxed_cells), 2))
if verify:
self.do_checks()
+ self.cell_bitwidth = self.get_cell_bit_width()
+
# == user info after parsing ================= #
self.N_IO = len(self.dedicated_cells) + len(self.muxed_cells)
print("Max number of IO: " + str(self.N_IO))
+ print("Muxer bit width: " + str(self.cell_bitwidth))
print("Muxed IOs: " + str(len(self.muxed_cells)))
print("Dedicated IOs: " + str(len(self.dedicated_cells)))
# TODO
+ def get_cell_bit_width(self):
+ max_num_cells = 0
+ for cell in self.muxed_cells:
+ max_num_cells = max(len(cell) - 1, max_num_cells)
+ return int(math.log(max_num_cells + 1, 2))
+
+
if __name__ == '__main__':
p = Parse()
- print p.N_IO
+ print (p.N_IO)