From 4f5f15e36e4d65ea52c4f0f9bb9f1170c2ccf4b1 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 17 Jul 2017 18:06:02 +0200 Subject: [PATCH] up_clock_mon: Explicitly truncate d_count during up_d_count assignment The MSB of the d_count signal is used as a overflow marker to stop the counter from incrementing in the monitored clock domain. It is not exported through the register map and truncated when assigned to the up_d_count signal. Make the truncation explicit to make it clear that this is not a mistake and to avoid warnings about implicit truncation. Signed-off-by: Lars-Peter Clausen --- library/common/up_clock_mon.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/common/up_clock_mon.v b/library/common/up_clock_mon.v index 0e729aa2c..c4af14043 100644 --- a/library/common/up_clock_mon.v +++ b/library/common/up_clock_mon.v @@ -96,7 +96,7 @@ module up_clock_mon #( end if (up_count_capture_s == 1'b1) begin - up_d_count <= d_count; + up_d_count <= d_count[TOTAL_WIDTH-1:0]; end else if (up_count == 'h00 && up_count_run != up_count_running_m3) begin up_d_count <= 'h00; end