From 9fc226c83eee5cc165b3dfd7e3ef3d293a21a4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Wed, 9 Nov 2016 22:26:37 +0100 Subject: [PATCH] Single device simulation files. The files added can be used to simulate a single 1Gbx8 DDR3-SDRAM device. For more details refer to the files. --- .../amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml | 22 +++++++ DRAMSys/simulator/resources/resources.pri | 5 +- .../simulations/ddr3-single-device.xml | 58 +++++++++++++++++++ .../core/configuration/Configuration.cpp | 10 ++-- 4 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 DRAMSys/simulator/resources/configs/amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml create mode 100644 DRAMSys/simulator/resources/simulations/ddr3-single-device.xml diff --git a/DRAMSys/simulator/resources/configs/amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml b/DRAMSys/simulator/resources/configs/amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml new file mode 100644 index 00000000..a508caa7 --- /dev/null +++ b/DRAMSys/simulator/resources/configs/amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/DRAMSys/simulator/resources/resources.pri b/DRAMSys/simulator/resources/resources.pri index bd1a5c7a..c647763a 100644 --- a/DRAMSys/simulator/resources/resources.pri +++ b/DRAMSys/simulator/resources/resources.pri @@ -4,6 +4,7 @@ # simulation files OTHER_FILES += resources/simulations/sim-batch.xml OTHER_FILES += resources/simulations/ddr3-example.xml +OTHER_FILES += resources/simulations/ddr3-single-device.xml # scripts OTHER_FILES += resources/scripts/address_scrambler.pl @@ -49,6 +50,7 @@ OTHER_FILES += resources/traces/small.stl OTHER_FILES += resources/traces/chstone-motion_32.stl OTHER_FILES += resources/traces/mediabench-adpcmdecode_32.stl OTHER_FILES += resources/traces/ddr3_example.stl +OTHER_FILES += resources/traces/ddr3_single_dev_example.stl # mcconfigs OTHER_FILES += resources/configs/mcconfigs/fifoStrict.xml @@ -102,8 +104,6 @@ OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_LPDDR3-1333_32bit_A.xml OTHER_FILES += resources/configs/memspecs/MICRON_4Gb_LPDDR3-1600_32bit_A.xml OTHER_FILES += resources/configs/memspecs/SAMSUNG_K4B1G1646E_1Gb_DDR3-1600_16bit.xml - - # address mapping configs OTHER_FILES += resources/configs/amconfigs/am_ddr3.xml OTHER_FILES += resources/configs/amconfigs/am_ddr3_x16_brc.xml @@ -119,6 +119,7 @@ OTHER_FILES += resources/configs/amconfigs/am_wideio.xml OTHER_FILES += resources/configs/amconfigs/am_lowHits.xml OTHER_FILES += resources/configs/amconfigs/am_lowPara.xml OTHER_FILES += resources/configs/amconfigs/am_wideioFourBanks.xml +OTHER_FILES += resources/configs/amconfigs/am_ddr3_1Gbx8_p1KB_brc.xml # thermal simulation configs OTHER_FILES += resources/configs/thermalsim/core.flp diff --git a/DRAMSys/simulator/resources/simulations/ddr3-single-device.xml b/DRAMSys/simulator/resources/simulations/ddr3-single-device.xml new file mode 100644 index 00000000..e6653583 --- /dev/null +++ b/DRAMSys/simulator/resources/simulations/ddr3-single-device.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ddr3_single_dev_example.stl + + + + + diff --git a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp index 62959c6f..c0f3cfb9 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp +++ b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp @@ -257,7 +257,7 @@ unsigned int Configuration::getDataBusWidth() return dataBusWidth; } -// Returns the number of bytes in a burst +// Returns the number of bytes transfered in a burst unsigned int Configuration::getBytesPerBurst() { // First multiply to get the number of bits in a burst, then divide by 8 to get the value in bytes. The order is important. Think on a single x4 device. @@ -266,10 +266,10 @@ unsigned int Configuration::getBytesPerBurst() if (NumberOfDevicesOnDIMM > 1) { // The least significant bits of the physical address are the byte - // offset of the N-byte-wide memory module (a single data word has N - // bytes. N = 2^(# bits for byte offset)). - unsigned int dataWordSizeInBytes = xmlAddressDecoder::getInstance().amount["bytes"]; - assert(bytesPerBurst == (dataWordSizeInBytes * memSpec.BurstLength)); + // offset of the N-byte-wide memory module (DIMM) (a single data word + // or burst element has N bytes. N = 2^(# bits for byte offset)). + unsigned int burstElementSizeInBytes = xmlAddressDecoder::getInstance().amount["bytes"]; + assert(bytesPerBurst == (burstElementSizeInBytes * memSpec.BurstLength)); } return bytesPerBurst;