📄 spant.vhd
字号:
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 11:04:43 12/09/06
-- Design Name:
-- Module Name: spant - Behavioral
-- Project Name:
-- Target Device:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
--------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity spant is
port( CLK:IN std_logic;
QA,QB,QC,QD,QE,QF,
QG,QH,QI,QJ,QK,QL,
QM,QN,QO,QP,QQ,QR,
QS,QT,QU,QV,QW,QX
:OUT std_logic);
end spant;
architecture Behavioral of spant is
SIGNAL q:std_logic_vector(14 downto 0):="000000000000000";
--SIGNAL q1:std_logic_vector(2 downto 0):="000";
--SIGNAL C:std_logic ;
begin
p1:process (CLK)
BEGIN
if rising_edge (CLK) then
--IF CLK'EVENT and (CLK='1'OR CLK='H')
--and (CLK'LAST_VALUE='0' OR CLK'LAST_VALUE='L')THEN
IF q="111111111111111"THEN
q<="000000000000000";
else
q<=q+1; --"0000001";
END IF;
END IF;
END PROCESS;
PROCESS (q)
begin
if q< 29952 then
QA<='1';
else
QA<='0';
end if;
if q< 29098 then
QB<='1';
else
QB<='0';
end if;
if q< 28244 then
QC<='1';
else
QC<='0';
end if;
if q< 27392 then
QD<='1';
else
QD<='0';
end if;
if q< 26538 then
QE<='1';
else
QE<='0';
end if;
if q< 25684 then
QF<='1';
else
QF<='0';
end if; --第6路
if q< 24832 then --第7路
QG<='1';
else
QG<='0';
end if;
if q< 23978 then
QH<='1';
else
QH<='0';
end if;
if q< 23124 then
QI<='1';
else
QI<='0';
end if;
if q< 22272 then
QJ<='1';
else
QJ<='0';
end if;
if q< 21418 then
QK<='1';
else
QK<='0';
end if;
if q< 20564 then
QL<='1';
else
QL<='0';
end if; --第12路
if q< 19712 then --第13路
QM<='1';
else
QM<='0';
end if;
if q< 18858 then
QN<='1';
else
QN<='0';
end if;
if q< 18004 then
QO<='1';
else
QO<='0';
end if;
if q< 17152 then
QP<='1';
else
QP<='0';
end if;
if q< 16298 then
QQ<='1';
else
QQ<='0';
end if;
if q< 15444 then
QR<='1';
else
QR<='0';
end if; -- 18ROAD
if q< 14590 then -- 19 ROAD
QS<='1';
else
QS<='0';
end if;
if q< 13736 then
QT<='1';
else
QT<='0';
end if;
if q< 12882 then
QU<='1';
else
QU<='0';
end if;
if q< 12028 then
QV<='1';
else
QV<='0';
end if;
if q< 11174 then
QW<='1';
else
QW<='0';
end if;
if q< 10320 then
QX<='1';
else
QX<='0';
end if;
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -