AMF-Placer  2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
unplaceFailureCells.py
Go to the documentation of this file.
1 import argparse
2 
3 
4 parser = argparse.ArgumentParser()
5 
6 parser.add_argument(
7  "-o", "--Output", help="The Output File Path", required=True)
8 parser.add_argument(
9  "-i", "--Input", help="The Input File Path", required=True)
10 
11 args = parser.parse_args()
12 
13 inputFile = open(args.Input, 'r')
14 outputFile = open(args.Output, 'w')
15 
16 lines = inputFile.readlines()
17 cellList = []
18 targetLineId = 0
19 for i, line in enumerate(lines):
20  if (line.find(" with block Id: ") >= 0):
21  cellList.append(line.split(" with block Id: ")[0])
22 
23 print("unplace_cell {"+' '.join(cellList) +
24  "}\nplace_design\nroute_design", file=outputFile, end='')
25 
26 inputFile.close()
27 outputFile.close()