📄
字号:
library IEEE;
use IEEE.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity dsf is
port (
a: in STD_LOGIC_VECTOR (6 downto 0);
c: out STD_LOGIC
);
end dsf;
architecture dsf_arch of dsf is
signal tmp1: integer ;
begin
process ( a )
variable tmp: integer ;
begin
tmp := 0;
for i in 0 to 6 loop
if a(i) ='1' then tmp := tmp +1 ;
end if;
end loop;
tmp1<=tmp;
end process ;
with tmp1 select
c<='1' when 4,
'1' when 5,
'1' when 6,
'1' when 7,
'0' when others;
-- <<enter your statements here>>
end dsf_arch;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -