key_prog.map.eqn

来自「简单易懂的4*4键盘扫描及显示程序。对编写其他形式的键盘扫描程序有一定的指导意义」· EQN 代码 · 共 138 行

EQN
138
字号
-- Copyright (C) 1991-2005 Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions 
-- and other software and tools, and its AMPP partner logic 
-- functions, and any output files any of the foregoing 
-- (including device programming or simulation files), and any 
-- associated documentation or information are expressly subject 
-- to the terms and conditions of the Altera Program License 
-- Subscription Agreement, Altera MegaCore Function License 
-- Agreement, or other applicable license agreement, including, 
-- without limitation, that your use is for the sole purpose of 
-- programming logic devices manufactured by Altera and sold by 
-- Altera or its authorized distributors.  Please refer to the 
-- applicable agreement for further details.
--C1_temp[3] is key_scan:inst2|temp[3]
--operation mode is normal

C1_temp[3]_lut_out = C1_temp[2] & !C1_temp[3] & !C1_temp[1] & !C1_temp[0];
C1_temp[3] = DFFEAS(C1_temp[3]_lut_out, clk, VCC, , , , , , );


--C1_temp[2] is key_scan:inst2|temp[2]
--operation mode is normal

C1_temp[2]_lut_out = C1_temp[1] & !C1_temp[3] & !C1_temp[2] & !C1_temp[0];
C1_temp[2] = DFFEAS(C1_temp[2]_lut_out, clk, VCC, , , , , , );


--C1_temp[1] is key_scan:inst2|temp[1]
--operation mode is normal

C1_temp[1]_lut_out = C1_temp[0] & !C1_temp[3] & !C1_temp[2] & !C1_temp[1];
C1_temp[1] = DFFEAS(C1_temp[1]_lut_out, clk, VCC, , , , , , );


--C1_temp[0] is key_scan:inst2|temp[0]
--operation mode is normal

C1_temp[0]_lut_out = C1_temp[3] # C1_temp[0] & (C1_temp[1] # C1_temp[2]) # !C1_temp[0] & (C1_temp[1] $ !C1_temp[2]);
C1_temp[0] = DFFEAS(C1_temp[0]_lut_out, clk, VCC, , , , , , );


--key_out[3] is key_out[3]
--operation mode is input

key_out[3] = INPUT();


--key_out[2] is key_out[2]
--operation mode is input

key_out[2] = INPUT();


--key_out[1] is key_out[1]
--operation mode is input

key_out[1] = INPUT();


--key_out[0] is key_out[0]
--operation mode is input

key_out[0] = INPUT();


--clk is clk
--operation mode is input

clk = INPUT();


--key_in[3] is key_in[3]
--operation mode is output

key_in[3] = OUTPUT(C1_temp[3]);


--key_in[2] is key_in[2]
--operation mode is output

key_in[2] = OUTPUT(C1_temp[2]);


--key_in[1] is key_in[1]
--operation mode is output

key_in[1] = OUTPUT(C1_temp[1]);


--key_in[0] is key_in[0]
--operation mode is output

key_in[0] = OUTPUT(C1_temp[0]);


--soeplay[6] is soeplay[6]
--operation mode is output

soeplay[6] = OUTPUT(GND);


--soeplay[5] is soeplay[5]
--operation mode is output

soeplay[5] = OUTPUT(VCC);


--soeplay[4] is soeplay[4]
--operation mode is output

soeplay[4] = OUTPUT(VCC);


--soeplay[3] is soeplay[3]
--operation mode is output

soeplay[3] = OUTPUT(VCC);


--soeplay[2] is soeplay[2]
--operation mode is output

soeplay[2] = OUTPUT(VCC);


--soeplay[1] is soeplay[1]
--operation mode is output

soeplay[1] = OUTPUT(VCC);


--soeplay[0] is soeplay[0]
--operation mode is output

soeplay[0] = OUTPUT(VCC);


⌨️ 快捷键说明

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