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 <lars@metafoo.de>
main
Lars-Peter Clausen 2017-07-17 18:06:02 +02:00 committed by Andrei Grozav
parent 9b37e441f4
commit 34e8309695
1 changed files with 1 additions and 1 deletions

View File

@ -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