2 N_MUX
= 1 # number of selection lines for the mux per io
9 # == capture the number of IO cells required == #
10 pinmapfile
= open('pinmap.txt', 'r')
14 for lineno
, line
in enumerate(pinmapfile
):
17 if(len(line1
) == 2): # dedicated
18 dedicated_cells
.append(line1
)
20 muxed_cells
.append(line1
)
21 # ============================================= #
23 # ======= Multiple checks to see if the user has not screwed ======#
25 # Check-1: ensure that no pin is present in both muxed and dedicated pins
26 for muxcell
in muxed_cells
:
27 for dedcel
in dedicated_cells
:
28 if(dedcel
[1] in muxcell
):
29 print("ERROR: " + str(dedcel
[1]) + " present \
30 in dedicated & muxed lists")
32 # Check-2: confirm if N_* matches the instances in the pinmap
33 # ============================================================== #
35 # == user info after parsin ================= #
36 N_IO
= len(dedicated_cells
) + len(muxed_cells
)
37 print("Max number of IO: " + str(N_IO
))
38 print("Muxed IOs: " + str(len(muxed_cells
)))
39 print("Dedicated IOs: " + str(len(dedicated_cells
)))
40 # ============================================ #