Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
uvahotspot
GitHub Repository: uvahotspot/HotSpot
Path: blob/master/examples/example2/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 simulation in `example1` used the fast but less accurate `block`
11
# thermal model. HotSpot offers the choice of a more accurate but
12
# relatively slower model called the 'grid' model. The '-model_type
13
# grid' command line option switches HotSpot to the grid mode. Hence,
14
# the set of commands to redo the thermal simulation from `example1`
15
# using the grid model would be:
16
../../hotspot -c example.config -f ev6.flp -p gcc.ptrace -materials_file example.materials -model_type grid -steady_file outputs/gcc.steady -grid_steady_file outputs/gcc.grid.steady
17
18
cp outputs/gcc.steady gcc.init
19
20
../../hotspot -c example.config -init_file gcc.init -f ev6.flp -p gcc.ptrace -materials_file example.materials -model_type grid -o outputs/gcc.ttrace -grid_transient_file outputs/gcc.grid.ttrace
21
22
# The trade-off between speed and accuracy of the grid model can be
23
# controlled by specifying the grid model's resolution through the
24
# command line options '-grid_rows <num>' and '-grid_cols <num>'. The
25
# default grid size is 64x64 (as can be seen from the 'example.config'
26
# file). When simulating without SuperLU, grid dimensions are restricted
27
# to powers of 2 for algorithmic convenience.
28
29
# In addition to the '-steady_file <file>' option that provides
30
# temperatures at a per-block granularity, the grid model provides an
31
# additional means to access the finer grid of steady state
32
# temperatures. The command line option '-grid_steady_file <file>'
33
# outputs the internal grid temperatures directly (without
34
# aggregating them into per-block temperatures). This can help in
35
# learning how temperatures vary 'within' a block. Also, the Perl script
36
# 'grid_thermal_map.pl' or the Python script `grid_thermal_map.py` can produce color images
37
# of these temperatures with a superposed drawing of the floorplan for easy
38
# viewing. Note that we need to first split gcc.grid.steady into layer-specific temperature
39
# files. Although we've only given a single layer to be simulated, HotSpot is also simulating
40
# the Thermal Interface Material (TIM), heat spreader, and heat sink as separate layers
41
../../scripts/split_grid_steady.py outputs/gcc.grid.steady 4 64 64
42
../../scripts/grid_thermal_map.pl ev6.flp outputs/gcc_layer0.grid.steady > outputs/gcc.svg
43
../../scripts/grid_thermal_map.py ev6.flp outputs/gcc_layer0.grid.steady outputs/gcc.png
44
45
# HotSpot also provides the `-grid_transient_file <file>` option to view
46
# transient grid temperatures
47
48
# Since the grid model aggregates the finer grid temperatures into
49
# per-block temperatures, HotSpot provides a choice to the user in the
50
# mode of aggregation. The user can select the mapping between the grid
51
# and block temperatures of the grid model through the command line
52
# option '-grid_map_mode <mode>'. The four mapping modes supported are:
53
# 'min', 'max', 'avg' and 'center'. The first three options respectively
54
# mean that the block's temperature is computed as the minimum, maximum,
55
# or average temperature of the grid cells in it. The 'center' option
56
# means that the block's temperature is given by the temperature of the
57
# grid cell at its center. You can change the `grid_map_mode` in `example.config`
58
59
# HotSpot also models the secondary heat transfer path from the silicon
60
# to on-chip interconnect layers, C4 pads, packaging substrate, solder
61
# balls and printed-circuit board. In most cases when there is a heatsink
62
# with forced air-convection, the effect of secondary heat transfer path
63
# can be neglected. For special cases such as exposing silicon die to an
64
# oil flow for infrared thermal measurements, secondary heat transfer
65
# path should not be omitted. This feature is only available with the grid model.
66
# Here is an example of how to enable the secondary heat flow path:
67
#../../hotspot -c example.config -materials_file example.materials -f ev6.flp -p gcc.ptrace -model_type grid -model_secondary 1 -grid_steady_file outputs/gcc.grid.steady
68
69