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

📄 leddongtai.fit.eqn

📁 CPLD控制交通灯程序
💻 EQN
字号:
-- Copyright (C) 1991-2006 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.
--count[0] is count[0] at LC1
count[0]_p1_out = !count[0] & !count[2] & !flash;
count[0]_or_out = count[0]_p1_out;
count[0]_reg_input = count[0]_or_out;
count[0] = DFFE(count[0]_reg_input, GLOBAL(clock), , , );


--count[2] is count[2] at LC2
count[2]_or_out = flash;
count[2]_reg_input = count[2]_or_out;
count[2] = DFFE(count[2]_reg_input, GLOBAL(clock), , , );


--A1L47Q is sel[3]~reg0 at LC16
A1L47Q_p1_out = !count[2] & count[1] & count[0];
A1L47Q_or_out = A1L47Q_p1_out;
A1L47Q_reg_input = !(A1L47Q_or_out);
A1L47Q = DFFE(A1L47Q_reg_input, GLOBAL(clock), , , );


--count[1] is count[1] at LC4
count[1]_p1_out = !count[2] & !count[1] & !flash & count[0];
count[1]_p2_out = !count[2] & count[1] & !flash & !count[0];
count[1]_or_out = count[1]_p1_out # count[1]_p2_out;
count[1]_reg_input = count[1]_or_out;
count[1] = DFFE(count[1]_reg_input, GLOBAL(clock), , , );


--A1L45Q is sel[2]~reg0 at LC14
A1L45Q_p1_out = !count[2] & count[1] & !count[0];
A1L45Q_or_out = A1L45Q_p1_out;
A1L45Q_reg_input = !(A1L45Q_or_out);
A1L45Q = DFFE(A1L45Q_reg_input, GLOBAL(clock), , , );


--A1L36Q is leddisp[5]~reg0 at LC24
A1L36Q_p1_out = snl[5] & count[1] & !count[0];
A1L36Q_p2_out = count[1] & count[0] & snh[5];
A1L36Q_p3_out = !count[1] & !count[0] & ewl[5];
A1L36Q_p4_out = !count[1] & count[0] & ewh[5];
A1L36Q_or_out = count[2] # A1L36Q_p1_out # A1L36Q_p2_out # A1L36Q_p3_out # A1L36Q_p4_out;
A1L36Q_reg_input = A1L36Q_or_out;
A1L36Q = DFFE(A1L36Q_reg_input, GLOBAL(clock), , , );


--A1L32Q is leddisp[3]~reg0 at LC13
A1L32Q_p1_out = snl[3] & count[1] & !count[0];
A1L32Q_p2_out = count[1] & count[0] & snh[3];
A1L32Q_p3_out = !count[1] & !count[0] & ewl[3];
A1L32Q_p4_out = !count[1] & count[0] & ewh[3];
A1L32Q_or_out = count[2] # A1L32Q_p1_out # A1L32Q_p2_out # A1L32Q_p3_out # A1L32Q_p4_out;
A1L32Q_reg_input = A1L32Q_or_out;
A1L32Q = DFFE(A1L32Q_reg_input, GLOBAL(clock), , , );


--A1L28Q is leddisp[1]~reg0 at LC11
A1L28Q_p1_out = snl[1] & count[1] & !count[0];
A1L28Q_p2_out = count[1] & count[0] & snh[1];
A1L28Q_p3_out = !count[1] & !count[0] & ewl[1];
A1L28Q_p4_out = !count[1] & count[0] & ewh[1];
A1L28Q_or_out = count[2] # A1L28Q_p1_out # A1L28Q_p2_out # A1L28Q_p3_out # A1L28Q_p4_out;
A1L28Q_reg_input = A1L28Q_or_out;
A1L28Q = DFFE(A1L28Q_reg_input, GLOBAL(clock), , , );


--A1L26Q is leddisp[0]~reg0 at LC8
A1L26Q_p1_out = snl[0] & count[1] & !count[0];
A1L26Q_p2_out = count[1] & count[0] & snh[0];
A1L26Q_p3_out = !count[1] & !count[0] & ewl[0];
A1L26Q_p4_out = !count[1] & count[0] & ewh[0];
A1L26Q_or_out = count[2] # A1L26Q_p1_out # A1L26Q_p2_out # A1L26Q_p3_out # A1L26Q_p4_out;
A1L26Q_reg_input = A1L26Q_or_out;
A1L26Q = DFFE(A1L26Q_reg_input, GLOBAL(clock), , , );


--A1L43Q is sel[1]~reg0 at LC6
A1L43Q_p1_out = count[0] & !count[2] & !count[1];
A1L43Q_or_out = A1L43Q_p1_out;
A1L43Q_reg_input = !(A1L43Q_or_out);
A1L43Q = DFFE(A1L43Q_reg_input, GLOBAL(clock), , , );


--A1L41Q is sel[0]~reg0 at LC5
A1L41Q_p1_out = !count[0] & !count[2] & !count[1];
A1L41Q_or_out = A1L41Q_p1_out;
A1L41Q_reg_input = !(A1L41Q_or_out);
A1L41Q = DFFE(A1L41Q_reg_input, GLOBAL(clock), , , );


--A1L38Q is leddisp[6]~reg0 at LC21
A1L38Q_p1_out = ewh[6] & count[0] & !count[1];
A1L38Q_p2_out = count[0] & count[1] & snh[6];
A1L38Q_p3_out = !count[0] & !count[1] & ewl[6];
A1L38Q_p4_out = !count[0] & count[1] & snl[6];
A1L38Q_or_out = count[2] # A1L38Q_p1_out # A1L38Q_p2_out # A1L38Q_p3_out # A1L38Q_p4_out;
A1L38Q_reg_input = A1L38Q_or_out;
A1L38Q = DFFE(A1L38Q_reg_input, GLOBAL(clock), , , );


--A1L34Q is leddisp[4]~reg0 at LC19
A1L34Q_p1_out = ewh[4] & count[0] & !count[1];
A1L34Q_p2_out = count[0] & count[1] & snh[4];
A1L34Q_p3_out = !count[0] & !count[1] & ewl[4];
A1L34Q_p4_out = !count[0] & count[1] & snl[4];
A1L34Q_or_out = count[2] # A1L34Q_p1_out # A1L34Q_p2_out # A1L34Q_p3_out # A1L34Q_p4_out;
A1L34Q_reg_input = A1L34Q_or_out;
A1L34Q = DFFE(A1L34Q_reg_input, GLOBAL(clock), , , );


--A1L30Q is leddisp[2]~reg0 at LC17
A1L30Q_p1_out = ewh[2] & count[0] & !count[1];
A1L30Q_p2_out = count[0] & count[1] & snh[2];
A1L30Q_p3_out = !count[0] & !count[1] & ewl[2];
A1L30Q_p4_out = !count[0] & count[1] & snl[2];
A1L30Q_or_out = count[2] # A1L30Q_p1_out # A1L30Q_p2_out # A1L30Q_p3_out # A1L30Q_p4_out;
A1L30Q_reg_input = A1L30Q_or_out;
A1L30Q = DFFE(A1L30Q_reg_input, GLOBAL(clock), , , );


--~VCC~0 is ~VCC~0 at LC3
~VCC~0_or_out = GND;
~VCC~0 = !(~VCC~0_or_out);


--clock is clock at PIN_83
--operation mode is input

clock = INPUT();


--flash is flash at PIN_81
--operation mode is input

flash = INPUT();


--ewh[0] is ewh[0] at PIN_52
--operation mode is input

ewh[0] = INPUT();


--ewh[1] is ewh[1] at PIN_33
--operation mode is input

ewh[1] = INPUT();


--ewh[2] is ewh[2] at PIN_24
--operation mode is input

ewh[2] = INPUT();


--ewh[3] is ewh[3] at PIN_80
--operation mode is input

ewh[3] = INPUT();


--ewh[4] is ewh[4] at PIN_61
--operation mode is input

ewh[4] = INPUT();


--ewh[5] is ewh[5] at PIN_15
--operation mode is input

ewh[5] = INPUT();


--ewh[6] is ewh[6] at PIN_51
--operation mode is input

ewh[6] = INPUT();


--ewl[0] is ewl[0] at PIN_34
--operation mode is input

ewl[0] = INPUT();


--ewl[1] is ewl[1] at PIN_70
--operation mode is input

ewl[1] = INPUT();


--ewl[2] is ewl[2] at PIN_25
--operation mode is input

ewl[2] = INPUT();


--ewl[3] is ewl[3] at PIN_60
--operation mode is input

ewl[3] = INPUT();


--ewl[4] is ewl[4] at PIN_79
--operation mode is input

ewl[4] = INPUT();


--ewl[5] is ewl[5] at PIN_29
--operation mode is input

ewl[5] = INPUT();


--ewl[6] is ewl[6] at PIN_37
--operation mode is input

ewl[6] = INPUT();


--snh[0] is snh[0] at PIN_76
--operation mode is input

snh[0] = INPUT();


--snh[1] is snh[1] at PIN_67
--operation mode is input

snh[1] = INPUT();


--snh[2] is snh[2] at PIN_28
--operation mode is input

snh[2] = INPUT();


--snh[3] is snh[3] at PIN_48
--operation mode is input

snh[3] = INPUT();


--snh[4] is snh[4] at PIN_57
--operation mode is input

snh[4] = INPUT();


--snh[5] is snh[5] at PIN_49
--operation mode is input

snh[5] = INPUT();


--snh[6] is snh[6] at PIN_68
--operation mode is input

snh[6] = INPUT();


--snl[0] is snl[0] at PIN_36
--operation mode is input

snl[0] = INPUT();


--snl[1] is snl[1] at PIN_69
--operation mode is input

snl[1] = INPUT();


--snl[2] is snl[2] at PIN_50
--operation mode is input

snl[2] = INPUT();


--snl[3] is snl[3] at PIN_58
--operation mode is input

snl[3] = INPUT();


--snl[4] is snl[4] at PIN_27
--operation mode is input

snl[4] = INPUT();


--snl[5] is snl[5] at PIN_16
--operation mode is input

snl[5] = INPUT();


--snl[6] is snl[6] at PIN_35
--operation mode is input

snl[6] = INPUT();


--dp is dp at PIN_12
--operation mode is output

dp = OUTPUT(~VCC~0);


--sel[3] is sel[3] at PIN_4
--operation mode is output

sel[3] = OUTPUT(A1L47Q);


--sel[2] is sel[2] at PIN_5
--operation mode is output

sel[2] = OUTPUT(A1L45Q);


--leddisp[0] is leddisp[0] at PIN_9
--operation mode is output

leddisp[0] = OUTPUT(A1L26Q);


--leddisp[1] is leddisp[1] at PIN_8
--operation mode is output

leddisp[1] = OUTPUT(A1L28Q);


--leddisp[3] is leddisp[3] at PIN_6
--operation mode is output

leddisp[3] = OUTPUT(A1L32Q);


--leddisp[5] is leddisp[5] at PIN_18
--operation mode is output

leddisp[5] = OUTPUT(A1L36Q);


--sel[0] is sel[0] at PIN_11
--operation mode is output

sel[0] = OUTPUT(A1L41Q);


--sel[1] is sel[1] at PIN_10
--operation mode is output

sel[1] = OUTPUT(A1L43Q);


--leddisp[2] is leddisp[2] at PIN_22
--operation mode is output

leddisp[2] = OUTPUT(A1L30Q);


--leddisp[4] is leddisp[4] at PIN_21
--operation mode is output

leddisp[4] = OUTPUT(A1L34Q);


--leddisp[6] is leddisp[6] at PIN_20
--operation mode is output

leddisp[6] = OUTPUT(A1L38Q);






⌨️ 快捷键说明

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