Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make simulation silent when verbose mode is not activated

  • Loading branch information...
commit a8f9d698cab25ae54495a81d1f8aba52a009b746 1 parent 7e76854
@fallen authored
Showing with 15 additions and 1 deletion.
  1. +4 −0 lm32_dcache.v
  2. +11 −1 lm32_icache.v
View
4 lm32_dcache.v
@@ -765,7 +765,9 @@ always @(posedge clk_i `CFG_RESET_SENSITIVITY)
begin
if (rst_i == `TRUE)
begin
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
$display("DTLB STATE MACHINE RESET");
+`endif
dtlb_flushing <= 1;
dtlb_flush_set <= {addr_dtlb_index_width{1'b1}};
dtlb_state <= `LM32_TLB_STATE_FLUSH;
@@ -783,7 +785,9 @@ begin
if (dtlb_miss == `TRUE)
begin
dtlb_miss_addr <= address_m;
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
$display("WARNING : DTLB MISS on addr 0x%08X at time %t", address_m, $time);
+`endif
end
if (csr_write_enable && csr_write_data[0])
begin
View
12 lm32_icache.v
@@ -792,7 +792,9 @@ begin
begin
if (eret_q_x)
begin
-// $display("[%t] itlb_enabled <= 0x%08X upon eret", $time, csr_psw[`LM32_CSR_PSW_EITLBE]);
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
+ $display("[%t] itlb_enabled <= 0x%08X upon eret", $time, csr_psw[`LM32_CSR_PSW_EITLBE]);
+`endif
itlb_enabled <= csr_psw[`LM32_CSR_PSW_EITLBE];
end
else if (exception_x || in_exception)
@@ -808,7 +810,9 @@ begin
begin
if (exception_m)
begin
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
$display("[%t] pc_exception <= 0x%08X", $time, pc_m);
+`endif
pc_exception <= pc_m;
end
if (pc_exception == pc_w)
@@ -816,13 +820,17 @@ begin
in_exception <= 0;
end
end
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
$display("[%t] itlb_enabled <= 0x%08X upon exception", $time, 0);
+`endif
itlb_enabled <= 0;
end
else
begin
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
if (itlb_enabled != csr_psw[`LM32_CSR_PSW_ITLBE])
$display("[%t] itlb_enabled <= 0x%08X", $time, csr_psw[`LM32_CSR_PSW_ITLBE]);
+`endif
itlb_enabled <= csr_psw[`LM32_CSR_PSW_ITLBE];
end
@@ -834,7 +842,9 @@ always @(posedge clk_i `CFG_RESET_SENSITIVITY)
begin
if (rst_i == `TRUE)
begin
+`ifdef CFG_VERBOSE_DISPLAY_ENABLED
$display("ITLB STATE MACHINE RESET");
+`endif
itlb_flushing <= 1;
itlb_flush_set <= {addr_itlb_index_width{1'b1}};
itlb_state <= `LM32_TLB_STATE_FLUSH;
Please sign in to comment.
Something went wrong with that request. Please try again.