📄 saomiao.vhd
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity saomiao is
port(one,ten:in std_logic_vector(3 downto 0);
clk:in std_logic;---1khz;
data:out std_logic_vector(3 downto 0);
adr:out std_logic_vector(1 downto 0));
end saomiao;
architecture one of saomiao is
signal cnt: std_logic_vector(1 downto 0);
signal d: std_logic_vector(3 downto 0);
begin
process(clk)
begin
if(clk 'event and clk='1')then
if(cnt="01")then
cnt<="00";
else
cnt<=cnt +1;
end if;
end if;
end process;
process(cnt,one,ten)
begin
case cnt is
when "00"=>d<=one;adr<="01";
when "01"=>d<=ten;adr<="10";
when others=>null;
end case;
data<=d;
end process;
end one;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -