up_clock_mon: Fix stopped clock detection logic

A broken version of the stopped clock detection logic was merged by
accident. Fix it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2017-05-17 13:59:11 +02:00
parent f415b4f973
commit 9f954303ac
1 changed files with 2 additions and 2 deletions

View File

@ -97,14 +97,14 @@ module up_clock_mon #(
if (up_count_capture_s == 1'b1) begin
up_d_count <= d_count;
end else if (up_count == 'h00 && up_count_running_m3 == 1'b0) begin
end else if (up_count == 'h00 && up_count_run != up_count_running_m3) begin
up_d_count <= 'h00;
end
end
end
always @(posedge up_clk) begin
if (up_count_run == 1'b0) begin
if (up_count_run == 1'b0 && up_count_running_m3 == 1'b0) begin
up_count <= 'h01;
end else begin
up_count <= up_count + 1'b1;