Skip to content

Commit

Permalink
Make simulation silent when verbose mode is not activated
Browse files Browse the repository at this point in the history
  • Loading branch information
fallen committed Oct 24, 2012
1 parent 7e76854 commit a8f9d69
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lm32_dcache.v
Expand Up @@ -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;
Expand All @@ -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
Expand Down
12 changes: 11 additions & 1 deletion lm32_icache.v
Expand Up @@ -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)
Expand All @@ -808,21 +810,27 @@ 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)
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
Expand All @@ -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;
Expand Down

0 comments on commit a8f9d69

Please sign in to comment.