Skip to content

Commit fffa224

Browse files
committed
router: Add a warning message when a target address is not found
1 parent 00a378f commit fffa224

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/scc/router.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <limits>
2121
#include <scc/utilities.h>
22+
#include <scc/report.h>
2223
#include <sysc/utils/sc_vector.h>
2324
#include <tlm.h>
2425
#include <tlm/scc/initiator_mixin.h>
@@ -249,6 +250,7 @@ void router<BUSWIDTH, TARGET_SOCKET_TYPE>::b_transport(int i, tlm::tlm_generic_p
249250
size_t idx = addr_decoder.getEntry(address);
250251
if(idx == addr_decoder.null_entry) {
251252
if(default_idx == std::numeric_limits<size_t>::max()) {
253+
SCCWARN(SCMOD) << "target address=0x" << std::hex << address << " not found for " << (trans.get_command() == tlm::TLM_READ_COMMAND ? "read" : "write") << " transaction.";
252254
trans.set_response_status(tlm::TLM_ADDRESS_ERROR_RESPONSE);
253255
return;
254256
}
@@ -272,6 +274,7 @@ bool router<BUSWIDTH, TARGET_SOCKET_TYPE>::get_direct_mem_ptr(int i, tlm::tlm_ge
272274
size_t idx = addr_decoder.getEntry(address);
273275
if(idx == addr_decoder.null_entry) {
274276
if(default_idx == std::numeric_limits<size_t>::max()) {
277+
SCCWARN(SCMOD) << "target address=0x" << std::hex << address << " not found for " << (trans.get_command() == tlm::TLM_READ_COMMAND ? "read" : "write") << " transaction.";
275278
trans.set_response_status(tlm::TLM_ADDRESS_ERROR_RESPONSE);
276279
return false;
277280
}
@@ -300,6 +303,7 @@ unsigned router<BUSWIDTH, TARGET_SOCKET_TYPE>::transport_dbg(int i, tlm::tlm_gen
300303
size_t idx = addr_decoder.getEntry(address);
301304
if(idx == addr_decoder.null_entry) {
302305
if(default_idx == std::numeric_limits<size_t>::max()) {
306+
SCCWARN(SCMOD) << "target address=0x" << std::hex << address << " not found for " << (trans.get_command() == tlm::TLM_READ_COMMAND ? "read" : "write") << " transaction.";
303307
trans.set_response_status(tlm::TLM_ADDRESS_ERROR_RESPONSE);
304308
return 0;
305309
}

0 commit comments

Comments
 (0)