Skip to content

Commit 25c00a4

Browse files
committed
Makes internal pending_trap only in Debug build visible in logging
1 parent 72f3367 commit 25c00a4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sysc/core2sc_adapter.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,13 @@ template <typename PLAT> class core2sc_adapter : public PLAT, public sc2core_if
321321
this->csr[iss::arch::mip] &= ~mask;
322322
this->check_interrupt();
323323
if(value)
324-
SCCTRACE(owner->hier_name()) << "Triggering interrupt " << id << " Pending trap: " << this->reg.pending_trap;
324+
SCCTRACE(owner->hier_name()) << "Triggering interrupt " << id
325+
#ifndef NDEBUG
326+
<< " (Pending trap: " << std::hex << "0x"
327+
<< ((this->reg.pending_trap >> 16) & 0xff) // 0x80 << 24 | (cause << 16) | trap_id
328+
<< ")"
329+
#endif
330+
;
325331
}
326332

327333
void _local_irq_mt(short id, bool value) {

0 commit comments

Comments
 (0)