⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ps2tolcd.fit.eqn

📁 一个用cpld模拟驱动鼠标或者键盘的程序已经测试过
💻 EQN
📖 第 1 页 / 共 5 页
字号:
C1L6 = CARRY(C1L6_cout_0);

--C1L7 is ps2_keyboard_interface:inst3|bit_count[0]~172COUT1_189 at LC_X14_Y5_N1
--operation mode is arithmetic

C1L7_cout_1 = C1L1 & C1_bit_count[0];
C1L7 = CARRY(C1L7_cout_1);


--C1_bit_count[1] is ps2_keyboard_interface:inst3|bit_count[1] at LC_X14_Y5_N2
--operation mode is arithmetic

C1_bit_count[1]_lut_out = C1_bit_count[1] $ C1L6;
C1_bit_count[1] = DFFEAS(C1_bit_count[1]_lut_out, GLOBAL(B1_clk), VCC, , , , , C1L9, );

--C1L11 is ps2_keyboard_interface:inst3|bit_count[1]~176 at LC_X14_Y5_N2
--operation mode is arithmetic

C1L11_cout_0 = !C1L6 # !C1_bit_count[1];
C1L11 = CARRY(C1L11_cout_0);

--C1L21 is ps2_keyboard_interface:inst3|bit_count[1]~176COUT1_190 at LC_X14_Y5_N2
--operation mode is arithmetic

C1L21_cout_1 = !C1L7 # !C1_bit_count[1];
C1L21 = CARRY(C1L21_cout_1);


--C1_bit_count[3] is ps2_keyboard_interface:inst3|bit_count[3] at LC_X14_Y5_N4
--operation mode is normal

C1_bit_count[3]_lut_out = C1_bit_count[3] $ (C1L41);
C1_bit_count[3] = DFFEAS(C1_bit_count[3]_lut_out, GLOBAL(B1_clk), VCC, , , , , C1L9, );


--C1_rx_shifting_done is ps2_keyboard_interface:inst3|rx_shifting_done at LC_X14_Y5_N5
--operation mode is normal

C1_rx_shifting_done = C1_bit_count[2] # !C1_bit_count[0] # !C1_bit_count[3] # !C1_bit_count[1];


--C1L222 is ps2_keyboard_interface:inst3|rx_ascii[0]~70 at LC_X6_Y7_N1
--operation mode is normal

C1L222 = !C1L93 & !C1_rx_shifting_done # !reset;


--C1L381 is ps2_keyboard_interface:inst3|reduce_or~1292 at LC_X10_Y8_N7
--operation mode is normal

C1L381 = C1_q[3] & C1L211 # !C1L251 # !C1L36;


--C1L16 is ps2_keyboard_interface:inst3|reduce_nor~44 at LC_X8_Y7_N4
--operation mode is normal

C1L16 = C1_q[4] # !C1L922 # !C1L18 # !C1L132;


--C1L96 is ps2_keyboard_interface:inst3|reduce_nor~62 at LC_X10_Y8_N0
--operation mode is normal

C1L96 = C1_q[3] # !C1L39 # !C1L18 # !C1_q[4];


--C1L66 is ps2_keyboard_interface:inst3|reduce_nor~59 at LC_X10_Y9_N0
--operation mode is normal

C1L66 = !C1L132 # !C1L922 # !C1L58 # !C1_q[4];


--C1L481 is ps2_keyboard_interface:inst3|reduce_or~1293 at LC_X10_Y9_N4
--operation mode is normal

C1L481 = C1L66 & (!C1L911 # !C1L032);


--C1L581 is ps2_keyboard_interface:inst3|reduce_or~1294 at LC_X10_Y9_N8
--operation mode is normal

C1L581 = !C1L18 & !C1L58 # !C1L29 # !C1L922;


--C1L681 is ps2_keyboard_interface:inst3|reduce_or~1295 at LC_X10_Y9_N5
--operation mode is normal

C1L681 = C1L581 & C1L17 & (!C1L331 # !C1L77);


--C1L781 is ps2_keyboard_interface:inst3|reduce_or~1296 at LC_X10_Y9_N6
--operation mode is normal

C1L781 = C1L07 & C1L96 & C1L481 & C1L681;


--C1L881 is ps2_keyboard_interface:inst3|reduce_or~1297 at LC_X6_Y7_N4
--operation mode is normal

C1L881 = C1L381 # !C1L781 # !C1L16 # !C1L501;


--C1L981 is ps2_keyboard_interface:inst3|reduce_or~1298 at LC_X12_Y6_N2
--operation mode is normal

C1L981 = C1L931 & (C1L49 # C1L901) # !C1L46;


--C1L26 is ps2_keyboard_interface:inst3|reduce_nor~48 at LC_X11_Y6_N8
--operation mode is normal

C1L26 = C1_q[4] # !C1L922 # !C1L132 # !C1L79;


--C1L091 is ps2_keyboard_interface:inst3|reduce_or~1299 at LC_X12_Y6_N3
--operation mode is normal

C1L091 = C1L981 # C1L69 & C1L18 # !C1L26;


--C1L191 is ps2_keyboard_interface:inst3|reduce_or~1300 at LC_X12_Y6_N0
--operation mode is normal

C1L191 = C1L091 # C1L401 & C1L29 # !C1L95;


--C1L291 is ps2_keyboard_interface:inst3|reduce_or~1301 at LC_X11_Y9_N3
--operation mode is normal

C1L291 = !C1L79 & !C1L18 # !C1L041;


--C1L391 is ps2_keyboard_interface:inst3|reduce_or~1302 at LC_X11_Y9_N0
--operation mode is normal

C1L391 = !C1L032 & !C1L79 # !C1L69;


--C1L491 is ps2_keyboard_interface:inst3|reduce_or~1303 at LC_X11_Y9_N5
--operation mode is normal

C1L491 = !C1L48 & !C1L49 # !C1L79 # !C1L922;


--C1L591 is ps2_keyboard_interface:inst3|reduce_or~1304 at LC_X11_Y7_N8
--operation mode is normal

C1L591 = C1L06 & (!C1L401 # !C1L49);


--C1L691 is ps2_keyboard_interface:inst3|reduce_or~1305 at LC_X11_Y9_N4
--operation mode is normal

C1L691 = C1L491 & C1L391 & C1L591 & C1L291;


--C1L27 is ps2_keyboard_interface:inst3|reduce_nor~69 at LC_X9_Y9_N3
--operation mode is normal

C1L27 = C1L922 # !C1L08 # !C1L132 # !C1_q[4];


--C1L791 is ps2_keyboard_interface:inst3|reduce_or~1306 at LC_X9_Y9_N7
--operation mode is normal

C1L791 = C1L08 & !C1L831 & (!C1L88 # !C1L79) # !C1L08 & (!C1L88 # !C1L79);


--C1L891 is ps2_keyboard_interface:inst3|reduce_or~1307 at LC_X9_Y9_N8
--operation mode is normal

C1L891 = C1L27 & C1L86 & C1L56 & C1L791;


--C1L991 is ps2_keyboard_interface:inst3|reduce_or~1308 at LC_X6_Y7_N5
--operation mode is normal

C1L991 = C1L191 # C1L881 # !C1L691 # !C1L891;


--C1L002 is ps2_keyboard_interface:inst3|reduce_or~1309 at LC_X7_Y6_N1
--operation mode is normal

C1L002 = !C1L161 # !C1L151 # !C1L951;


--C1L102 is ps2_keyboard_interface:inst3|reduce_or~1310 at LC_X9_Y8_N5
--operation mode is normal

C1L102 = C1L67 & (C1L97 # C1_q[6] & C1L011);


--C1L202 is ps2_keyboard_interface:inst3|reduce_or~1311 at LC_X10_Y8_N9
--operation mode is normal

C1L202 = C1L08 & (C1L29 # C1_q[4] & C1L132);


--C1L302 is ps2_keyboard_interface:inst3|reduce_or~1312 at LC_X9_Y9_N0
--operation mode is normal

C1L302 = C1L102 # C1L922 & C1L202 # !C1L761;


--C1L37 is ps2_keyboard_interface:inst3|reduce_nor~91 at LC_X11_Y7_N0
--operation mode is normal

C1L37 = C1L922 # !C1L132 # !C1L58 # !C1_q[4];


--C1L402 is ps2_keyboard_interface:inst3|reduce_or~1313 at LC_X11_Y7_N5
--operation mode is normal

C1L402 = C1L37 & (C1_q[3] # !C1L38 & !C1L121);


--C1L502 is ps2_keyboard_interface:inst3|reduce_or~1314 at LC_X10_Y9_N7
--operation mode is normal

C1L502 = C1L922 # !C1L18 & !C1L58 # !C1L29;


--C1L602 is ps2_keyboard_interface:inst3|reduce_or~1315 at LC_X8_Y9_N1
--operation mode is normal

C1L602 = C1L39 & !C1L111 & (C1L031 # !C1L48) # !C1L39 & (C1L031 # !C1L48);


--C1L702 is ps2_keyboard_interface:inst3|reduce_or~1316 at LC_X8_Y9_N5
--operation mode is normal

C1L702 = C1L502 & C1L602 & (!C1L69 # !C1L08);


--C1L802 is ps2_keyboard_interface:inst3|reduce_or~1317 at LC_X6_Y7_N2
--operation mode is normal

C1L802 = C1L402 & C1L702 & C1L781 & C1L281;


--C1_rx_ascii[4] is ps2_keyboard_interface:inst3|rx_ascii[4] at LC_X6_Y7_N0
--operation mode is normal

C1_rx_ascii[4]_lut_out = C1L002 # C1L302 # !C1L802 # !C1L891;
C1_rx_ascii[4] = DFFEAS(C1_rx_ascii[4]_lut_out, GLOBAL(B1_clk), VCC, , C1L222, , , !reset, );


--C1L541 is ps2_keyboard_interface:inst3|reduce_or~17 at LC_X7_Y7_N5
--operation mode is normal

C1L541 = !C1L371 # !C1L661 # !C1L201;


--C1_rx_ascii[2] is ps2_keyboard_interface:inst3|rx_ascii[2] at LC_X7_Y7_N9
--operation mode is normal

C1_rx_ascii[2]_lut_out = !C1L061 # !C1L231 # !C1L47 # !C1L711;
C1_rx_ascii[2] = DFFEAS(C1_rx_ascii[2]_lut_out, GLOBAL(B1_clk), VCC, , C1L222, , , !reset, );


--C1L012 is ps2_keyboard_interface:inst3|reduce_or~1319 at LC_X7_Y8_N0
--operation mode is normal

C1L012 = C1L631 & (C1L79 # C1_q[6] & C1L09);


--C1L112 is ps2_keyboard_interface:inst3|reduce_or~1320 at LC_X8_Y9_N3
--operation mode is normal

C1L112 = !C1L922 & C1L79 & (C1L48 # C1L49);


--C1L212 is ps2_keyboard_interface:inst3|reduce_or~1321 at LC_X8_Y9_N4
--operation mode is normal

C1L212 = C1L112 # C1L601 & (C1L032 # C1L79);


--C1L312 is ps2_keyboard_interface:inst3|reduce_or~1322 at LC_X9_Y9_N4
--operation mode is normal

C1L312 = !C1L922 & C1L49 & C1L032 # !C1L531;


--C1L412 is ps2_keyboard_interface:inst3|reduce_or~1323 at LC_X7_Y9_N0
--operation mode is normal

C1L412 = C1L212 # C1L012 # C1L312;


--C1_rx_ascii[1] is ps2_keyboard_interface:inst3|rx_ascii[1] at LC_X6_Y7_N3
--operation mode is normal

C1_rx_ascii[1]_lut_out = C1L412 # !C1L802 # !C1L871 # !C1L691;
C1_rx_ascii[1] = DFFEAS(C1_rx_ascii[1]_lut_out, GLOBAL(B1_clk), VCC, , C1L222, , , !reset, );


--C1L841 is ps2_keyboard_interface:inst3|reduce_or~20 at LC_X7_Y7_N4
--operation mode is normal

C1L841 = !C1L701 & !C1L241 & C1L231 # !C1L321;


--B1L1 is div_256:inst1|add~106 at LC_X12_Y3_N7
--operation mode is normal

B1L1_carry_eqn = (!B1L9 & B1L3) # (B1L9 & B1L4);
B1L1 = B1L1_carry_eqn $ !B1_count[6];

--B1_clk is div_256:inst1|clk at LC_X12_Y3_N7
--operation mode is normal

B1_clk = DFFEAS(B1L1, GLOBAL(mclk), VCC, , reset, , , , );


--C1_m1_state.m1_tx_rising_edge_marker is ps2_keyboard_interface:inst3|m1_state.m1_tx_rising_edge_marker at LC_X16_Y5_N4
--operation mode is normal

C1_m1_state.m1_tx_rising_edge_marker_lut_out = C1_ps2_clk_s & reset & C1_m1_state.m1_tx_wait_clk_h & !C1_timer_5usec_done;
C1_m1_state.m1_tx_rising_edge_marker = DFFEAS(C1_m1_state.m1_tx_rising_edge_marker_lut_out, GLOBAL(B1_clk), VCC, , , , , , );


--C1_m1_state.m1_rx_falling_edge_marker is ps2_keyboard_interface:inst3|m1_state.m1_rx_falling_edge_marker at LC_X15_Y5_N7
--operation mode is normal

C1_m1_state.m1_rx_falling_edge_marker_lut_out = !C1_m1_state.m1_rx_clk_h & !C1_ps2_clk_s & reset;
C1_m1_state.m1_rx_falling_edge_marker = DFFEAS(C1_m1_state.m1_rx_falling_edge_marker_lut_out, GLOBAL(B1_clk), VCC, , , , , , );


--C1L74 is ps2_keyboard_interface:inst3|q[8]~6020 at LC_X15_Y5_N9
--operation mode is normal

C1L74 = C1_m1_state.m1_tx_rising_edge_marker # C1_m1_state.m1_rx_falling_edge_marker # !reset;


--C1_hold_released is ps2_keyboard_interface:inst3|hold_released at LC_X6_Y7_N8
--operation mode is normal

C1_hold_released_lut_out = !C1L222 & (C1_hold_released # !C1L05 & !C1_rx_shifting_done);
C1_hold_released = DFFEAS(C1_hold_released_lut_out, GLOBAL(B1_clk), VCC, , , , , , );


--C1L2 is ps2_keyboard_interface:inst3|always10~33 at LC_X11_Y6_N7
--operation mode is normal

C1L2 = C1_rx_shifting_done # !C1L58 # !C1L49;


--C1L3 is ps2_keyboard_interface:inst3|always11~33 at LC_X8_Y5_N6
--operation mode is normal

C1L3 = C1_rx_shifting_done # !C1L08 # !C1L19;


--C1_q[9] is ps2_keyboard_interface:inst3|q[9] at LC_X12_Y5_N2
--operation mode is normal

C1_q[9]_lut_out = C1_q[10] & reset;
C1_q[9] = DFFEAS(C1_q[9]_lut_out, GLOBAL(B1_clk), VCC, , C1L74, , , , );


--C1_m1_state.m1_tx_wait_keyboard_ack is ps2_keyboard_interface:inst3|m1_state.m1_tx_wait_keyboard_ack at LC_X16_Y5_N1
--operation mode is normal

C1_m1_state.m1_tx_wait_keyboard_ack_lut_out = C1_m1_state.m1_tx_wait_keyboard_ack & (C1_ps2_clk_s # !C1_tx_shifting_done & C1_m1_state.m1_tx_clk_h) # !C1_m1_state.m1_tx_wait_keyboard_ack & !C1_tx_shifting_done & (C1_m1_state.m1_tx_clk_h);
C1_m1_state.m1_tx_wait_keyboard_ack = DFFEAS(C1_m1_state.m1_tx_wait_keyboard_ack_lut_out, GLOBAL(B1_clk), VCC, , , , , !reset, );


--C1L8 is ps2_keyboard_interface:inst3|bit_count[0]~183 at LC_X15_Y5_N3
--operation mode is normal

C1L8 = reset & !C1_m1_state.m1_tx_wait_keyboard_ack & C1_rx_shifting_done;


--C1_timer_60usec_count[1] is ps2_keyboard_interface:inst3|timer_60usec_count[1] at LC_X15_Y6_N5
--operation mode is arithmetic

C1_timer_60usec_count[1]_carry_eqn = C1L262;
C1_timer_60usec_count[1]_lut_out = C1_timer_60usec_count[1] $ (C1_timer_60usec_count[1]_carry_eqn);
C1_timer_60usec_count[1] = DFFEAS(C1_timer_60usec_count[1]_lut_out, GLOBAL(B1_clk), VCC, , , , , C1L341, );

--C1L462 is ps2_keyboard_interface:inst3|timer_60usec_count[1]~221 at LC_X15_Y6_N5
--operation mode is arithmetic

C1L462_cout_0 = !C1L262 # !C1_timer_60usec_count[1];
C1L462 = CARRY(C1L462_cout_0);

--C1L562 is ps2_keyboard_interface:inst3|timer_60usec_count[1]~221COUT1_278 at LC_X15_Y6_N5
--operation mode is arithmetic

C1L562_cout_1 = !C1L262 # !C1_timer_60usec_count[1];
C1L562 = CARRY(C1L562_cout_1);


--C1_timer_60usec_count[3] is ps2_keyboard_interface:inst3|timer_60usec_count[3] at LC_X15_Y6_N7
--operation mode is arithmetic

C1_timer_60usec_count[3]_carry_eqn = (!C1L262 & C1L762) # (C1L262 & C1L862);
C1_timer_60usec_count[3]_lut_out = C1_timer_60usec_count[3] $ C1_timer_60usec_count[3]_carry_eqn;
C1_timer_60usec_count[3] = DFFEAS(C1_timer_60usec_count[3]_lut_out, GLOBAL(B1_clk), VCC, , , , , C1L341, );

--C1L072 is ps2_keyboard_interface:inst3|timer_60usec_count[3]~225 at LC_X15_Y6_N7
--operation mode is arithmetic

C1L072_cout_0 = !C1L762 # !C1_timer_60usec_count[3];
C1L072 = CARRY(C1L072_cout_0);

--C1L172 is ps2_keyboard_interface:inst3|timer_60usec_count[3]~225COUT1_282 at LC_X15_Y6_N7
--operation mode is arithmetic

⌨️ 快捷键说明

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