From 3a2b6ebf9370a629a3aa408164f697d2f9517cc7 Mon Sep 17 00:00:00 2001 From: CongHong <48422836+CongHong@users.noreply.github.com> Date: Fri, 2 Aug 2019 13:44:15 +0800 Subject: [PATCH] 1 --- .../example_2/example_2.srcs/sources_1/new/stop_watch.v | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Chapter_4/example_2/example_2.srcs/sources_1/new/stop_watch.v b/Chapter_4/example_2/example_2.srcs/sources_1/new/stop_watch.v index 8607b9f..c432384 100644 --- a/Chapter_4/example_2/example_2.srcs/sources_1/new/stop_watch.v +++ b/Chapter_4/example_2/example_2.srcs/sources_1/new/stop_watch.v @@ -34,16 +34,19 @@ module stop_watch begin if (clr==0) begin - ms_reg <=23'b0; + ms_reg <=23'b0; d2_reg <= 4'b0; - d1_reg <= 4'b0; + d1_reg <= 4'b0; d0_reg <= 4'b0; + d2_next <= 4'b0; + d1_next <= 4'b0; + d0_next <= 4'b0; end else if (go == 1) begin d2_reg <= d2_next; d1_reg <= d1_next; -d0_reg <= d0_next; + d0_reg <= d0_next; if (ms_reg < COUNT_VALUE) ms_reg <= ms_reg + 1; else