Use key "addressmapping" instead of "CONGEN" in addressmapping configs

This commit is contained in:
2023-03-17 14:01:17 +01:00
parent b0d7e4a18b
commit a49afa40eb
64 changed files with 227 additions and 241 deletions

View File

@@ -1,54 +1,52 @@
{
"simulation": {
"addressmapping": {
"CONGEN": {
"BANKGROUP_BIT": [
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32
],
"BANK_BIT": [
13,
14,
15
],
"BYTE_BIT": [
0,
1
],
"COLUMN_BIT": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"RANK_BIT": [
33
],
"ROW_BIT": [
16
]
}
"BANKGROUP_BIT": [
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32
],
"BANK_BIT": [
13,
14,
15
],
"BYTE_BIT": [
0,
1
],
"COLUMN_BIT": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"RANK_BIT": [
33
],
"ROW_BIT": [
16
]
},
"mcconfig": {
"Arbiter": "Simple",

View File

@@ -1,5 +1,5 @@
{
"CONGEN": {
"addressmapping": {
"BYTE_BIT": [
0,
1

View File

@@ -63,15 +63,15 @@ protected:
static DRAMSys::Config::RowHammer createTraceHammer();
DRAMSys::Config::AddressMapping addressMapping{
{{{0, 1}},
{{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}},
{{16}},
{{13, 14, 15}},
{{17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}},
{{33}},
std::nullopt,
std::nullopt,
std::nullopt}};
{{0, 1}},
{{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}},
{{16}},
{{13, 14, 15}},
{{17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}},
{{33}},
std::nullopt,
std::nullopt,
std::nullopt};
DRAMSys::Config::McConfig mcConfig{PagePolicyType::Open,
SchedulerType::FrFcfs,
@@ -439,7 +439,7 @@ TEST_F(ConfigurationTest, AddressMapping)
{
std::string_view addressmapping_string = R"(
{
"CONGEN": {
"addressmapping": {
"BANKGROUP_BIT": [
17,
18,
@@ -491,7 +491,8 @@ TEST_F(ConfigurationTest, AddressMapping)
)";
json_t addressmapping_reference = json_t::parse(addressmapping_string);
json_t addressmapping_test = addressMapping;
json_t addressmapping_test;
addressmapping_test[AddressMapping::KEY] = addressMapping;
EXPECT_EQ(addressmapping_test, addressmapping_reference);
}

View File

@@ -102,7 +102,7 @@ inline constexpr std::string_view memSpecJsonString = R"(
inline constexpr std::string_view addressMappingJsonString = R"(
{
"CONGEN": {
"addressmapping": {
"BYTE_BIT": [
0
],

View File

@@ -44,7 +44,7 @@ class AddressDecoderFixture : public ::testing::Test
{
protected:
AddressDecoderFixture() :
addressMappingJson(nlohmann::json::parse(addressMappingJsonString)),
addressMappingJson(nlohmann::json::parse(addressMappingJsonString).at("addressmapping")),
memSpecJson(nlohmann::json::parse(memSpecJsonString).at("memspec")),
addressMappingConfig(addressMappingJson.get<DRAMSys::Config::AddressMapping>()),
memSpec(memSpecConfig),

View File

@@ -1,50 +1,48 @@
{
"simulation": {
"addressmapping": {
"CONGEN": {
"BANKGROUP_BIT": [
28,
29
],
"BANK_BIT": [
30,
31
],
"BYTE_BIT": [
0,
1,
2
],
"COLUMN_BIT": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"ROW_BIT": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
]
}
"BANKGROUP_BIT": [
28,
29
],
"BANK_BIT": [
30,
31
],
"BYTE_BIT": [
0,
1,
2
],
"COLUMN_BIT": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"ROW_BIT": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
]
},
"mcconfig": {
"Arbiter": "Simple",

View File

@@ -1,50 +1,48 @@
{
"simulation": {
"addressmapping": {
"CONGEN": {
"BANKGROUP_BIT": [
28,
29
],
"BANK_BIT": [
30,
31
],
"BYTE_BIT": [
0,
1,
2
],
"COLUMN_BIT": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"ROW_BIT": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
]
}
"BANKGROUP_BIT": [
28,
29
],
"BANK_BIT": [
30,
31
],
"BYTE_BIT": [
0,
1,
2
],
"COLUMN_BIT": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"ROW_BIT": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
]
},
"mcconfig": {
"Arbiter": "Simple",