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

📄 ps2tolcd.fit.eqn

📁 一个用cpld模拟驱动鼠标或者键盘的程序已经测试过
💻 EQN
📖 第 1 页 / 共 5 页
字号:
--operation mode is normal

C1L952 = C1_timer_5usec_count[6] # !C1_timer_5usec_count[4] # !C1_timer_5usec_count[7] # !C1_timer_5usec_count[5];


--C1_timer_5usec_count[3] is ps2_keyboard_interface:inst3|timer_5usec_count[3] at LC_X15_Y4_N3
--operation mode is arithmetic

C1_timer_5usec_count[3]_lut_out = C1_timer_5usec_count[3] $ (C1L142);
C1_timer_5usec_count[3] = DFFEAS(C1_timer_5usec_count[3]_lut_out, GLOBAL(B1_clk), VCC, , , , , !C1_m1_state.m1_tx_wait_clk_h, );

--C1L442 is ps2_keyboard_interface:inst3|timer_5usec_count[3]~177 at LC_X15_Y4_N3
--operation mode is arithmetic

C1L442_cout_0 = !C1L142 # !C1_timer_5usec_count[3];
C1L442 = CARRY(C1L442_cout_0);

--C1L542 is ps2_keyboard_interface:inst3|timer_5usec_count[3]~177COUT1_192 at LC_X15_Y4_N3
--operation mode is arithmetic

C1L542_cout_1 = !C1L242 # !C1_timer_5usec_count[3];
C1L542 = CARRY(C1L542_cout_1);


--C1_timer_5usec_done is ps2_keyboard_interface:inst3|timer_5usec_done at LC_X15_Y4_N8
--operation mode is normal

C1_timer_5usec_done = C1L952 # C1L852 # C1_timer_5usec_count[2] # !C1_timer_5usec_count[3];


--C1L05 is ps2_keyboard_interface:inst3|reduce_nor~1 at LC_X6_Y7_N7
--operation mode is normal

C1L05 = !C1L93 # !C1_q[5];


--C1_q[10] is ps2_keyboard_interface:inst3|q[10] at LC_X12_Y5_N4
--operation mode is normal

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


--C1_tx_shifting_done is ps2_keyboard_interface:inst3|tx_shifting_done at LC_X14_Y5_N8
--operation mode is normal

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


--C1_m1_state.m1_rx_clk_l is ps2_keyboard_interface:inst3|m1_state.m1_rx_clk_l at LC_X14_Y6_N2
--operation mode is normal

C1_m1_state.m1_rx_clk_l_lut_out = C1_m1_state.m1_rx_falling_edge_marker # C1_m1_state.m1_rx_clk_l & !C1_ps2_clk_s;
C1_m1_state.m1_rx_clk_l = DFFEAS(C1_m1_state.m1_rx_clk_l_lut_out, GLOBAL(B1_clk), VCC, , , , , !reset, );


--C1L341 is ps2_keyboard_interface:inst3|reduce_or~0 at LC_X14_Y6_N4
--operation mode is normal

C1L341 = C1_m1_state.m1_rx_clk_h & !C1_m1_state.m1_rx_clk_l;


--C1_m1_state.m1_rx_rising_edge_marker is ps2_keyboard_interface:inst3|m1_state.m1_rx_rising_edge_marker at LC_X14_Y6_N5
--operation mode is normal

C1_m1_state.m1_rx_rising_edge_marker_lut_out = C1_m1_state.m1_rx_clk_l & reset & C1_ps2_clk_s;
C1_m1_state.m1_rx_rising_edge_marker = DFFEAS(C1_m1_state.m1_rx_rising_edge_marker_lut_out, GLOBAL(B1_clk), VCC, , , , , , );


--C1_m1_state.m1_tx_error_no_keyboard_ack is ps2_keyboard_interface:inst3|m1_state.m1_tx_error_no_keyboard_ack at LC_X16_Y5_N6
--operation mode is normal

C1_m1_state.m1_tx_error_no_keyboard_ack_lut_out = C1_ps2_data_s & !C1_ps2_clk_s & (C1_m1_state.m1_tx_wait_keyboard_ack # C1_m1_state.m1_tx_error_no_keyboard_ack) # !C1_ps2_data_s & (C1_m1_state.m1_tx_error_no_keyboard_ack);
C1_m1_state.m1_tx_error_no_keyboard_ack = DFFEAS(C1_m1_state.m1_tx_error_no_keyboard_ack_lut_out, GLOBAL(B1_clk), VCC, , , , , !reset, );


--C1_m1_state.m1_tx_done_recovery is ps2_keyboard_interface:inst3|m1_state.m1_tx_done_recovery at LC_X16_Y5_N7
--operation mode is normal

C1_m1_state.m1_tx_done_recovery_lut_out = C1_m1_state.m1_tx_done_recovery & (!C1_ps2_data_s # !C1_ps2_clk_s) # !C1_m1_state.m1_tx_done_recovery & C1_m1_state.m1_tx_wait_keyboard_ack & !C1_ps2_clk_s & !C1_ps2_data_s;
C1_m1_state.m1_tx_done_recovery = DFFEAS(C1_m1_state.m1_tx_done_recovery_lut_out, GLOBAL(B1_clk), VCC, , , , , !reset, );


--C1L13 is ps2_keyboard_interface:inst3|m1_state~178 at LC_X15_Y5_N5
--operation mode is normal

C1_ps2_data_s_qfbk = C1_ps2_data_s;
C1L13 = C1_ps2_data_s_qfbk & (C1_m1_state.m1_tx_done_recovery # C1_m1_state.m1_tx_error_no_keyboard_ack) # !C1_m1_state.m1_rx_clk_h;

--C1_ps2_data_s is ps2_keyboard_interface:inst3|ps2_data_s at LC_X15_Y5_N5
--operation mode is normal

C1_ps2_data_s = DFFEAS(C1L13, GLOBAL(B1_clk), VCC, , , A1L41, , , VCC);


--B1_count[5] is div_256:inst1|count[5] at LC_X12_Y4_N5
--operation mode is normal

B1_count[5]_lut_out = GND;
B1_count[5] = DFFEAS(B1_count[5]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , B1L2, , , VCC);


--B1L5 is div_256:inst1|add~116 at LC_X12_Y3_N5
--operation mode is arithmetic

B1L5_carry_eqn = (!B1L9 & GND) # (B1L9 & VCC);
B1L5 = B1_count[4] $ !B1L5_carry_eqn;

--B1L6 is div_256:inst1|add~118 at LC_X12_Y3_N5
--operation mode is arithmetic

B1L6_cout_0 = B1_count[4] & !B1L9;
B1L6 = CARRY(B1L6_cout_0);

--B1L7 is div_256:inst1|add~118COUT1_152 at LC_X12_Y3_N5
--operation mode is arithmetic

B1L7_cout_1 = B1_count[4] & !B1L9;
B1L7 = CARRY(B1L7_cout_1);


--B1_count[4] is div_256:inst1|count[4] at LC_X12_Y4_N2
--operation mode is normal

B1_count[4]_lut_out = GND;
B1_count[4] = DFFEAS(B1_count[4]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , B1L5, , , VCC);


--B1L8 is div_256:inst1|add~121 at LC_X12_Y3_N4
--operation mode is arithmetic

B1L8 = B1_count[3] $ B1L31;

--B1L9 is div_256:inst1|add~123 at LC_X12_Y3_N4
--operation mode is arithmetic

B1L9 = B1L01;


--B1_count[3] is div_256:inst1|count[3] at LC_X12_Y3_N0
--operation mode is normal

B1_count[3]_lut_out = GND;
B1_count[3] = DFFEAS(B1_count[3]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , B1L8, , , VCC);


--B1L21 is div_256:inst1|add~126 at LC_X12_Y3_N3
--operation mode is arithmetic

B1L21 = B1_count[2] $ !B1L61;

--B1L31 is div_256:inst1|add~128 at LC_X12_Y3_N3
--operation mode is arithmetic

B1L31_cout_0 = B1_count[2] & !B1L61;
B1L31 = CARRY(B1L31_cout_0);

--B1L41 is div_256:inst1|add~128COUT1_150 at LC_X12_Y3_N3
--operation mode is arithmetic

B1L41_cout_1 = B1_count[2] & !B1L71;
B1L41 = CARRY(B1L41_cout_1);


--B1_count[2] is div_256:inst1|count[2] at LC_X13_Y3_N5
--operation mode is normal

B1_count[2]_lut_out = B1L21;
B1_count[2] = DFFEAS(B1_count[2]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , , , , );


--B1L51 is div_256:inst1|add~131 at LC_X12_Y3_N2
--operation mode is arithmetic

B1L51 = B1_count[1] $ B1L91;

--B1L61 is div_256:inst1|add~133 at LC_X12_Y3_N2
--operation mode is arithmetic

B1L61_cout_0 = !B1L91 # !B1_count[1];
B1L61 = CARRY(B1L61_cout_0);

--B1L71 is div_256:inst1|add~133COUT1_149 at LC_X12_Y3_N2
--operation mode is arithmetic

B1L71_cout_1 = !B1L02 # !B1_count[1];
B1L71 = CARRY(B1L71_cout_1);


--B1_count[1] is div_256:inst1|count[1] at LC_X12_Y3_N9
--operation mode is normal

B1_count[1]_lut_out = B1L51;
B1_count[1] = DFFEAS(B1_count[1]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , , , , );


--B1L81 is div_256:inst1|add~136 at LC_X12_Y3_N1
--operation mode is arithmetic

B1L81 = !B1_count[0];

--B1L91 is div_256:inst1|add~138 at LC_X12_Y3_N1
--operation mode is arithmetic

B1L91_cout_0 = B1_count[0];
B1L91 = CARRY(B1L91_cout_0);

--B1L02 is div_256:inst1|add~138COUT1_147 at LC_X12_Y3_N1
--operation mode is arithmetic

B1L02_cout_1 = B1_count[0];
B1L02 = CARRY(B1L02_cout_1);


--B1_count[0] is div_256:inst1|count[0] at LC_X13_Y3_N4
--operation mode is normal

B1_count[0]_lut_out = GND;
B1_count[0] = DFFEAS(B1_count[0]_lut_out, GLOBAL(mclk), GLOBAL(reset), , , B1L81, , , VCC);


--C1L431 is ps2_keyboard_interface:inst3|reduce_nor~4960 at LC_X10_Y6_N0
--operation mode is normal

C1L431 = C1_q[3] & C1_q[4] & C1L58 & !C1_q[2];


--C1L06 is ps2_keyboard_interface:inst3|reduce_nor~43 at LC_X10_Y7_N1
--operation mode is normal

C1L06 = !C1_left_shift_key & !C1_right_shift_key # !C1L48 # !C1L18;


--C1L531 is ps2_keyboard_interface:inst3|reduce_nor~4961 at LC_X10_Y7_N5
--operation mode is normal

C1L531 = C1_left_shift_key # C1_right_shift_key # !C1L48 # !C1L18;


--C1L512 is ps2_keyboard_interface:inst3|reduce_or~1324 at LC_X8_Y7_N5
--operation mode is normal

C1L512 = !C1_q[3] & (C1L57 # C1_q[4] & C1L39);


--C1L76 is ps2_keyboard_interface:inst3|reduce_nor~60 at LC_X8_Y7_N2
--operation mode is normal

C1L76 = !C1_right_shift_key & !C1_left_shift_key # !C1L18 # !C1L901;


--C1L612 is ps2_keyboard_interface:inst3|reduce_or~1325 at LC_X8_Y7_N8
--operation mode is normal

C1L612 = C1L851 & C1L951 & (!C1L88 # !C1L18);


--C1L631 is ps2_keyboard_interface:inst3|reduce_nor~4962 at LC_X9_Y6_N7
--operation mode is normal

C1L631 = !C1_left_shift_key & !C1_right_shift_key & C1_q[4] & C1L132;


--C1L731 is ps2_keyboard_interface:inst3|reduce_nor~4963 at LC_X9_Y7_N9
--operation mode is normal

C1L731 = C1_q[3] # !C1L79 # !C1_q[1] # !C1_q[2];


--C1L86 is ps2_keyboard_interface:inst3|reduce_nor~61 at LC_X8_Y7_N6
--operation mode is normal

C1L86 = !C1_right_shift_key & !C1_left_shift_key # !C1L79 # !C1L901;


--C1L831 is ps2_keyboard_interface:inst3|reduce_nor~4964 at LC_X7_Y6_N0
--operation mode is normal

C1L831 = !C1_left_shift_key & !C1_right_shift_key & C1L29;


--C1L931 is ps2_keyboard_interface:inst3|reduce_nor~4965 at LC_X12_Y6_N8
--operation mode is normal

C1L931 = C1L18 & (C1_right_shift_key # C1_left_shift_key);


--C1L95 is ps2_keyboard_interface:inst3|reduce_nor~41 at LC_X12_Y6_N7
--operation mode is normal

C1L95 = C1_q[1] # !C1_left_shift_key & !C1_right_shift_key # !C1L431;


--C1L041 is ps2_keyboard_interface:inst3|reduce_nor~4966 at LC_X9_Y9_N9
--operation mode is normal

C1L041 = C1L132 & C1_q[4] & (C1_left_shift_key # C1_right_shift_key);


--C1L141 is ps2_keyboard_interface:inst3|reduce_nor~4967 at LC_X10_Y7_N6
--operation mode is normal

C1L141 = C1L032 & (C1L88 # C1L49 # C1L59);


--C1L241 is ps2_keyboard_interface:inst3|reduce_nor~4968 at LC_X10_Y7_N9
--operation mode is normal

C1L241 = C1L89 # C1L141 # !C1L201 # !C1L501;


--C1L712 is ps2_keyboard_interface:inst3|reduce_or~1326 at LC_X10_Y5_N3
--operation mode is normal

C1L712 = C1L751 # C1_q[3] & C1L98 # !C1L35;


--C1L812 is ps2_keyboard_interface:inst3|reduce_or~1327 at LC_X10_Y5_N0
--operation mode is normal

C1L812 = C1L712 # C1L88 & (C1L18 # C1L032);


--reset is reset at PIN_110
--operation mode is input

reset = INPUT();


--mclk is mclk at PIN_127
--operation mode is input

mclk = INPUT();


--led[7] is led[7] at PIN_55
--operation mode is output

led[7] = OUTPUT(GND);


--led[6] is led[6] at PIN_52
--operation mode is output

led[6] = OUTPUT(C1_rx_ascii[6]);


--led[5] is led[5] at PIN_49
--operation mode is output

led[5] = OUTPUT(C1_rx_ascii[5]);


--led[4] is led[4] at PIN_45
--operation mode is output

led[4] = OUTPUT(C1_rx_ascii[4]);


--led[3] is led[3] at PIN_43
--operation mode is output

led[3] = OUTPUT(C1_rx_ascii[3]);


--led[2] is led[2] at PIN_38
--operation mode is output

led[2] = OUTPUT(C1_rx_ascii[2]);


--led[1] is led[1] at PIN_53
--operation mode is output

led[1] = OUTPUT(C1_rx_ascii[1]);


--led[0] is led[0] at PIN_51
--operation mode is output

led[0] = OUTPUT(C1_rx_ascii[0]);


--A1L21 is ps2_clk~0 at PIN_88
--operation mode is bidir

A1L21 = ps2_clk;

--ps2_clk is ps2_clk at PIN_88
--operation mode is bidir

ps2_clk = BIDIR(OPNDRN(VCC));


--A1L41 is ps2_data~0 at PIN_89
--operation mode is bidir

A1L41 = ps2_data;

--ps2_data is ps2_data at PIN_89
--operation mode is bidir

ps2_data = BIDIR(OPNDRN(C1L33));


⌨️ 快捷键说明

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