Namespace the complete DRAMSys library

This commit is contained in:
2023-05-16 11:27:16 +02:00
parent 50e87b7a63
commit 69cd04c448
164 changed files with 813 additions and 58 deletions

View File

@@ -60,8 +60,8 @@ protected:
DRAMSys::Config::AddressMapping addressMappingConfig;
DRAMSys::Config::MemSpec memSpecConfig;
MemSpecLPDDR5 memSpec;
AddressDecoder addressDecoder;
DRAMSys::MemSpecLPDDR5 memSpec;
DRAMSys::AddressDecoder addressDecoder;
};
TEST_F(AddressDecoderFixture, Decoding)
@@ -96,7 +96,7 @@ TEST_F(AddressDecoderFixture, Encoding)
unsigned int column = 170;
unsigned int byte = 0;
DecodedAddress decodedAddress(channel, rank, bankgroup, bank, row, column, byte);
DRAMSys::DecodedAddress decodedAddress(channel, rank, bankgroup, bank, row, column, byte);
uint64_t address = addressDecoder.encodeAddress(decodedAddress);
EXPECT_EQ(address, 0x3A59'1474);
@@ -111,7 +111,7 @@ TEST_F(AddressDecoderFixture, DeEncoding)
for (auto address: testAddresses)
{
DecodedAddress decodedAddress = addressDecoder.decodeAddress(address);
DRAMSys::DecodedAddress decodedAddress = addressDecoder.decodeAddress(address);
uint64_t encodedAddress = addressDecoder.encodeAddress(decodedAddress);
EXPECT_EQ(encodedAddress, address);

View File

@@ -39,5 +39,5 @@
TEST(testsuite, test)
{
EXPECT_EQ(Command(Command::Type::ACT).toString(), "ACT");
EXPECT_EQ(DRAMSys::Command(DRAMSys::Command::Type::ACT).toString(), "ACT");
}

View File

@@ -156,13 +156,13 @@ TEST_F(BTransportNoStorage, Warning)
// Try to find the warning string
std::string output = buffer.str();
auto warning_pos = output.find(Dram::BLOCKING_WARNING);
auto warning_pos = output.find(DRAMSys::Dram::BLOCKING_WARNING);
// Warning should be printed once ...
EXPECT_NE(warning_pos, std::string::npos);
// ... but not twice
warning_pos = output.find(Dram::BLOCKING_WARNING, warning_pos + 1);
warning_pos = output.find(DRAMSys::Dram::BLOCKING_WARNING, warning_pos + 1);
EXPECT_EQ(warning_pos, std::string::npos);
// Restore stdout