Added simple CI test example for ddr3
This commit is contained in:
@@ -2,4 +2,5 @@ example_ddr3:
|
||||
stage: simple-runs
|
||||
script:
|
||||
- cd build/simulator
|
||||
- ./DRAMSys
|
||||
- ./DRAMSys ../../DRAMSys/tests/example_ddr3/simulations/ddr3-example.xml ../../DRAMSys/tests/example_ddr3/
|
||||
- if [[ $(sqldiff ../../DRAMSys/tests/example_ddr3/ddr3-example_ddr3_ch0.tdb ddr3-example_ddr3_ch0.tdb) ]]; then false ; else true ;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
DDR3 Example:
|
||||
1GB x64 DIMM with: 8 * 1 Gb x8 Devices (e.g. Micron MT41J128M8) with Page Size: 1KB
|
||||
|
||||
Device Characteristics:
|
||||
|
||||
Rows: 16 K [13:0] -> 14 bit
|
||||
Bank: 8 [2:0] -> 3 bit
|
||||
Cols: 1 K [9:0] -> 10 bit
|
||||
|
||||
Due to the DIMM we have a Byte Offset Y
|
||||
|
||||
2 2 2 | 2 2 2 2 2 2 2 1 1 1 1 1 1 1 | 1 1 1
|
||||
9 8 7 | 6 5 4 3 2 1 0 9 8 7 6 5 4 3 | 2 1 0 9 8 7 6 5 4 3 | 2 1 0
|
||||
B B B | R R R R R R R R R R R R R R | C C C C C C C C C C | Y Y Y
|
||||
-->
|
||||
|
||||
<addressmapping>
|
||||
<channel from="128" to="128" /> <!-- only one channel -->
|
||||
<bank from="27" to="29" />
|
||||
<row from="13" to="26" />
|
||||
<column from="3" to="12" />
|
||||
<bytes from="0" to="2" />
|
||||
</addressmapping>
|
||||
|
||||
50
DRAMSys/tests/ddr3-example/configs/mcconfigs/fifoStrict.xml
Normal file
50
DRAMSys/tests/ddr3-example/configs/mcconfigs/fifoStrict.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<mcconfig>
|
||||
<OpenPagePolicy value="1" />
|
||||
<MaxNrOfTransactions value="8" />
|
||||
<Scheduler value="FIFO_STRICT" />
|
||||
<Capsize value="5" />
|
||||
<!-- 4 Modes: NoPowerDown, Staggered, TimeoutPDN, TimeoutSREF -->
|
||||
<PowerDownMode value="NoPowerDown" />
|
||||
<PowerDownTimeout value="100" />
|
||||
<!-- Bankwise -->
|
||||
<BankwiseLogic value="0"/>
|
||||
<!-- Refresh yes, no -->
|
||||
<ControllerCoreRefDisable value="0"/>
|
||||
<!-- Refresh Mode. 1: 1X, 2: 2X, 4: 4X (e.g., DDR4) -->
|
||||
<ControllerCoreRefMode value="1"/>
|
||||
<!-- Number of AR commands in a tREFI in 1X mode -->
|
||||
<ControllerCoreRefNumARCmdsIntREFI value="8192"/>
|
||||
<!-- RGR -->
|
||||
<ControllerCoreRGR value="0"/>
|
||||
<ControllerCoreRGRRowInc value="1"/>
|
||||
<!-- Banks to be refreshed in RGR mode. 1: yes, 0: no (max. 16 banks) -->
|
||||
<ControllerCoreRGRB0 value="1"/>
|
||||
<ControllerCoreRGRB1 value="1"/>
|
||||
<ControllerCoreRGRB2 value="1"/>
|
||||
<ControllerCoreRGRB3 value="1"/>
|
||||
<ControllerCoreRGRB4 value="1"/>
|
||||
<ControllerCoreRGRB5 value="1"/>
|
||||
<ControllerCoreRGRB6 value="1"/>
|
||||
<ControllerCoreRGRB7 value="1"/>
|
||||
<ControllerCoreRGRB8 value="0"/>
|
||||
<ControllerCoreRGRB9 value="0"/>
|
||||
<ControllerCoreRGRB10 value="0"/>
|
||||
<ControllerCoreRGRB11 value="0"/>
|
||||
<ControllerCoreRGRB12 value="0"/>
|
||||
<ControllerCoreRGRB13 value="0"/>
|
||||
<ControllerCoreRGRB14 value="0"/>
|
||||
<ControllerCoreRGRB15 value="0"/>
|
||||
<!-- Timings for RGR normal or optimal values -->
|
||||
<ControllerCoreRGRtRASBInClkCycles value="22"/>
|
||||
<ControllerCoreRGRtRRDB_LInClkCycles value="2"/>
|
||||
<ControllerCoreRGRtRRDB_SInClkCycles value="2"/>
|
||||
<ControllerCoreRGRtRPBInClkCycles value="15"/>
|
||||
<ControllerCoreRGRtRCBInClkCycles value="37"/>
|
||||
<ControllerCoreRGRtFAWBInClkCycles value="0"/>
|
||||
<!-- Postpone, pull-in -->
|
||||
<ControllerCoreRefEnablePostpone value="0"/>
|
||||
<ControllerCoreRefEnablePullIn value="0"/>
|
||||
<ControllerCoreRefMaxPostponed value="8"/>
|
||||
<ControllerCoreRefMaxPulledIn value="8"/>
|
||||
<ControllerCoreRefForceMaxPostponeBurst value="0"/>
|
||||
</mcconfig>
|
||||
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE memspec SYSTEM "memspec.dtd">
|
||||
<memspec>
|
||||
|
||||
<parameter id="memoryId" type="string" value="MICRON_1Gb_DDR3-1600_8bit_G" />
|
||||
<parameter id="memoryType" type="string" value="DDR3" />
|
||||
<memarchitecturespec>
|
||||
<parameter id="width" type="uint" value="8" />
|
||||
<parameter id="nbrOfBanks" type="uint" value="8" />
|
||||
<parameter id="nbrOfRanks" type="uint" value="1" />
|
||||
<parameter id="nbrOfColumns" type="uint" value="1024" />
|
||||
<parameter id="nbrOfRows" type="uint" value="16384" />
|
||||
<parameter id="dataRate" type="uint" value="2" />
|
||||
<parameter id="burstLength" type="uint" value="8" />
|
||||
</memarchitecturespec>
|
||||
<memtimingspec>
|
||||
<parameter id="clkMhz" type="double" value="800" />
|
||||
<parameter id="RC" type="uint" value="38" />
|
||||
<parameter id="RCD" type="uint" value="10" />
|
||||
<parameter id="RL" type="uint" value="10" />
|
||||
<parameter id="RP" type="uint" value="10" />
|
||||
<parameter id="RFC" type="uint" value="88" />
|
||||
<parameter id="RAS" type="uint" value="28" />
|
||||
<parameter id="WL" type="uint" value="8" />
|
||||
<parameter id="AL" type="uint" value="0" />
|
||||
<parameter id="DQSCK" type="uint" value="0" />
|
||||
<parameter id="RTP" type="uint" value="6" />
|
||||
<parameter id="WR" type="uint" value="12" />
|
||||
<parameter id="XP" type="uint" value="6" />
|
||||
<parameter id="XPDLL" type="uint" value="20" />
|
||||
<parameter id="XS" type="uint" value="96" />
|
||||
<parameter id="XSDLL" type="uint" value="512" />
|
||||
<parameter id="REFI" type="uint" value="6240" />
|
||||
<parameter id="CL" type="uint" value="10" />
|
||||
<parameter id="FAW" type="uint" value="24" />
|
||||
<parameter id="RRD" type="uint" value="5" />
|
||||
<parameter id="CCD" type="uint" value="4" />
|
||||
<parameter id="WTR" type="uint" value="6" />
|
||||
<parameter id="CKE" type="uint" value="3" />
|
||||
<parameter id="CKESR" type="uint" value="4" />
|
||||
</memtimingspec>
|
||||
<mempowerspec>
|
||||
<parameter id="idd0" type="double" value="70.0" />
|
||||
<parameter id="idd2p0" type="double" value="12.0" />
|
||||
<parameter id="idd2p1" type="double" value="30.0" />
|
||||
<parameter id="idd2n" type="double" value="45.0" />
|
||||
<parameter id="idd3p0" type="double" value="35.0" />
|
||||
<parameter id="idd3p1" type="double" value="35.0" />
|
||||
<parameter id="idd3n" type="double" value="45.0" />
|
||||
<parameter id="idd4w" type="double" value="145.0" />
|
||||
<parameter id="idd4r" type="double" value="140.0" />
|
||||
<parameter id="idd5" type="double" value="170.0" />
|
||||
<parameter id="idd6" type="double" value="8.0" />
|
||||
<parameter id="vdd" type="double" value="1.5" />
|
||||
</mempowerspec>
|
||||
</memspec>
|
||||
29
DRAMSys/tests/ddr3-example/configs/simulator/ddr3.xml
Normal file
29
DRAMSys/tests/ddr3-example/configs/simulator/ddr3.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<simconfig>
|
||||
<SimulationName value="ddr3" />
|
||||
<Debug value="0" />
|
||||
<DatabaseRecording value="1" />
|
||||
<PowerAnalysis value="1" />
|
||||
<EnableWindowing value = "1" />
|
||||
<WindowSize value="1000" />
|
||||
<ThermalSimulation value="0"/>
|
||||
<SimulationProgressBar value="1"/>
|
||||
<NumberOfMemChannels value="1"/>
|
||||
<NumberOfDevicesOnDIMM value = "8" />
|
||||
<CheckTLM2Protocol value = "0" />
|
||||
<AddressOffset value = "0" />
|
||||
<ECCControllerMode value = "Disabled" />
|
||||
<ErrorChipSeed value="42" />
|
||||
<ErrorCSVFile value="" />
|
||||
<!-- Modes:
|
||||
- NoStorage,
|
||||
- Store (store data without errormodel),
|
||||
- ErrorModel (store data with errormodel)
|
||||
-->
|
||||
<StoreMode value="NoStorage" />
|
||||
<!-- Gem5 Related Configuration:
|
||||
In the memory controller file the storage mode should be set to Store
|
||||
E.g. the DRAM is located at 0x80000000 for gem5
|
||||
<AddressOffset value = "2147483648" />
|
||||
-->
|
||||
<UseMalloc value="0" />
|
||||
</simconfig>
|
||||
14
DRAMSys/tests/ddr3-example/configs/thermalsim/config.xml
Normal file
14
DRAMSys/tests/ddr3-example/configs/thermalsim/config.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<!-- Temperature Simulator Configuration (used for all simulation setups) -->
|
||||
<thermalsimconfig>
|
||||
<TemperatureScale value="Celsius" />
|
||||
<StaticTemperatureDefaultValue value="89" />
|
||||
<ThermalSimPeriod value="100" />
|
||||
<ThermalSimUnit value="us" />
|
||||
<PowerInfoFile value="powerInfo.xml"/>
|
||||
<IceServerIp value="127.0.0.1" />
|
||||
<IceServerPort value="11880" />
|
||||
<SimPeriodAdjustFactor value="10" />
|
||||
<NPowStableCyclesToIncreasePeriod value="5" />
|
||||
<GenerateTemperatureMap value="1" />
|
||||
<GeneratePowerMap value="1" />
|
||||
</thermalsimconfig>
|
||||
45
DRAMSys/tests/ddr3-example/configs/thermalsim/core.flp
Executable file
45
DRAMSys/tests/ddr3-example/configs/thermalsim/core.flp
Executable 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 ;
|
||||
|
||||
16
DRAMSys/tests/ddr3-example/configs/thermalsim/mem.flp
Executable file
16
DRAMSys/tests/ddr3-example/configs/thermalsim/mem.flp
Executable 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 ;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<powerInfo>
|
||||
<!-- 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>
|
||||
|
||||
49
DRAMSys/tests/ddr3-example/configs/thermalsim/stack.stk
Executable file
49
DRAMSys/tests/ddr3-example/configs/thermalsim/stack.stk
Executable file
@@ -0,0 +1,49 @@
|
||||
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 ;
|
||||
|
||||
top heat sink :
|
||||
//sink height 1e03, area 100e06, material COPPER ;
|
||||
//spreader height 0.5e03, area 70e06, material SILICON ;
|
||||
heat transfer coefficient 1.3e-09 ;
|
||||
temperature 318.15 ;
|
||||
dimensions :
|
||||
chip length 6100, width 10600 ;
|
||||
cell length 100, width 100 ;
|
||||
|
||||
|
||||
layer PCB :
|
||||
height 10 ;
|
||||
material BEOL ;
|
||||
|
||||
die DRAM :
|
||||
layer 58.5 SILICON ;
|
||||
source 2 SILICON ;
|
||||
layer 1.5 BEOL ;
|
||||
layer 58.5 SILICON ;
|
||||
|
||||
|
||||
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 );
|
||||
Tmap (DRAM_DIE, "output1.txt", slot) ;
|
||||
Pmap (DRAM_DIE, "output2.txt", slot) ;
|
||||
|
||||
73
DRAMSys/tests/ddr3-example/scripts/createTraceDB.sql
Normal file
73
DRAMSys/tests/ddr3-example/scripts/createTraceDB.sql
Normal file
@@ -0,0 +1,73 @@
|
||||
DROP TABLE IF EXISTS Phases;
|
||||
DROP TABLE IF EXISTS GeneralInfo;
|
||||
DROP TABLE IF EXISTS Comments;
|
||||
DROP TABLE IF EXISTS ranges;
|
||||
DROP TABLE IF EXISTS Transactions;
|
||||
DROP TABLE IF EXISTS DebugMessages;
|
||||
DROP TABLE IF EXISTS Power;
|
||||
|
||||
CREATE TABLE Phases(
|
||||
ID INTEGER PRIMARY KEY,
|
||||
PhaseName TEXT,
|
||||
PhaseBegin INTEGER,
|
||||
PhaseEnd INTEGER,
|
||||
Transact INTEGER
|
||||
);
|
||||
|
||||
CREATE TABLE GeneralInfo(
|
||||
NumberOfTransactions INTEGER,
|
||||
TraceEnd INTEGER,
|
||||
NumberOfBanks INTEGER,
|
||||
clk INTEGER,
|
||||
UnitOfTime TEXT,
|
||||
MCconfig TEXT,
|
||||
Memspec TEXT,
|
||||
Traces TEXT,
|
||||
WindowSize INTEGER,
|
||||
FlexibleRefresh INTEGER,
|
||||
MaxRefBurst INTEGER,
|
||||
ControllerThread INTEGER
|
||||
);
|
||||
|
||||
CREATE TABLE Power(
|
||||
time DOUBLE,
|
||||
AveragePower DOUBLE
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE Comments(
|
||||
Time INTEGER,
|
||||
Text TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE DebugMessages(
|
||||
Time INTEGER,
|
||||
Message TEXT
|
||||
);
|
||||
|
||||
-- use SQLITE R* TREE Module to make queries on timespans effecient (see http://www.sqlite.org/rtree.html)
|
||||
CREATE VIRTUAL TABLE ranges USING rtree(
|
||||
id,
|
||||
begin, end
|
||||
);
|
||||
|
||||
CREATE TABLE Transactions(
|
||||
ID INTEGER,
|
||||
Range INTEGER,
|
||||
Address INTEGER,
|
||||
Burstlength INTEGER,
|
||||
TThread INTEGER,
|
||||
TChannel INTEGER,
|
||||
TBank INTEGER,
|
||||
TBankgroup INTEGER,
|
||||
TRow INTEGER,
|
||||
TColumn INTEGER,
|
||||
DataStrobeBegin INTEGER,
|
||||
DataStrobeEnd INTEGER,
|
||||
TimeOfGeneration INTEGER,
|
||||
Command TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX ranges_index ON Transactions(Range);
|
||||
CREATE INDEX "phasesTransactions" ON "Phases" ("Transact" ASC);
|
||||
CREATE INDEX "messageTimes" ON "DebugMessages" ("Time" ASC);
|
||||
25
DRAMSys/tests/ddr3-example/simulations/ddr3-example.xml
Normal file
25
DRAMSys/tests/ddr3-example/simulations/ddr3-example.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<simulation>
|
||||
<!-- Simulation file identifier -->
|
||||
<simulationid id="ddr3-example"></simulationid>
|
||||
<!-- Configuration for the DRAMSys Simulator -->
|
||||
<simconfig src="ddr3.xml" />
|
||||
<!-- Temperature Simulator Configuration -->
|
||||
<thermalconfig src="config.xml" />
|
||||
<!-- Memory Device Specification: Which Device is on the DDR3 DIMM -->
|
||||
<memspec src="MICRON_1Gb_DDR3-1600_8bit_G.xml"></memspec>
|
||||
<!-- Addressmapping Configuration of the Memory Controller -->
|
||||
<addressmapping src="am_ddr3_8x1Gbx8_dimm_p1KB_brc.xml"></addressmapping>
|
||||
<!-- Memory Controller Configuration: -->
|
||||
<mcconfig src="fifoStrict.xml"/>
|
||||
<!--
|
||||
The following trace setup is only used in standalone mode.
|
||||
In library mode e.g. in Platform Architect the trace setup is ignored.
|
||||
-->
|
||||
<tracesetup>
|
||||
<!--
|
||||
This device mimics an image processing application
|
||||
running on an FPGA with 200 Mhz.
|
||||
-->
|
||||
<device clkMhz="200">ddr3_example.stl</device>
|
||||
</tracesetup>
|
||||
</simulation>
|
||||
Reference in New Issue
Block a user