AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
AMF-Vivado-2020-testSet.py
Go to the documentation of this file.
1
import
os
2
import
numpy
as
np
3
4
'''
5
benchmarkNames = ["OpenPiton","digitRecognition",
6
"minimap_GENE",
7
"MemN2N","BLSTM_midDensity",
8
"halfsqueezenet", "faceDetect",
9
"optimsoc"]
10
'''
11
12
testSet = [
"noBlockAware"
,
"noWNSGPOpt"
,
"noSectorGuided"
,
"useBigWindow"
]
13
benchmarkNames = [
"digitRecognition"
,
"faceDetect"
,
"halfsqueezenet"
,
14
"BLSTM_midDensity"
,
"MemN2N"
,
"minimap_GENE"
,
"OpenPiton"
]
15
targetPath =
"/home/tingyuan/Documents/AMF-Placer-DCP-Test/expSet/"
16
17
for
testName
in
testSet:
18
19
os.system(
"cd "
+targetPath+
";mkdir "
+testName)
20
for
benchmarkName
in
benchmarkNames:
21
print(
"testing "
, benchmarkName,
"with"
, testName)
22
23
outputPath = targetPath+
"/"
+testName+
"/"
24
25
outputName = benchmarkName
26
os.system(
"mkdir dumpData_"
+benchmarkName)
27
28
if
(benchmarkName !=
" "
):
29
30
os.system(
"cd dumpData_"
+benchmarkName+
";rm *"
)
31
os.system(
"./AMFPlacer ../benchmarks/testConfig/"
+testName+
"/"
+benchmarkName +
32
".json > "
+outputPath+
"/log_"
+testName+
"_"
+benchmarkName)
33
os.system(
"tail log_"
+benchmarkName+
" -n 300"
)
34
35
# for benchmarkName in benchmarkNames:
36
overallTcl = open(
37
"/home/tingyuan/Documents/AMF-Placer2/overall.tcl"
,
"w"
)
38
outputName = benchmarkName
39
40
errorCode = 0
41
if
(errorCode == 0):
42
print(
43
"open_checkpoint /home/tingyuan/Documents/Benchmark-DCP/"
+benchmarkName+
".dcp"
, file=overallTcl)
44
print(
"source /home/tingyuan/Documents/AMF-Placer2/build/dumpData_"
+
45
benchmarkName+
"/DumpCLBPacking-first-0.tcl"
, file=overallTcl)
46
print(
"report_datasheet -name timing_2 -file "
+ outputPath +
47
outputName+
"2020_timing_report.txt"
, file=overallTcl)
48
print(
"write_checkpoint "
+outputPath+
"/"
+
49
outputName+
"2020.dcp -force"
, file=overallTcl)
50
overallTcl.close()
51
os.system(
"vivado -mode batch -source /home/tingyuan/Documents/AMF-Placer2/overall.tcl -journal "
+
52
outputPath+outputName+
"2020.jou"
53
+
" -log "
+ outputPath+outputName+
"2020.log"
)
benchmarks
testConfig
AMF-Vivado-2020-testSet.py
Generated by
1.8.18