always @(posedge clk or negedge rst_n)
begin
if (!rst_n)
begin
key_value_r <= 4'd0;
end
else begin
if(key_mark==1'b1)
begin
case ({col_reg,row_reg})
8'b1110_1110: key_value_r<=4'd0;
8'b1110_1101: key_value_r<=4'd1;
8'b1110_1011: key_value_r<=4'd2;
8'b1110_0111: key_value_r<=4'd3;
8'b1101_1110: key_value_r<=4'd4;
8'b1101_1101: key_value_r<=4'd5;
8'b1101_1011: key_value_r<=4'd6;
8'b1101_0111: key_value_r<=4'd7;
8'b1011_1110: key_value_r<=4'd8;
8'b1011_1101: key_value_r<=4'd9;
8'b1011_1011: key_value_r<=4'd10;
8'b1011_0111: key_value_r<=4'd11;
8'b0111_1110: key_value_r<=4'd12;
8'b0111_1101: key_value_r<=4'd13;
8'b0111_1011: key_value_r<=4'd14;
8'b0111_0111: key_value_r<=4'd15;
default: key_value_r <= 4'd1;
endcase
end
end
end
怎么让锁定的矩阵按键值保持在一个时钟周期啊,非常感谢啊
打赏帖 | |
---|---|
汽车电子中巡航控制系统的使用被打赏10分 | |
分享汽车电子中巡航控制系统知识被打赏10分 | |
分享安全气囊系统的检修注意事项被打赏10分 | |
分享电子控制安全气囊计算机知识点被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【OZONE】使用方法总结被打赏20分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K314】芯片启动流程分析被打赏40分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K146】S32DS RTD 驱动环境搭建被打赏12分 | |
【分享开发笔记,赚取电动螺丝刀】【IAR】libc标注库time相关库函数使用被打赏23分 | |
LP‑MSPM0L1306开发版试用结果被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【LP-MSPM0L1306】适配 RT-Thread Nano被打赏23分 |