From d2c8754ab3b72e52a07d62662de0120b941f1ae5 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Sat, 3 Aug 2024 22:49:59 +0100 Subject: [PATCH] mem: Fix name() helper for DRAM rank (#1410) At the moment the method simply returns the rank number. This is not particularly useful when enabling debug flags as the beginning of the line prints something like: 1: whereas it should really be: system.dram.rank1: Change-Id: I0136dc3d182afa4ae2e5a719cb366d8d0f444667 Signed-off-by: Giacomo Travaglini --- src/mem/dram_interface.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mem/dram_interface.hh b/src/mem/dram_interface.hh index 2070a1773b..108678f757 100644 --- a/src/mem/dram_interface.hh +++ b/src/mem/dram_interface.hh @@ -350,7 +350,11 @@ class DRAMInterface : public MemInterface Rank(const DRAMInterfaceParams &_p, int _rank, DRAMInterface& _dram); - const std::string name() const { return csprintf("%d", rank); } + const std::string + name() const + { + return csprintf("%s.rank%d", dram.name(), rank); + } /** * Kick off accounting for power and refresh states and