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

📄 uart.fit.eqn

📁 一个完整的用cpld实现串口功能的代码。经过验证
💻 EQN
📖 第 1 页 / 共 4 页
字号:
-- 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.
--txd_reg is txd_reg at LC_X13_Y4_N8
--operation mode is normal

txd_reg_lut_out = A1L261 & !txd_buf[0] & (!A1L161) # !A1L261 & (A1L951 # A1L161);
txd_reg = DFFEAS(txd_reg_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L892, , , , );


--A1L381 is reduce_or~2711 at LC_X14_Y9_N1
--operation mode is normal

A1L381 = rxd_buf[5] & (!rxd_buf[0] & !rxd_buf[6]);


--A1L481 is reduce_or~2712 at LC_X14_Y9_N9
--operation mode is normal

A1L481 = rxd_buf[2] # rxd_buf[1] # !A1L381 # !rxd_buf[4];


--A1L581 is reduce_or~2713 at LC_X14_Y9_N2
--operation mode is normal

rxd_buf[6]_qfbk = rxd_buf[6];
A1L581 = rxd_buf[4] & (!rxd_buf[6]_qfbk & rxd_buf[5]) # !rxd_buf[4] & rxd_buf[0] & rxd_buf[6]_qfbk & !rxd_buf[5];

--rxd_buf[6] is rxd_buf[6] at LC_X14_Y9_N2
--operation mode is normal

rxd_buf[6] = DFFEAS(A1L581, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[7], , , VCC);


--A1L681 is reduce_or~2714 at LC_X14_Y9_N6
--operation mode is normal

rxd_buf[5]_qfbk = rxd_buf[5];
A1L681 = rxd_buf[4] & rxd_buf[5]_qfbk & !rxd_buf[6] # !rxd_buf[4] & !rxd_buf[5]_qfbk & rxd_buf[6];

--rxd_buf[5] is rxd_buf[5] at LC_X14_Y9_N6
--operation mode is normal

rxd_buf[5] = DFFEAS(A1L681, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[6], , , VCC);


--A1L781 is reduce_or~2715 at LC_X14_Y9_N5
--operation mode is normal

rxd_buf[0]_qfbk = rxd_buf[0];
A1L781 = !rxd_buf[5] & !rxd_buf[4] & rxd_buf[0]_qfbk & rxd_buf[6];

--rxd_buf[0] is rxd_buf[0] at LC_X14_Y9_N5
--operation mode is normal

rxd_buf[0] = DFFEAS(A1L781, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[1], , , VCC);


--A1L881 is reduce_or~2716 at LC_X14_Y9_N8
--operation mode is normal

rxd_buf[2]_qfbk = rxd_buf[2];
A1L881 = rxd_buf[1] & (rxd_buf[2]_qfbk # !A1L681) # !rxd_buf[1] & !A1L781 & !rxd_buf[2]_qfbk;

--rxd_buf[2] is rxd_buf[2] at LC_X14_Y9_N8
--operation mode is normal

rxd_buf[2] = DFFEAS(A1L881, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[3], , , VCC);


--A1L981 is reduce_or~2717 at LC_X14_Y9_N0
--operation mode is normal

A1L981 = rxd_buf[5] & !rxd_buf[0] & rxd_buf[4] & !rxd_buf[6] # !rxd_buf[5] & (!rxd_buf[4] & rxd_buf[6]);


--A1L091 is reduce_or~2718 at LC_X14_Y9_N3
--operation mode is normal

A1L091 = rxd_buf[2] & (A1L881 & (!A1L981) # !A1L881 & !A1L581) # !rxd_buf[2] & (A1L881);


--A1L191 is reduce_or~2719 at LC_X14_Y9_N4
--operation mode is normal

rxd_buf[7]_qfbk = rxd_buf[7];
A1L191 = rxd_buf[7]_qfbk # rxd_buf[3] & A1L481 # !rxd_buf[3] & (A1L091);

--rxd_buf[7] is rxd_buf[7] at LC_X14_Y9_N4
--operation mode is normal

rxd_buf[7] = DFFEAS(A1L191, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_reg2, , , VCC);


--A1L291 is reduce_or~2720 at LC_X15_Y9_N7
--operation mode is normal

A1L291 = rxd_buf[2] & (rxd_buf[0] & rxd_buf[1] # !rxd_buf[0] & (!rxd_buf[5])) # !rxd_buf[2] & (rxd_buf[1] # rxd_buf[0]);


--A1L391 is reduce_or~2721 at LC_X15_Y9_N8
--operation mode is normal

A1L391 = rxd_buf[6] & !rxd_buf[4] & !rxd_buf[5] & A1L291 # !rxd_buf[6] & rxd_buf[4] & rxd_buf[5] & !A1L291;


--A1L491 is reduce_or~2722 at LC_X12_Y9_N8
--operation mode is normal

rxd_buf[3]_qfbk = rxd_buf[3];
A1L491 = rxd_buf[7] # rxd_buf[3]_qfbk & A1L481 # !rxd_buf[3]_qfbk & (!A1L391);

--rxd_buf[3] is rxd_buf[3] at LC_X12_Y9_N8
--operation mode is normal

rxd_buf[3] = DFFEAS(A1L491, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[4], , , VCC);


--A1L591 is reduce_or~2723 at LC_X15_Y9_N3
--operation mode is normal

A1L591 = rxd_buf[6] & !rxd_buf[4] & !rxd_buf[5] # !rxd_buf[6] & rxd_buf[4] & rxd_buf[5] & !rxd_buf[0];


--A1L691 is reduce_or~2724 at LC_X15_Y9_N9
--operation mode is normal

A1L691 = rxd_buf[4] $ (!rxd_buf[1] & rxd_buf[2]);


--A1L791 is reduce_or~2725 at LC_X16_Y9_N8
--operation mode is normal

A1L791 = rxd_buf[1] & (A1L691 & (A1L381) # !A1L691 & A1L591) # !rxd_buf[1] & A1L591 & A1L691;


--A1L891 is reduce_or~2726 at LC_X16_Y9_N9
--operation mode is normal

A1L891 = rxd_buf[7] # rxd_buf[3] & A1L481 # !rxd_buf[3] & (!A1L791);


--A1L991 is reduce_or~2727 at LC_X14_Y9_N7
--operation mode is normal

rxd_buf[4]_qfbk = rxd_buf[4];
A1L991 = rxd_buf[5] & (rxd_buf[4]_qfbk # rxd_buf[6]) # !rxd_buf[5] & (rxd_buf[4]_qfbk & rxd_buf[6]);

--rxd_buf[4] is rxd_buf[4] at LC_X14_Y9_N7
--operation mode is normal

rxd_buf[4] = DFFEAS(A1L991, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[5], , , VCC);


--A1L002 is reduce_or~2728 at LC_X15_Y9_N0
--operation mode is normal

A1L002 = rxd_buf[1] & rxd_buf[2] & (rxd_buf[6] # rxd_buf[0]) # !rxd_buf[1] & (rxd_buf[6] # rxd_buf[2] $ rxd_buf[0]);


--A1L102 is reduce_or~2729 at LC_X15_Y9_N4
--operation mode is normal

A1L102 = rxd_buf[2] & rxd_buf[6] & (!rxd_buf[0] # !rxd_buf[1]) # !rxd_buf[2] & rxd_buf[1];


--A1L202 is reduce_or~2730 at LC_X15_Y9_N1
--operation mode is normal

A1L202 = A1L102 & (A1L002 & !A1L991 # !A1L002 & (A1L581)) # !A1L102 & A1L991 & (!A1L002);


--A1L302 is reduce_or~2731 at LC_X13_Y10_N2
--operation mode is normal

A1L302 = rxd_buf[7] # rxd_buf[3] & A1L481 # !rxd_buf[3] & (!A1L202);


--A1L402 is reduce_or~2732 at LC_X16_Y9_N5
--operation mode is normal

A1L402 = rxd_buf[1] & !rxd_buf[2] & (!rxd_buf[5] # !rxd_buf[0]) # !rxd_buf[1] & (rxd_buf[0] & !rxd_buf[5]);


--A1L502 is reduce_or~2733 at LC_X16_Y9_N6
--operation mode is normal

A1L502 = rxd_buf[4] & rxd_buf[5] & !rxd_buf[6] & !A1L402 # !rxd_buf[4] & !rxd_buf[5] & rxd_buf[6] & A1L402;


--A1L602 is reduce_or~2734 at LC_X15_Y10_N3
--operation mode is normal

A1L602 = rxd_buf[7] # rxd_buf[3] & A1L481 # !rxd_buf[3] & (!A1L502);


--A1L702 is reduce_or~2735 at LC_X16_Y9_N0
--operation mode is normal

A1L702 = rxd_buf[1] & !rxd_buf[0] & (rxd_buf[2] $ !rxd_buf[5]) # !rxd_buf[1] & rxd_buf[0] & (rxd_buf[2] # !rxd_buf[5]);


--A1L802 is reduce_or~2736 at LC_X16_Y9_N1
--operation mode is normal

A1L802 = rxd_buf[4] & rxd_buf[5] & !rxd_buf[6] & !A1L702 # !rxd_buf[4] & !rxd_buf[5] & rxd_buf[6] & A1L702;


--A1L902 is reduce_or~2737 at LC_X16_Y9_N2
--operation mode is normal

A1L902 = rxd_buf[7] # rxd_buf[3] & A1L481 # !rxd_buf[3] & (!A1L802);


--A1L012 is reduce_or~2738 at LC_X15_Y9_N2
--operation mode is normal

rxd_buf[1]_qfbk = rxd_buf[1];
A1L012 = rxd_buf[6] & (!rxd_buf[1]_qfbk # !rxd_buf[2]) # !rxd_buf[6] & !rxd_buf[1]_qfbk & (rxd_buf[2] $ rxd_buf[0]);

--rxd_buf[1] is rxd_buf[1] at LC_X15_Y9_N2
--operation mode is normal

rxd_buf[1] = DFFEAS(A1L012, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L622, rxd_buf[2], , , VCC);


--A1L112 is reduce_or~2739 at LC_X15_Y9_N5
--operation mode is normal

A1L112 = rxd_buf[1] & (rxd_buf[2] # rxd_buf[6] & !rxd_buf[0]) # !rxd_buf[1] & rxd_buf[6] & (rxd_buf[2] $ rxd_buf[0]);


--A1L212 is reduce_or~2740 at LC_X15_Y9_N6
--operation mode is normal

A1L212 = A1L012 & !A1L991 & (A1L112) # !A1L012 & (A1L112 & (A1L681) # !A1L112 & A1L991);


--A1L312 is reduce_or~2741 at LC_X16_Y10_N2
--operation mode is normal

A1L312 = rxd_buf[7] # rxd_buf[3] & A1L481 # !rxd_buf[3] & (!A1L212);


--txd_buf[0] is txd_buf[0] at LC_X13_Y5_N5
--operation mode is normal

txd_buf[0]_lut_out = A1L382 # A1L482 # !A1L272 & !state_tras[1];
txd_buf[0] = DFFEAS(txd_buf[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L472, , , , );


--div8_tras_reg[2] is div8_tras_reg[2] at LC_X12_Y4_N7
--operation mode is normal

div8_tras_reg[2]_lut_out = !div8_tras_reg[2];
div8_tras_reg[2] = DFFEAS(div8_tras_reg[2]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L531, , , , );


--div8_tras_reg[1] is div8_tras_reg[1] at LC_X11_Y4_N9
--operation mode is normal

div8_tras_reg[1]_lut_out = !div8_tras_reg[1];
div8_tras_reg[1] = DFFEAS(div8_tras_reg[1]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L331, , , , );


--div8_tras_reg[0] is div8_tras_reg[0] at LC_X11_Y4_N2
--operation mode is normal

div8_tras_reg[0]_lut_out = !div8_tras_reg[0];
div8_tras_reg[0] = DFFEAS(div8_tras_reg[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , trasstart, , , , );


--A1L671 is reduce_nor~227 at LC_X12_Y4_N6
--operation mode is normal

A1L671 = div8_tras_reg[2] & div8_tras_reg[1] & div8_tras_reg[0];


--trasstart is trasstart at LC_X12_Y4_N4
--operation mode is normal

trasstart_lut_out = state_tras[3] & (A1L561 # A1L461 & A1L361) # !state_tras[3] & A1L461 & A1L361;
trasstart = DFFEAS(trasstart_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L862, , , , );


--send_state[0] is send_state[0] at LC_X13_Y4_N5
--operation mode is normal

send_state[0]_lut_out = send_state[0] $ (div8_tras_reg[1] & div8_tras_reg[0] & div8_tras_reg[2]);
send_state[0] = DFFEAS(send_state[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L442, , , , );


--send_state[2] is send_state[2] at LC_X12_Y5_N5
--operation mode is normal

send_state[2]_lut_out = !send_state[2];
send_state[2] = DFFEAS(send_state[2]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L542, , , , );


--send_state[1] is send_state[1] at LC_X13_Y5_N0
--operation mode is normal

send_state[1]_lut_out = !send_state[1];
send_state[1] = DFFEAS(send_state[1]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L142, , , , );


--A1L851 is Mux~3235 at LC_X13_Y4_N2
--operation mode is normal

A1L851 = trasstart & (!send_state[2] # !send_state[1] # !send_state[0]);


--A1L951 is Mux~3236 at LC_X13_Y4_N9
--operation mode is normal

A1L951 = txd_reg # A1L671 & A1L851;


--state_tras[0] is state_tras[0] at LC_X12_Y5_N2
--operation mode is normal

state_tras[0]_lut_out = state_tras[0] & !A1L671 # !state_tras[0] & A1L671 & !A1L861;
state_tras[0] = DFFEAS(state_tras[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , key_entry2, , , , );


--state_tras[2] is state_tras[2] at LC_X13_Y2_N5
--operation mode is normal

state_tras[2]_lut_out = state_tras[2] $ (state_tras[1] & state_tras[0] & A1L671);
state_tras[2] = DFFEAS(state_tras[2]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , key_entry2, , , , );


--state_tras[1] is state_tras[1] at LC_X13_Y2_N2
--operation mode is normal

state_tras[1]_lut_out = state_tras[1] $ (state_tras[0] & A1L671);
state_tras[1] = DFFEAS(state_tras[1]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , key_entry2, , , , );


--A1L061 is Mux~3237 at LC_X13_Y2_N7
--operation mode is normal

A1L061 = !state_tras[1] & !state_tras[2];


--state_tras[3] is state_tras[3] at LC_X12_Y5_N0
--operation mode is normal

state_tras[3]_lut_out = state_tras[3] $ (A1L671 & A1L761);
state_tras[3] = DFFEAS(state_tras[3]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , key_entry2, , , , );


--A1L161 is Mux~3238 at LC_X13_Y4_N7
--operation mode is normal

A1L161 = state_tras[3] & (state_tras[0] & A1L671 # !A1L061);


--A1L261 is Mux~3239 at LC_X13_Y4_N6
--operation mode is normal

A1L261 = A1L671 & (A1L061 & (state_tras[0] # state_tras[3]) # !A1L061 & (!state_tras[3]));


--clkbaud8x is clkbaud8x at LC_X8_Y4_N9
--operation mode is normal

clkbaud8x_lut_out = !clkbaud8x;
clkbaud8x = DFFEAS(clkbaud8x_lut_out, GLOBAL(clk), GLOBAL(rst), , A1L181, , , , );


--key_entry2 is key_entry2 at LC_X13_Y3_N0
--operation mode is normal

key_entry2_lut_out = A1L651;
key_entry2 = DFFEAS(key_entry2_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , , key_entry1, , , !key_entry2);


--A1L892 is txd_reg~121 at LC_X12_Y4_N1
--operation mode is normal

A1L892 = key_entry2 & (!state_tras[1] & !state_tras[2] # !state_tras[3]);


--rxd_reg2 is rxd_reg2 at LC_X14_Y6_N0
--operation mode is normal

rxd_reg2_lut_out = rxd_reg1;
rxd_reg2 = DFFEAS(rxd_reg2_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , , , , , );


--div8_rec_reg[2] is div8_rec_reg[2] at LC_X10_Y6_N4
--operation mode is normal

div8_rec_reg[2]_lut_out = !div8_rec_reg[2];
div8_rec_reg[2] = DFFEAS(div8_rec_reg[2]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L921, , , , );


--div8_rec_reg[1] is div8_rec_reg[1] at LC_X10_Y6_N5
--operation mode is normal

div8_rec_reg[1]_lut_out = !div8_rec_reg[1];
div8_rec_reg[1] = DFFEAS(div8_rec_reg[1]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , A1L721, , , , );


--div8_rec_reg[0] is div8_rec_reg[0] at LC_X9_Y6_N2
--operation mode is normal

div8_rec_reg[0]_lut_out = !div8_rec_reg[0];
div8_rec_reg[0] = DFFEAS(div8_rec_reg[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , recstart, , , , );


--A1L522 is rxd_buf[7]~151 at LC_X10_Y6_N3
--operation mode is normal

A1L522 = div8_rec_reg[2] & (div8_rec_reg[1] & div8_rec_reg[0]);


--state_rec[2] is state_rec[2] at LC_X11_Y6_N2
--operation mode is normal

state_rec[2]_lut_out = A1L752 & state_rec[2] # !A1L752 & !A1L162 & (state_rec[2] $ A1L1);
state_rec[2] = DFFEAS(state_rec[2]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , , , , , );


--state_rec[1] is state_rec[1] at LC_X11_Y6_N9
--operation mode is normal

state_rec[1]_lut_out = A1L752 & state_rec[1] # !A1L752 & !A1L162 & (state_rec[1] $ state_rec[0]);
state_rec[1] = DFFEAS(state_rec[1]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , , , , , );


--A1L171 is recstart~107 at LC_X11_Y6_N3
--operation mode is normal

A1L171 = !state_rec[2] & (!state_rec[1]);


--state_rec[0] is state_rec[0] at LC_X11_Y6_N1
--operation mode is normal

state_rec[0]_lut_out = state_rec[0] & (A1L752) # !state_rec[0] & !A1L162 & !A1L752;
state_rec[0] = DFFEAS(state_rec[0]_lut_out, GLOBAL(clkbaud8x), GLOBAL(rst), , , , , , );


--state_rec[3] is state_rec[3] at LC_X11_Y6_N5

⌨️ 快捷键说明

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