AMF-Placer  2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
checkHalfColumn.py
Go to the documentation of this file.
1 inputFile = open("clockInfoCheck", 'r')
2 
3 lines = inputFile.readlines()
4 
5 i = 0
6 
7 clockInHalfColumns = [set() for i in range(0, 40)]
8 clockNum = 0
9 while (i < len(lines)):
10  if (lines[i].find("=============") >= 0):
11  curLine = lines[i].replace("=", "").replace("\n", "").split(" ")
12  rowY = int(curLine[2])
13  clockNum = int(curLine[4])
14 
15  for j in range(0, clockNum):
16  halfColId = rowY//15
17  clockInHalfColumns[halfColId].add(lines[i+1+j])
18  if (len(clockInHalfColumns[halfColId]) > 12):
19  print("halfColumn ", halfColId, " exceeed limit with ",
20  len(clockInHalfColumns[halfColId]), "clocks in it")
21  for clockName in clockInHalfColumns[halfColId]:
22  print(clockName)
23 
24  i += clockNum+1