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

📄 串入并出1-5.txt

📁 本压缩包含有一个窜入并出的程序
💻 TXT
字号:
library ieee;
use ieee.std_logic_1164.all;
entity shifter is
port(shift :in std_logic;
          y:out  std_logic_vector(4 downto 0);
        clk:in std_logic);
end shifter;
architecture bhv of shifter is
signal d:std_logic_vector(4 downto 0);
begin 
process(clk)
variable   cont: integer range 0 to 5 ;

begin
if clk'event and clk='1' then 
 if cont=5 then y<=d;d <="00000";cont:=0;
else cont:=cont+1;
case cont is 
when 1=>d(4)<=shift;
when 2=>d(3)<=shift;           
when 3=>d(2)<=shift;
when 4=>d(1)<=shift;
when 5=>d(0)<=shift;
when others=>null;
end case;
end if;
end if;
end process;
end bhv;

⌨️ 快捷键说明

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