-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_hs4.py
34 lines (28 loc) · 1.02 KB
/
run_hs4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from system import System_25D
import os
import sys
import util.fill_space
import subprocess
if len(sys.argv) != 2:
print("Usage: python3 run_hotspot.py <step_file>")
print("<step_file>: TAP2.5D step, e.g. step_1")
sys.exit(1)
def run_hotspot(path, filename):
proc = subprocess.Popen(["./util/hotspot",
"-c",path+"new_hotspot.config",
"-f",path+filename+"L4_ChipLayer_chiplet4.flp",
"-p",path+filename+"_chiplet4.ptrace",
"-steady_file",path+filename+".steady",
"-grid_steady_file",path+filename+".grid.steady",
"-model_type","grid",
"-detailed_3D","on",
"-grid_layer_file",path+filename+"layers_chiplet4.lcf"],
stdout=subprocess.PIPE, stderr = subprocess.PIPE)
stdout, stderr = proc.communicate()
outlist = stdout.split()
return (max(list(map(float,outlist[3::2])))-273.15)
def clean_hotspot(path, filename):
os.system('rm ' + path + filename + '{*.flp,*.lcf,*.ptrace,*.steady}')
path = "./output/micro150"
temp_new = run_hotspot("./output/micro150/", sys.argv[1])
print("temp=", temp_new)