Displaying memory info on startup

This commit is contained in:
Éder F. Zulian
2018-09-13 15:35:19 +02:00
parent 353e139bb9
commit dc280ee6b1

View File

@@ -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;
}