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

📄 controller.map.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.
--countnum[0] is countnum[0]
countnum[0]_reg_input = VCC;
countnum[0] = TFFE(countnum[0]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--A1L10Q is flash~reg0
A1L10Q_or_out = !hold;
A1L10Q_reg_input = A1L10Q_or_out;
A1L10Q = DFFE(A1L10Q_reg_input, GLOBAL(clock), , , GLOBAL(reset));


--countnum[1] is countnum[1]
countnum[1]_p1_out = countnum[5] & countnum[4] & !countnum[3] & !countnum[2] & !countnum[1];
countnum[1]_or_out = countnum[1]_p1_out # !countnum[0];
countnum[1]_reg_input = !countnum[1]_or_out;
countnum[1] = TFFE(countnum[1]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--countnum[2] is countnum[2]
countnum[2]_p1_out = countnum[0] & countnum[1];
countnum[2]_or_out = countnum[2];
countnum[2]_reg_input = countnum[2]_p1_out $ countnum[2]_or_out;
countnum[2] = DFFE(countnum[2]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--countnum[3] is countnum[3]
countnum[3]_p1_out = countnum[2] & countnum[0] & countnum[1];
countnum[3]_or_out = countnum[3];
countnum[3]_reg_input = countnum[3]_p1_out $ countnum[3]_or_out;
countnum[3] = DFFE(countnum[3]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--countnum[4] is countnum[4]
countnum[4]_p1_out = countnum[5] & !countnum[3] & !countnum[2] & !countnum[1] & countnum[0] & countnum[4];
countnum[4]_p2_out = countnum[3] & countnum[2] & countnum[1] & countnum[0];
countnum[4]_or_out = countnum[4]_p1_out # countnum[4]_p2_out;
countnum[4]_reg_input = countnum[4]_or_out;
countnum[4] = TFFE(countnum[4]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--countnum[5] is countnum[5]
countnum[5]_p1_out = countnum[4] & countnum[2] & countnum[1] & countnum[3] & countnum[0];
countnum[5]_p2_out = countnum[4] & !countnum[2] & !countnum[1] & !countnum[3] & countnum[0] & countnum[5];
countnum[5]_or_out = countnum[5]_p1_out # countnum[5]_p2_out;
countnum[5]_reg_input = countnum[5]_or_out;
countnum[5] = TFFE(countnum[5]_reg_input, GLOBAL(clock), GLOBAL(reset), , hold);


--A1L48Q is reda~reg0
A1L48Q_p1_out = countnum[0] & countnum[4] & countnum[3];
A1L48Q_p2_out = countnum[4] & countnum[3] & countnum[1];
A1L48Q_p3_out = countnum[4] & countnum[3] & countnum[2];
A1L48Q_or_out = countnum[5] # A1L48Q_p1_out # A1L48Q_p2_out # A1L48Q_p3_out # !hold;
A1L48Q_reg_input = A1L48Q_or_out;
A1L48Q = DFFE(A1L48Q_reg_input, GLOBAL(clock), , , );


--A1L50Q is redb~reg0
A1L50Q_p1_out = !countnum[4] & !countnum[5];
A1L50Q_p2_out = !countnum[5] & !countnum[3];
A1L50Q_p3_out = !countnum[5] & !countnum[2] & !countnum[0] & !countnum[1];
A1L50Q_or_out = A1L50Q_p1_out # A1L50Q_p2_out # A1L50Q_p3_out # !hold;
A1L50Q_reg_input = A1L50Q_or_out;
A1L50Q = DFFE(A1L50Q_reg_input, GLOBAL(clock), , , );


--A1L12Q is greena~reg0
A1L12Q_p1_out = countnum[3] & countnum[4];
A1L12Q_p2_out = countnum[4] & countnum[2];
A1L12Q_or_out = A1L12Q_p1_out # A1L12Q_p2_out # !hold # countnum[5];
A1L12Q_reg_input = !(A1L12Q_or_out);
A1L12Q = DFFE(A1L12Q_reg_input, GLOBAL(clock), , , );


--A1L53Q is yellowa~reg0
A1L53Q_p1_out = hold & countnum[4] & !countnum[3] & !countnum[5] & countnum[2];
A1L53Q_p2_out = hold & countnum[4] & countnum[3] & !countnum[5] & !countnum[2] & !countnum[0] & !countnum[1];
A1L53Q_or_out = A1L53Q_p1_out # A1L53Q_p2_out;
A1L53Q_reg_input = A1L53Q_or_out;
A1L53Q = DFFE(A1L53Q_reg_input, GLOBAL(clock), , , );


--A1L34Q is numb[0]~reg0
A1L34Q_p0_out = countnum[5] & countnum[3] & countnum[2] & countnum[1];
A1L34Q_p2_out = countnum[4] & countnum[5];
A1L34Q_p4_out = countnum[5] & countnum[0] & countnum[3] & countnum[2];
A1L34Q_or_out = A1L34Q_p0_out # A1L34Q_p2_out # A1L34Q_p4_out;
A1L34Q_reg_input = !countnum[0] $ A1L34Q_or_out;
A1L34Q = DFFE(A1L34Q_reg_input, GLOBAL(clock), , , hold);


--A1L15Q is greenb~reg0
A1L15Q_p0_out = !countnum[5] & hold & countnum[4] & countnum[1] & countnum[3];
A1L15Q_p1_out = !countnum[2] & countnum[5] & hold & !countnum[4];
A1L15Q_p2_out = countnum[5] & hold & !countnum[4] & !countnum[0] & !countnum[1];
A1L15Q_p3_out = countnum[2] & !countnum[5] & hold & countnum[4] & countnum[3];
A1L15Q_p4_out = !countnum[5] & hold & countnum[4] & countnum[0] & countnum[3];
A1L15Q_or_out = A1L14 # A1L15Q_p0_out # A1L15Q_p1_out # A1L15Q_p2_out # A1L15Q_p3_out # A1L15Q_p4_out;
A1L15Q_reg_input = A1L15Q_or_out;
A1L15Q = DFFE(A1L15Q_reg_input, GLOBAL(clock), , , );


--A1L55Q is yellowb~reg0
A1L55Q_p1_out = countnum[5] & hold & countnum[4];
A1L55Q_p2_out = countnum[5] & hold & countnum[0] & countnum[3] & countnum[2];
A1L55Q_p3_out = countnum[5] & hold & countnum[3] & countnum[2] & countnum[1];
A1L55Q_or_out = A1L55Q_p1_out # A1L55Q_p2_out # A1L55Q_p3_out;
A1L55Q_reg_input = A1L55Q_or_out;
A1L55Q = DFFE(A1L55Q_reg_input, GLOBAL(clock), , , );


--A1L36Q is numb[1]~reg0
A1L36Q_p2_out = countnum[4] & !countnum[0] & countnum[5];
A1L36Q_p4_out = !countnum[0] & countnum[5] & countnum[3] & countnum[2] & countnum[1];
A1L36Q_or_out = A1L36Q_p2_out # A1L36Q_p4_out;
A1L36Q_reg_input = countnum[1] $ A1L36Q_or_out;
A1L36Q = DFFE(A1L36Q_reg_input, GLOBAL(clock), , , hold);


--A1L19Q is numa[0]~reg0
A1L19Q_p2_out = !countnum[1] & countnum[4] & !countnum[5] & !countnum[0] & !countnum[2] & countnum[3];
A1L19Q_p4_out = countnum[4] & !countnum[5] & countnum[2] & !countnum[3];
A1L19Q_or_out = A1L19Q_p2_out # A1L19Q_p4_out;
A1L19Q_reg_input = countnum[0] $ A1L19Q_or_out;
A1L19Q = DFFE(A1L19Q_reg_input, GLOBAL(clock), , , hold);


--A1L21Q is numa[1]~reg0
A1L21Q_p0_out = !countnum[0] & !countnum[1] & countnum[4] & countnum[3] & countnum[2];
A1L21Q_p1_out = !countnum[0] & !countnum[1] & countnum[5];
A1L21Q_p2_out = countnum[0] & countnum[1] & countnum[5];
A1L21Q_p4_out = countnum[0] & countnum[1] & countnum[4] & countnum[3];
A1L21Q_or_out = A1L28 # A1L21Q_p0_out # A1L21Q_p1_out # A1L21Q_p2_out # A1L21Q_p4_out;
A1L21Q_reg_input = A1L21Q_or_out;
A1L21Q = DFFE(A1L21Q_reg_input, GLOBAL(clock), , , hold);


--A1L25Q is numa[3]~reg0
A1L25Q_p0_out = countnum[3] & !countnum[0] & !countnum[4] & !countnum[1] & !countnum[5];
A1L25Q_p1_out = countnum[2] & !countnum[3] & countnum[0] & !countnum[4];
A1L25Q_p2_out = countnum[2] & !countnum[3] & !countnum[4] & countnum[1];
A1L25Q_p4_out = !countnum[2] & countnum[3] & !countnum[4] & !countnum[5];
A1L25Q_or_out = A1L29 # A1L25Q_p0_out # A1L25Q_p1_out # A1L25Q_p2_out # A1L25Q_p4_out;
A1L25Q_reg_input = A1L25Q_or_out;
A1L25Q = DFFE(A1L25Q_reg_input, GLOBAL(clock), , , hold);


--A1L23Q is numa[2]~reg0
A1L23Q_p0_out = !countnum[2] & !countnum[0] & !countnum[1] & !countnum[4] & !countnum[5];
A1L23Q_p1_out = !countnum[2] & countnum[0] & countnum[1] & countnum[4] & countnum[3];
A1L23Q_p2_out = countnum[2] & !countnum[0] & countnum[4] & countnum[3];
A1L23Q_p4_out = countnum[2] & countnum[0] & !countnum[4] & !countnum[5];
A1L23Q_or_out = A1L30 # A1L23Q_p0_out # A1L23Q_p1_out # A1L23Q_p2_out # A1L23Q_p4_out;
A1L23Q_reg_input = A1L23Q_or_out;
A1L23Q = DFFE(A1L23Q_reg_input, GLOBAL(clock), , , hold);


--A1L42Q is numb[4]~reg0
A1L42Q_p0_out = countnum[3] & countnum[4] & countnum[0] & !countnum[2];
A1L42Q_p2_out = countnum[3] & !countnum[4] & countnum[1];
A1L42Q_p4_out = countnum[1] & countnum[5] & countnum[0];
A1L42Q_or_out = A1L43 # A1L42Q_p0_out # A1L42Q_p2_out # A1L42Q_p4_out;
A1L42Q_reg_input = !countnum[4] $ A1L42Q_or_out;
A1L42Q = DFFE(A1L42Q_reg_input, GLOBAL(clock), , , hold);


--A1L40Q is numb[3]~reg0
A1L40Q_p0_out = countnum[2] & countnum[5] & countnum[4];
A1L40Q_p2_out = !countnum[2] & countnum[1] & countnum[5] & countnum[0];
A1L40Q_p4_out = !countnum[2] & countnum[5] & !countnum[4];
A1L40Q_or_out = A1L44 # A1L40Q_p0_out # A1L40Q_p2_out # A1L40Q_p4_out;
A1L40Q_reg_input = countnum[3] $ A1L40Q_or_out;
A1L40Q = DFFE(A1L40Q_reg_input, GLOBAL(clock), , , hold);


--A1L38Q is numb[2]~reg0
A1L38Q_p0_out = countnum[4] & !countnum[1] & !countnum[5] & countnum[0] & countnum[3];
A1L38Q_p2_out = !countnum[4] & !countnum[1] & countnum[5] & !countnum[0];
A1L38Q_p4_out = countnum[4] & !countnum[1] & !countnum[5] & countnum[2] & countnum[3];
A1L38Q_or_out = A1L46 # A1L38Q_p0_out # A1L38Q_p2_out # A1L38Q_p4_out;
A1L38Q_reg_input = countnum[2] $ A1L38Q_or_out;
A1L38Q = DFFE(A1L38Q_reg_input, GLOBAL(clock), , , hold);


--A1L27Q is numa[4]~reg0
A1L27Q_p0_out = countnum[5] & !countnum[4] & countnum[2];
A1L27Q_p1_out = !countnum[3] & !countnum[5] & countnum[4];
A1L27Q_p2_out = countnum[5] & !countnum[4] & countnum[0] & countnum[1];
A1L27Q_p4_out = countnum[3] & !countnum[4];
A1L27Q_or_out = A1L31 # A1L27Q_p0_out # A1L27Q_p1_out # A1L27Q_p2_out # A1L27Q_p4_out;
A1L27Q_reg_input = !(A1L27Q_or_out);
A1L27Q = DFFE(A1L27Q_reg_input, GLOBAL(clock), , , hold);


--A1L14 is greenb~47
A1L14_p1_out = countnum[5] & hold & !countnum[4] & !countnum[3];
A1L14 = A1L14_p1_out;


--A1L28 is numa~2161
A1L28_p0_out = countnum[0] & !countnum[1] & !countnum[5] & !countnum[3] & !countnum[2];
A1L28_p1_out = !countnum[0] & countnum[1] & !countnum[5] & !countnum[3];
A1L28_p2_out = countnum[0] & !countnum[1] & !countnum[5] & !countnum[4];
A1L28_p3_out = !countnum[0] & countnum[1] & !countnum[5] & !countnum[4];
A1L28_p4_out = countnum[0] & countnum[1] & countnum[4] & countnum[2];
A1L28 = A1L28_p0_out # A1L28_p1_out # A1L28_p2_out # A1L28_p3_out # A1L28_p4_out;


--A1L29 is numa~2167
A1L29_p0_out = !countnum[3] & countnum[1] & countnum[0] & countnum[5];
A1L29_p1_out = !countnum[2] & countnum[3] & countnum[1] & !countnum[0];
A1L29_p2_out = !countnum[2] & countnum[3] & !countnum[1] & countnum[0];
A1L29_p3_out = !countnum[2] & countnum[3] & !countnum[1] & countnum[5];
A1L29_p4_out = countnum[2] & !countnum[3] & countnum[5];
A1L29 = A1L29_p0_out # A1L29_p1_out # A1L29_p2_out # A1L29_p3_out # A1L29_p4_out;


--A1L30 is numa~2173
A1L30_p0_out = !countnum[0] & !countnum[1] & countnum[4] & !countnum[5] & !countnum[3];
A1L30_p1_out = countnum[2] & countnum[0] & !countnum[1];
A1L30_p2_out = countnum[2] & !countnum[0] & countnum[1] & !countnum[4];
A1L30_p3_out = !countnum[2] & countnum[0] & countnum[1] & countnum[5];
A1L30_p4_out = countnum[2] & !countnum[0] & countnum[5];
A1L30 = A1L30_p0_out # A1L30_p1_out # A1L30_p2_out # A1L30_p3_out # A1L30_p4_out;


--A1L43 is numb~1971
A1L43_p0_out = countnum[2] & countnum[3] & !countnum[1];
A1L43_p1_out = !countnum[4] & countnum[5];
A1L43_p2_out = countnum[5] & countnum[2];
A1L43_p3_out = countnum[5] & countnum[3];
A1L43_p4_out = !countnum[2] & countnum[3] & countnum[1];
A1L43 = A1L43_p0_out # A1L43_p1_out # A1L43_p2_out # A1L43_p3_out # A1L43_p4_out;


--A1L44 is numb~1977
A1L44_p0_out = !countnum[2] & !countnum[5] & countnum[4] & countnum[3];
A1L44_p1_out = !countnum[2] & !countnum[1] & !countnum[5];
A1L44_p2_out = !countnum[1] & countnum[5] & !countnum[4];
A1L44_p3_out = countnum[5] & !countnum[4] & countnum[3];
A1L44_p4_out = !countnum[1] & !countnum[5] & countnum[4] & countnum[3];
A1L44 = A1L44_p0_out # A1L44_p1_out # A1L44_p2_out # A1L44_p3_out # A1L44_p4_out;


--A1L45 is numb~1983
A1L45_p1_out = !countnum[4] & countnum[1] & !countnum[5];
A1L45 = A1L45_p1_out;


--A1L46 is numb~1985
A1L46_p0_out = !countnum[1] & countnum[5] & !countnum[4] & !countnum[2];
A1L46_p1_out = !countnum[3] & countnum[1] & !countnum[5];
A1L46_p2_out = countnum[1] & countnum[5] & countnum[4] & countnum[0];
A1L46_p3_out = countnum[3] & countnum[1] & countnum[5] & countnum[0] & countnum[2];
A1L46_p4_out = !countnum[3] & !countnum[1] & countnum[5] & !countnum[4];
A1L46 = A1L45 # A1L46_p0_out # A1L46_p1_out # A1L46_p2_out # A1L46_p3_out # A1L46_p4_out;


--A1L31 is numa~2179
A1L31_p0_out = countnum[1] & !countnum[3] & !countnum[5] & countnum[2];
A1L31_p1_out = !countnum[0] & !countnum[1] & countnum[3] & !countnum[5] & !countnum[2];
A1L31_p2_out = !countnum[0] & !countnum[3] & !countnum[2] & countnum[4];
A1L31_p3_out = !countnum[1] & !countnum[3] & !countnum[2] & countnum[4];
A1L31_p4_out = countnum[0] & !countnum[3] & !countnum[5] & countnum[2];
A1L31 = A1L31_p0_out # A1L31_p1_out # A1L31_p2_out # A1L31_p3_out # A1L31_p4_out;


--clock is clock
--operation mode is input

clock = INPUT();


--reset is reset
--operation mode is input

reset = INPUT();


--hold is hold
--operation mode is input

hold = INPUT();


--flash is flash
--operation mode is output

flash = OUTPUT(A1L10Q);


--reda is reda
--operation mode is output

reda = OUTPUT(A1L48Q);


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

numb[0] = OUTPUT(A1L34Q);


--greena is greena
--operation mode is output

greena = OUTPUT(A1L12Q);


--yellowa is yellowa
--operation mode is output

yellowa = OUTPUT(A1L53Q);


--redb is redb
--operation mode is output

redb = OUTPUT(A1L50Q);


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

numb[1] = OUTPUT(A1L36Q);


--greenb is greenb
--operation mode is output

greenb = OUTPUT(A1L15Q);


--yellowb is yellowb
--operation mode is output

yellowb = OUTPUT(A1L55Q);


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

numa[0] = OUTPUT(A1L19Q);


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

numa[1] = OUTPUT(A1L21Q);


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

numa[2] = OUTPUT(A1L23Q);


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

numa[3] = OUTPUT(A1L25Q);


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

numb[2] = OUTPUT(A1L38Q);


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

numb[3] = OUTPUT(A1L40Q);


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

numb[4] = OUTPUT(A1L42Q);


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

numa[4] = OUTPUT(A1L27Q);


⌨️ 快捷键说明

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