From dc280ee6b139c85657ca70b5debf61f87d443cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Thu, 13 Sep 2018 15:35:19 +0200 Subject: [PATCH] Displaying memory info on startup --- .../controller/core/configuration/Configuration.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DRAMSys/library/src/controller/core/configuration/Configuration.cpp b/DRAMSys/library/src/controller/core/configuration/Configuration.cpp index f8c8493f..50f5d563 100644 --- a/DRAMSys/library/src/controller/core/configuration/Configuration.cpp +++ b/DRAMSys/library/src/controller/core/configuration/Configuration.cpp @@ -359,6 +359,18 @@ std::uint64_t Configuration::getSimMemSizeInBytes() std::uint64_t chipSize = chipBitSize / 8; // 4. Total memory size in Bytes of one DIMM (with only support of 1 rank on a DIMM) std::uint64_t memorySize = chipSize * NumberOfDevicesOnDIMM; + + std::cout << headline << std::endl << std::endl; + std::cout << std::setw(24) << "Memory size in bytes : " << memorySize << std::endl; + std::cout << std::setw(24) << "Number of banks : " << banks << std::endl; + std::cout << std::setw(24) << "Number of rows : " << rows << std::endl; + std::cout << std::setw(24) << "Number of columns : " << columns << std::endl; + std::cout << std::setw(24) << "Chip data bus width : " << bitWidth << std::endl; + std::cout << std::setw(24) << "Chip size in bits : " << chipBitSize << std::endl; + std::cout << std::setw(24) << "Chip Size in bytes : " << chipSize << std::endl; + std::cout << std::setw(24) << "Devices/Chips on DIMM: " << NumberOfDevicesOnDIMM << std::endl; + std::cout << std::endl; + assert(memorySize > 0); return memorySize; }