Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
uvahotspot
GitHub Repository: uvahotspot/HotSpot
Path: blob/master/examples/example1/run.sh
612 views
1
#!/usr/bin/env bash
2
3
# Remove results from previous simulatiosn
4
rm -f gcc.init
5
rm -f outputs/*
6
7
# Create outputs directory if it doesn't exist
8
mkdir outputs/
9
10
# The thermal model is bundled as a trace-level simulator that takes a
11
# power trace file and a floorplan file as inputs and outputs the
12
# corresponding transient temperatures onto a temperature trace file.
13
# There is also an option to output the final steady state temperatures
14
# onto a file. The formats of the input files can be gleaned from the
15
# sample files included with this distribution. For instance, with
16
# 'ev6.flp' as the given floorplan, 'gcc.ptrace' as the given power
17
# trace file, the set of commands to generate the temperature trace file
18
# 'gcc.ttrace' are given below. First, let us run the simulations with a
19
# set of default model parameters listed in the file 'hotspot.config'
20
# and gather the steady state temperatures onto a file. This is done by:
21
../../hotspot -c example.config -f ev6.flp -p gcc.ptrace -materials_file example.materials -model_type block -steady_file outputs/gcc.steady -o outputs/gcc.ttrace
22
23
# Now, 'gcc.ttrace' does contain a thermal trace but the initial
24
# temperatures that were used to generate it were default constant
25
# values. These might not be representative if the simulation is not
26
# long enough to warm up the chip and package. However, the steady state
27
# temperatures are a good estimate of what the correct set of initial
28
# temperatures are. So, we now use the steady state temperatures
29
# produced as the set of initial temperatures for the next 'true' run:
30
cp outputs/gcc.steady gcc.init
31
../../hotspot -c example.config -init_file gcc.init -f ev6.flp -p gcc.ptrace -materials_file example.materials -model_type block -o outputs/gcc.ttrace
32
33
# Note that the '-o <file>' command line flag is optional. Omitting it
34
# makes HotSpot compute the steady state temperatures directly without
35
# going through the transient simulation, thereby making the run faster.
36
# So, in the first command above, since we are interested only in the
37
# steady state temperatures, we could have actually omitted the '-o
38
# gcc.ttrace' part. Also, in the second command above, note that we have
39
# omitted the '-steady_file <file>' option.
40
41
# HotSpot integrates a simple model for heatsink, air flow and fan. This
42
# can assist cooling package design and exploration of the impact of
43
# cooling configurations on silicon temperatures. The package model also
44
# supports natural convection (which results in a much higher thermal
45
# resistance, and can cause thermal runaway for high-power chips). By
46
# default, HotSpot uses a single lumped thermal convection resistance
47
# (r_convec) at the air-sink interface. Detailed package configuration
48
# may be provided in a file (e.g. 'package.config'). An example of using the
49
# package model is given by:
50
#../../hotspot -c example.config -f ev6.flp -p gcc.ptrace -package_model_used 1 -package_config_file package.config -steady_file outputs/gcc_detailed_package.steady
51
52