From f92d976552f94fc463041ce3fe39e5e18e1dffd0 Mon Sep 17 00:00:00 2001 From: scorrea Date: Mon, 11 May 2020 16:23:39 +0200 Subject: [PATCH] Address Mapping using json/CONGEN file. --- .../configs/amconfigs/congen_extended.json | 50 +++++ .../resources/simulations/ddr3-example.xml | 2 +- DRAMSys/library/src/common/AddressDecoder.cpp | 179 ++++++------------ DRAMSys/library/src/common/AddressDecoder.h | 53 +----- .../src/configuration/ConfigurationLoader.h | 2 +- 5 files changed, 123 insertions(+), 163 deletions(-) create mode 100644 DRAMSys/library/resources/configs/amconfigs/congen_extended.json diff --git a/DRAMSys/library/resources/configs/amconfigs/congen_extended.json b/DRAMSys/library/resources/configs/amconfigs/congen_extended.json new file mode 100644 index 00000000..80e3450f --- /dev/null +++ b/DRAMSys/library/resources/configs/amconfigs/congen_extended.json @@ -0,0 +1,50 @@ +{ + "CONGEN": [{ + "XOR":[ + { + "FIRST":13, + "SECOND":16 + } + ], + "BYTE_BIT": [ + 0, + 1, + 2 + ], + "COLUMN_BIT": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12 + ], + "BANK_BIT": [ + 13, + 14, + 15 + ], + "ROW_BIT": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "ID": 0 + } + ] +} diff --git a/DRAMSys/library/resources/simulations/ddr3-example.xml b/DRAMSys/library/resources/simulations/ddr3-example.xml index bd1fb7c2..afdc7781 100644 --- a/DRAMSys/library/resources/simulations/ddr3-example.xml +++ b/DRAMSys/library/resources/simulations/ddr3-example.xml @@ -8,7 +8,7 @@ - +