From a0fd5a8f3799e5091f995ee5118c74f55fc8a86f Mon Sep 17 00:00:00 2001 From: James Clarke Date: Sat, 2 Nov 2019 20:37:34 +0000 Subject: [PATCH] Print cycle counter like Piccolo/Flute on write to to_host --- src_Core/CPU/Proc.bsv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src_Core/CPU/Proc.bsv b/src_Core/CPU/Proc.bsv index 70be811..f485003 100644 --- a/src_Core/CPU/Proc.bsv +++ b/src_Core/CPU/Proc.bsv @@ -38,6 +38,7 @@ import ConfigReg :: *; // ---------------- // BSV additional libs +import Cur_Cycle :: *; import GetPut_Aux :: *; // ================================================================ @@ -272,7 +273,7 @@ module mkProc (Proc_IFC); // Print out values written 'tohost' rule rl_tohost; let x <- mmioPlatform.to_host; - $display ("mmioPlatform.rl_tohost: 0x%0x (= %0d)", x, x); + $display ("%0d: mmioPlatform.rl_tohost: 0x%0x (= %0d)", cur_cycle, x, x); if (x != 0) begin // Standard RISC-V ISA tests finish by writing a value tohost with x[0]==1. // Further when x[63:1]==0, all tests within the program pass,