Simple usage example

This commit is contained in:
Éder F. Zulian
2015-10-13 16:55:00 +02:00
parent abacc48a6c
commit 3d7b7793fd
10 changed files with 228 additions and 43 deletions

View File

@@ -9,7 +9,7 @@
<!-- Error Model: -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<ErrorStoreMode value="ErrorModel" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!--
<Buswidth value="128" />
<ReadWriteGrouping value="false" />

View File

@@ -0,0 +1,45 @@
CPUs :
position 0, 0 ;
dimension 2750, 4300 ;
GPU :
position 3350, 0 ;
dimension 2750, 4000 ;
BASEBAND1 :
position 4250, 4000 ;
dimension 1850, 3300 ;
BASEBAND2 :
position 3350, 7300 ;
dimension 2750, 3300 ;
LLCACHE :
position 0, 4300 ;
dimension 1900, 3000 ;
DRAMCTRL1 :
position 1900, 4300 ;
dimension 850, 3000 ;
DRAMCTRL2 :
position 3350, 4000 ;
dimension 900, 3300 ;
TSVS :
position 2750, 2300 ;
dimension 600, 6000 ;
ACELLERATORS :
position 0, 7300 ;
dimension 2750, 3300 ;

View File

@@ -0,0 +1,16 @@
channel0 :
position 150, 100 ;
dimension 2600, 5200 ;
channel1 :
position 3350, 100 ;
dimension 2600, 5200 ;
channel2 :
position 150, 5300 ;
dimension 2600, 5200 ;
channel3 :
position 3350, 5300 ;
dimension 2600, 5200 ;

View File

@@ -1,32 +1,8 @@
<powerInfo>
<CPUs id="0" init_pow="0" threshold="1.0" />
<GPU id="1" init_pow="0" threshold="1.0" />
<BASEBAND1 id="2" init_pow="1" threshold="1.0" />
<BASEBAND2 id="3" init_pow="0" threshold="1.0" />
<LLCACHE id="4" init_pow="0" threshold="1.0" />
<DRAMCTRL1 id="5" init_pow="0" threshold="1.0" />
<DRAMCTRL2 id="6" init_pow="0" threshold="1.0" />
<TSVs id="7" init_pow="0" threshold="1.0" />
<ACELLERATORS id="8" init_pow="0" threshold="1.0" />
<C0 id="9" init_pow="1" threshold="1.0" />
<C1 id="10" init_pow="0" threshold="1.0" />
<C2 id="11" init_pow="0" threshold="1.0" />
<C3 id="12" init_pow="0" threshold="1.0" />
<TSVs id="13" init_pow="0" threshold="1.0" />
<C0 id="14" init_pow="0" threshold="1.0" />
<C1 id="15" init_pow="0" threshold="1.0" />
<C2 id="16" init_pow="0" threshold="1.0" />
<C3 id="17" init_pow="0" threshold="1.0" />
<TSVs id="18" init_pow="0" threshold="1.0" />
<C0 id="19" init_pow="0" threshold="1.0" />
<C1 id="20" init_pow="0" threshold="1.0" />
<C2 id="21" init_pow="0" threshold="1.0" />
<C3 id="22" init_pow="0" threshold="1.0" />
<TSVs id="23" init_pow="0" threshold="1.0" />
<C0 id="24" init_pow="0" threshold="1.0" />
<C1 id="25" init_pow="0" threshold="1.0" />
<C2 id="26" init_pow="0" threshold="1.0" />
<C3 id="27" init_pow="0" threshold="1.0" />
<TSVs id="28" init_pow="0" threshold="1.0" />
<!-- Power information must be provided for all floor plan elements -->
<dram_die_channel0 init_pow="0" threshold="1.0" />
<dram_die_channel1 init_pow="0" threshold="1.0" />
<dram_die_channel2 init_pow="0" threshold="1.0" />
<dram_die_channel3 init_pow="0" threshold="1.0" />
</powerInfo>

View File

@@ -0,0 +1,46 @@
material SILICON :
thermal conductivity 1.30e-4 ;
volumetric heat capacity 1.628e-12 ;
material BEOL :
thermal conductivity 2.25e-6 ;
volumetric heat capacity 2.175e-12 ;
material COPPER :
thermal conductivity 4.01e-04 ;
volumetric heat capacity 3.37e-12 ;
heat sink :
sink height 1e03, area 100e06, material COPPER ;
spreader height 0.5e03, area 70e06, material SILICON ;
heat transfer coefficient 1.3e-09 ;
ambient temperature 318.15 ;
layer PCB :
height 10 ;
material BEOL ;
die DRAM :
layer 58.5 SILICON ;
source 2 SILICON ;
layer 1.5 BEOL ;
layer 58.5 SILICON ;
dimensions :
chip length 6100, width 10600 ;
cell length 100, width 100 ;
stack:
die DRAM_DIE DRAM floorplan "./mem.flp" ;
layer CONN_TO_PCB PCB ;
solver:
transient step 0.01, slot 0.05 ;
initial temperature 300.0 ;
output:
Tflpel(DRAM_DIE.channel0 , "temp_flp_element_ch0.txt" , average , slot );
Tflpel(DRAM_DIE.channel1 , "temp_flp_element_ch1.txt" , average , slot );
Tflpel(DRAM_DIE.channel2 , "temp_flp_element_ch2.txt" , average , slot );
Tflpel(DRAM_DIE.channel3 , "temp_flp_element_ch3.txt" , average , slot );

View File

@@ -4,16 +4,16 @@
<Debug value="1" />
<DatabaseRecording value="1" />
<PowerAnalysis value="1" />
<NumberOfTracePlayers value="4"/>
<NumberOfTracePlayers value="1"/>
<NumberOfMemChannels value="4"/>
<ControllerCoreDisableRefresh value="0"/>
<DynamicTemperatureSimulation value="0"/>
<DynamicTemperatureSimulation value="1"/>
</simconfig>
<!-- Temperature Simulator Configuration (used for all simulation setups) -->
<temperature_simconfig>
<TemperatureScale value="Celsius" />
<StaticTemperatureDefaultValue value="89" />
<StaticTemperatureDefaultValue value="23" />
<DynTemperatureSimPeriod value="100" />
<DynTemperatureSimUnit value="us" />
<PowerInfoFile value="../../DRAMSys/simulator/resources/configs/temperature_sim/powerInfo.xml"/>
@@ -37,7 +37,7 @@
<tracesetups>
<tracesetup id="fifo">
<device clkMhz="200">chstone-adpcm_32.stl</device>
<device clkMhz="1000">../../../tests/error/test_error.stl</device>
</tracesetup>
</tracesetups>

View File

@@ -498,7 +498,16 @@ double errorModel::getTemperature()
// TODO here we need to get the current power value from DRAMPower (and
// make adjusts if necessary) and pass it to the Temperature Controller
// with the correct ID for this device.
double temperature = TemperatureController::getInstance().getTemperature(0, 0);
// FIXME
// make sure the context is set (myChannel has the proper value) before
// requesting the temperature.
double temperature = 89;
if (this->myChannel != -1) {
temperature = TemperatureController::getInstance().getTemperature(this->myChannel, 0);
}
return temperature;
}

View File

@@ -52,6 +52,8 @@ double TemperatureController::temperatureConvert(double tKelvin)
double TemperatureController::getTemperature(int deviceId, float currentPower)
{
printDebugMessage("Temperature requested by device " + std::to_string(deviceId) + " current power is " + std::to_string(currentPower));
if (dynamicTempSimEnabled == true) {
currentPowerValues.at(deviceId) = currentPower;
@@ -72,7 +74,7 @@ void TemperatureController::updateTemperatures()
#ifdef THERMALSIM
thermalSimulation->sendPowerValues(&currentPowerValues);
thermalSimulation->simulate();
thermalSimulation->getTemperature(temperaturesBuffer, TDICE_OUTPUT_INSTANT_SLOT, TDICE_OUTPUT_TYPE_TCELL, TDICE_OUTPUT_QUANTITY_NONE);
thermalSimulation->getTemperature(temperaturesBuffer, TDICE_OUTPUT_INSTANT_SLOT, TDICE_OUTPUT_TYPE_TFLPEL, TDICE_OUTPUT_QUANTITY_AVERAGE);
#endif
// Save values just obtained for posterior use
temperatureValues = temperaturesBuffer;

View File

@@ -71,7 +71,7 @@ public:
thermalSimulation = new IceWrapper(ip, port);
printDebugMessage("Dynamic temperature simulation. Server @ " + ip + ":" + std::to_string(port));
#else
SC_REPORT_FATAL(name(), "Temperature Simulation Disabled");
SC_REPORT_FATAL(name(), "DRAMSys was build without support to dynamic temperature simulation. Check the README file for further details.");
#endif
// Initial power dissipation values (got from config)
currentPowerValues = Configuration::getInstance().temperatureSim.powerInitialValues;

103
README.md
View File

@@ -117,8 +117,8 @@ $ ./traceAnalyzer
Before starting make sure you have a **clean repository** without any previous
automatic generated Makefiles. One way to ensure this is by running the
command below inside your DRAMSys repository, but keep in mind that **all
untracked files will be lost**.
command below inside your DRAMSys repository, but keep in mind that
**untracked files and directories will be removed** from the repository.
``` bash
$ git clean -fdx
@@ -146,13 +146,13 @@ through the network. Therefore users interested in thermal simulation during
their DRAMSys simulations need to make sure they have a 3D-ICE server up and
running before starting.
More information about how to obtain 3D-ICE and its installation can be
obtained in the official website http://esl.epfl.ch/3D-ICE.
More information about how to obtain 3D-ICE and how to intall it can be found
in the official website http://esl.epfl.ch/3D-ICE.
Provided the user fulfilled this installation requisite, before starting
DRAMSys it is necessary to run the 3D-ICE server passing to it two arguments:
a suitable configuration file and an Internet socket port number. And wait
until the server is ready to receive requests.
a suitable configuration file and an Internet socket port number. And then
wait until the server is ready to receive requests.
``` bash
$ 3D-ICE-Server <stack file> <port>
@@ -166,6 +166,97 @@ The IP address and the port number related to the server shall be informed in
DRAMSys' configuration to subsequent use by DRAMSys to access the thermal
simulation server.
#### Usage Example
The DRAMSys' main configuration file is presented below.
``` xml
<simulation>
<!-- General Simulator Configuration (used for all simulation setups) -->
<simconfig>
<Debug value="1" />
<DatabaseRecording value="1" />
<PowerAnalysis value="1" />
<NumberOfTracePlayers value="1"/>
<NumberOfMemChannels value="4"/>
<ControllerCoreDisableRefresh value="0"/>
<DynamicTemperatureSimulation value="1"/>
</simconfig>
<!-- Temperature Simulator Configuration (used for all simulation setups) -->
<temperature_simconfig>
<TemperatureScale value="Celsius" />
<StaticTemperatureDefaultValue value="23" />
<DynTemperatureSimPeriod value="100" />
<DynTemperatureSimUnit value="us" />
<PowerInfoFile value="../../DRAMSys/simulator/resources/configs/temperature_sim/powerInfo.xml"/>
<IceServerIp value="127.0.0.1" />
<IceServerPort value="11880" />
<SimPeriodAdjustFactor value="10" />
<NPowStableCyclesToIncreasePeriod value="5" />
</temperature_simconfig>
<memspecs>
<memspec src="../../DRAMSys/simulator/resources/configs/memspecs/WideIO.xml"></memspec>
</memspecs>
<addressmappings>
<addressmapping src="../../DRAMSys/simulator/resources/configs/amconfigs/am_wideio.xml"></addressmapping>
</addressmappings>
<memconfigs>
<memconfig src="../../DRAMSys/simulator/resources/configs/memconfigs/fr_fcfs.xml"/>
</memconfigs>
<tracesetups>
<tracesetup id="fifo">
<device clkMhz="1000">../../../tests/error/test_error.stl</device>
</tracesetup>
</tracesetups>
</simulation>
```
Enable the error model in fr_fcfs.xml.
``` xml
<memconfig>
<BankwiseLogic value="0"/>
<OpenPagePolicy value="1" />
<MaxNrOfTransactions value="50" />
<Scheduler value="FR_FCFS" />
<Capsize value="5" />
<PowerDownMode value="TimeoutPDN" />
<PowerDownTimeout value="100" />
<!-- Error Model: -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="ErrorModel" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
</memconfig>
```
Generate the input trace file for DRAMSys.
``` bash
$ cd DRAMSys/tests/error/
$ ./generateErrorTest.pl > test_error.stl
```
Start the 3D-ICE server providing the stack file and the port number.
``` bash
$ cd DRAMSys/simulator/resources/configs/temperature_sim
$ 3D-ICE-Server stack.stk 11880
```
In another terminal or terminal tab start DRAMSys. Here the program's output
is redirected to a file.
``` bash
$ cd build/simulator/
$ ./dramSys > output
```
### DRAMSys Configuration
The **dramSys** executable supports one argument which is a XML file that