Use key "addressmapping" instead of "CONGEN" in addressmapping configs
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"CONGEN": {
|
||||
"addressmapping": {
|
||||
"BYTE_BIT": [
|
||||
0,
|
||||
1
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user