debounce.map.eqn

来自「4X4keypad的防抖动模块」· EQN 代码 · 共 51 行

EQN
51
字号
--p_state[0] is p_state[0]
--operation mode is normal

p_state[0]_lut_out = p_state[0] & !done & (p_state[1] $ !SW) # !p_state[0] & (p_state[1] $ !SW);
p_state[0] = DFFE(p_state[0]_lut_out, clk, reset, , );


--p_state[1] is p_state[1]
--operation mode is normal

p_state[1]_lut_out = p_state[1] $ (p_state[0] & done);
p_state[1] = DFFE(p_state[1]_lut_out, clk, reset, , );


--SW is SW
--operation mode is input

SW = INPUT();


--done is done
--operation mode is input

done = INPUT();


--clk is clk
--operation mode is input

clk = INPUT();


--reset is reset
--operation mode is input

reset = INPUT();


--START is START
--operation mode is output

START = OUTPUT(p_state[0]);


--SWdown is SWdown
--operation mode is output

SWdown = OUTPUT(!p_state[1]);


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?