}
#define BRAM_DEBUG
+
+// sigh yes, all these should be runtime commandline options
#define TRIGGER_ENABLE
#define TRIGGER_OCCURENCES 1
-#define TRIGGER_COUNTDOWN 10000
+//#define TRIGGER_COUNTDOWN 10000
//#define TERMINATE_AT_COUNTDOWN
//#define TRIGGER_NIA 0xa580
//#define TRIGGER_INSN 0xe8628008
// trace conditions
bool traceme = true;
- int trigger_countdown = TRIGGER_COUNTDOWN;
int trigger_occurrences = TRIGGER_OCCURENCES;
+#ifdef TRIGGER_COUNTDOWN
+ int trigger_countdown = TRIGGER_COUNTDOWN;
+#else
#ifdef TRIGGER_ENABLE
traceme = false;
#endif
+#endif // TRIGGER_COUNTDOWN
while(!Verilated::gotFinish()) {
--trigger_occurrences;
}
}
+#ifdef TRIGGER_COUNTDOWN
// tracing active for only TRIGGER_COUNTDOWN cycles
if (traceme) {
--trigger_countdown;
#endif
}
}
-#endif
+#endif // TRIGGER_COUNTDOWN
+#endif // TRIGGER_ENABLE
fprintf(dump, "pc %16lx insn %8x msr %16lx",
top->nia, top->insn, top->msr_o);
}
+#ifdef LDST_DUMP
if (top->ldst_req) {
if (!top->nia_req) {
fprintf(dump, "pc %-16s insn %-8s msr %-16s", "", "", "");
}
fprintf(dump, " ldst %16lx", top->ldst_addr);
}
+#endif
if (top->ldst_req || top->nia_req) {
fprintf(dump, "\n");
}