From b380907d1852ad87b874535156a972bba99d4d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=B3=E5=85=89=E5=B0=91=E5=B9=B4?= <849317537@qq.com> Date: Wed, 15 May 2024 17:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=BA=9B=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- led_matrix/tb_lm_3.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/led_matrix/tb_lm_3.v b/led_matrix/tb_lm_3.v index a46f29e..cc08ce2 100644 --- a/led_matrix/tb_lm_3.v +++ b/led_matrix/tb_lm_3.v @@ -151,7 +151,8 @@ always @(posedge sys_clk or negedge sys_rst) begin end reg [4:0] click_time; // max: 20 -reg is_down; // 消抖之后的按键状态, 是一个稳定的状态 +reg is_down; // 消抖之后的按键状态, 是一个稳定的状态, 没稳定之前 is_down 一直是上次状态, 稳定之后视key最新的值为定 + always @(posedge sys_clk or negedge sys_rst) begin if (sys_rst == 1'b0) begin is_down <= 1'b0;