📄 scandisp.vhd
字号:
library ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_unsigned.all;
--use ieee.std_logic_arith.all;
entity ScanDisp is
port(
clk1KHZ,reset: in std_logic;
outdis: in std_logic_vector(15 downto 0);
one: out std_logic_vector(3 downto 0);
SS: inout std_logic_vector(2 downto 0));
end ScanDisp;
ARCHITECTURE arch OF ScanDisp IS
BEGIN
scan:PROCESS(clk1KHZ,reset)
BEGIN
if(reset = '0') then
SS <= "111";
elsif(clk1KHZ'event and clk1KHZ = '1') then
if(SS > 4) then
SS <= SS - '1';
else
SS <= "111";
end if;
end if;
END PROCESS scan;
WITH SS SELECT
one <= outdis(3 downto 0) WHEN "111",
outdis(7 downto 4) WHEN "110",
outdis(11 downto 8) WHEN "101",
outdis(15 downto 12) WHEN OTHERS;
END arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -