Files
DRAMSys/tests/tests_dramsys/AddressDecoderConfigs.h

150 lines
3.9 KiB
C++

/*
* Copyright (c) 2022, Technische Universität Kaiserslautern
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors:
* Derek Christ
*/
#pragma once
#include <string>
inline constexpr std::string_view memSpecJsonString = R"(
{
"memspec": {
"memarchitecturespec": {
"burstLength": 16,
"dataRate": 8,
"nbrOfBankGroups": 4,
"nbrOfBanks": 16,
"nbrOfColumns": 1024,
"nbrOfRows": 65536,
"nbrOfRanks": 1,
"nbrOfDevices": 1,
"nbrOfChannels": 1,
"width": 16,
"per2BankOffset": 8
},
"memoryId": "JEDEC_1Gbx16_BG_LPDDR5-6400",
"memoryType": "LPDDR5",
"memtimingspec": {
"RCD": 15,
"PPD": 2,
"RPab": 17,
"RPpb": 15,
"RAS": 34,
"RCab": 51,
"RCpb": 48,
"FAW": 16,
"RRD": 4,
"RL": 17,
"WCK2CK": 0,
"WCK2DQO": 1,
"RBTP": 4,
"RPRE": 0,
"RPST": 0,
"WL": 9,
"WCK2DQI": 0,
"WPRE": 0,
"WPST": 0,
"WR": 28,
"WTR_L": 10,
"WTR_S": 5,
"CCDMW": 16,
"REFI": 3124,
"REFIpb": 390,
"RFCab": 224,
"RFCpb": 112,
"RTRS": 1,
"BL_n_min_16": 2,
"BL_n_max_16": 4,
"BL_n_L_16": 4,
"BL_n_S_16": 2,
"BL_n_min_32": 6,
"BL_n_max_32": 8,
"BL_n_L_32": 8,
"BL_n_S_32": 2,
"pbR2act": 6,
"pbR2pbR": 72,
"clkMhz": 800
}
}
}
)";
inline constexpr std::string_view addressMappingJsonString = R"(
{
"addressmapping": {
"BYTE_BIT": [
0
],
"COLUMN_BIT": [
1,
2,
3,
4,
9,
10,
11,
12,
13,
14
],
"BANKGROUP_BIT": [
5,
6
],
"BANK_BIT": [
7,
8
],
"ROW_BIT": [
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
]
}
}
)";