From d773abc7ce2d388e3f5d93ffdd2f50ddb993a123 Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Mon, 24 Mar 2025 15:54:28 +0100 Subject: [PATCH] Updated unit tests for HBM2 This is necessary, as recording the phases with tlmRecorders on the bus changed the internal call order in the SystemC kernel. This leads to different IDs in the database --- src/libdramsys/DRAMSys/simulation/DRAMSys.cpp | 6 +++++- .../HBM2/expected/DRAMSys_hbm2-example_hbm2_ch0.tdb | 4 ++-- .../HBM2/expected/DRAMSys_hbm2-example_hbm2_ch1.tdb | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/libdramsys/DRAMSys/simulation/DRAMSys.cpp b/src/libdramsys/DRAMSys/simulation/DRAMSys.cpp index 00d361cf..ba2a93c4 100644 --- a/src/libdramsys/DRAMSys/simulation/DRAMSys.cpp +++ b/src/libdramsys/DRAMSys/simulation/DRAMSys.cpp @@ -165,6 +165,8 @@ DRAMSys::DRAMSys(const sc_core::sc_module_name& name, const Config::Configuratio } // Connect all internal DRAMSys modules: + // If database recording is enabled, then the tlmRecorders are placed + // on the bus between the modules tSocket.bind(arbiter->tSocket); for (unsigned i = 0; i < memSpec->numberOfChannels; i++) { @@ -176,6 +178,7 @@ DRAMSys::DRAMSys(const sc_core::sc_module_name& name, const Config::Configuratio } else if (simConfig.checkTLM2Protocol) { + // Arbiter <--> tlmRecorder <--> Controller arbiter->iSocket.bind(controllersTlmCheckers[i]->target_socket); controllersTlmCheckers[i]->initiator_socket.bind(controllers[i]->tSocket); } @@ -189,14 +192,15 @@ DRAMSys::DRAMSys(const sc_core::sc_module_name& name, const Config::Configuratio arbiter->iSocket.bind(controllers[i]->tSocket); } - // TODO: comments if (simConfig.databaseRecording) { + // Controller <--> tlmRecorder <--> Dram controllers[i]->iSocket.bind(tlmRecordersDram[i]->tSocket); tlmRecordersDram[i]->iSocket.bind(drams[i]->tSocket); } else { + // Controller <--> Dram controllers[i]->iSocket.bind(drams[i]->tSocket); } } diff --git a/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch0.tdb b/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch0.tdb index cbf342c2..72b1a455 100644 --- a/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch0.tdb +++ b/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch0.tdb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c07d0788e550884138f84803c0baf0c634a61ce225698eaedb39f9e828f62c65 -size 675840 +oid sha256:4e1a66644ba415a3821042624586f6ad20a44d6e0c2f999dc6a882d8aa4eda5c +size 692224 diff --git a/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch1.tdb b/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch1.tdb index 1bea7de6..f5cb5cd5 100644 --- a/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch1.tdb +++ b/tests/tests_regression/HBM2/expected/DRAMSys_hbm2-example_hbm2_ch1.tdb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db5321193521e8eb75654a545ba1155b7c707ee993ab67ae96b2639e278fc9d7 -size 684032 +oid sha256:1d12f192bd71465d7dceff8c9eff62865e7eb8b1a9b72ecb6d96af352a54efef +size 700416