From 12f585728de6e891c331067f1bbb440197459445 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Feb 2026 02:08:43 -0800 Subject: [PATCH 1/5] replaces C++11 optional types with mandatory ones --- src/interfaces/eth/eth_tlm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/eth/eth_tlm.h b/src/interfaces/eth/eth_tlm.h index b36153dc..1df0b383 100644 --- a/src/interfaces/eth/eth_tlm.h +++ b/src/interfaces/eth/eth_tlm.h @@ -90,7 +90,7 @@ struct eth_packet_payload : public tlm::nw::tlm_network_payload { sc_core::sc_time sender_clk_period{sc_core::SC_ZERO_TIME}; static uint64_t get_id() { - static std::atomic_uint64_t id{0}; + static std::atomic id{0}; return id.fetch_add(1); } }; From 01912db2087b202678b280edd6a9c4d2eccf4b61 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Feb 2026 06:40:43 -0800 Subject: [PATCH 2/5] makes use of fmt in memory_map_collector private --- src/sysc/CMakeLists.txt | 1 + src/sysc/tlm/scc/memory_map_collector.cpp | 33 +++++++++++++++++++++++ src/sysc/tlm/scc/memory_map_collector.h | 15 +++-------- 3 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 src/sysc/tlm/scc/memory_map_collector.cpp diff --git a/src/sysc/CMakeLists.txt b/src/sysc/CMakeLists.txt index 4e6a8298..ed2fb3e7 100644 --- a/src/sysc/CMakeLists.txt +++ b/src/sysc/CMakeLists.txt @@ -49,6 +49,7 @@ set(LIB_SOURCES tlm/scc/scv/tlm_recorder.cpp tlm/scc/pe/parallel_pe.cpp tlm/scc/lwtr/tlm2_lwtr.cpp + tlm/scc/memory_map_collector.cpp ) if(DEFINED SC_VERSION_MAJOR AND SC_VERSION_MAJOR GREATER 2) diff --git a/src/sysc/tlm/scc/memory_map_collector.cpp b/src/sysc/tlm/scc/memory_map_collector.cpp new file mode 100644 index 00000000..d029d438 --- /dev/null +++ b/src/sysc/tlm/scc/memory_map_collector.cpp @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2026 MINRES Technologies GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ + + +#include "memory_map_collector.h" +#include + +namespace tlm { +namespace scc { +std::string memory_node::to_string(const std::string &prefix) const { + std::ostringstream os; + std::string filler(16 - prefix.length(), ' '); + os << fmt::format("{} 0x{:016x}:0x{:016x}{}{}\n", prefix, start, end, filler, name); + for (auto e : elemets) + os << e.to_string(prefix + " "); + return os.str(); +} + +} // namespace scc +} // namespace tlm diff --git a/src/sysc/tlm/scc/memory_map_collector.h b/src/sysc/tlm/scc/memory_map_collector.h index 08f4f3bf..1bcd68f7 100644 --- a/src/sysc/tlm/scc/memory_map_collector.h +++ b/src/sysc/tlm/scc/memory_map_collector.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright 2016, 2018 MINRES Technologies GmbH + * Copyright 2026 MINRES Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ #define _TLM_SCC_MEMORY_MAP_COLLECTOR_H_ #include -#include #include #include #include @@ -38,14 +37,7 @@ struct memory_node { : start(start) , end(end) {} memory_node() = default; - std::string to_string(std::string const& prefix = "") const { - std::ostringstream os; - std::string filler(16 - prefix.length(), ' '); - os << fmt::format("{} 0x{:016x}:0x{:016x}{}{}\n", prefix, start, end, filler, name); - for(auto e : elemets) - os << e.to_string(prefix + " "); - return os.str(); - } + std::string to_string(const std::string &prefix = "") const; }; struct memory_map_extension : tlm::tlm_extension { @@ -70,6 +62,7 @@ memory_node gather_memory(sc_core::sc_port_b>& p trans.set_extension(nullptr); return std::move(root); } + } // namespace scc } // namespace tlm -#endif // _TLM_SCC_MEMORY_MAP_COLLECTOR_H_ \ No newline at end of file +#endif // _TLM_SCC_MEMORY_MAP_COLLECTOR_H_ From 2e2fce7aea140c2893f7839d9cd3a1b3bdeb6827 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Feb 2026 07:00:33 -0800 Subject: [PATCH 3/5] removes unusde include in memory_map_collector --- src/sysc/tlm/scc/memory_map_collector.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sysc/tlm/scc/memory_map_collector.h b/src/sysc/tlm/scc/memory_map_collector.h index 1bcd68f7..0382ac9e 100644 --- a/src/sysc/tlm/scc/memory_map_collector.h +++ b/src/sysc/tlm/scc/memory_map_collector.h @@ -22,7 +22,6 @@ #include #include #include -#include //! @brief SystemC TLM namespace tlm { From 49918aae65265efa33c6aa94b54fb12aa5838ae0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 19 Feb 2026 16:13:31 +0100 Subject: [PATCH 4/5] Update memory_map_collector.h fixes formatting issue --- src/sysc/tlm/scc/memory_map_collector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysc/tlm/scc/memory_map_collector.h b/src/sysc/tlm/scc/memory_map_collector.h index 0382ac9e..eecd87a2 100644 --- a/src/sysc/tlm/scc/memory_map_collector.h +++ b/src/sysc/tlm/scc/memory_map_collector.h @@ -36,7 +36,7 @@ struct memory_node { : start(start) , end(end) {} memory_node() = default; - std::string to_string(const std::string &prefix = "") const; + std::string to_string(const std::string& prefix = "") const; }; struct memory_map_extension : tlm::tlm_extension { From 1633b5e0985b6d9d4b875a5bc0ecdbbc44762ff6 Mon Sep 17 00:00:00 2001 From: hliu71 Date: Mon, 23 Feb 2026 03:48:25 -0800 Subject: [PATCH 5/5] fixes for trywait for ordered_semaphore --- src/sysc/scc/ordered_semaphore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysc/scc/ordered_semaphore.cpp b/src/sysc/scc/ordered_semaphore.cpp index f1578eeb..4b6b8078 100644 --- a/src/sysc/scc/ordered_semaphore.cpp +++ b/src/sysc/scc/ordered_semaphore.cpp @@ -102,7 +102,7 @@ auto ordered_semaphore::wait(unsigned priority) -> int { // lock (take) the semaphore, return -1 if not available auto ordered_semaphore::trywait() -> int { - if(in_use()) { + if(value == 0) { return -1; } --value;