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

📄 shift.vhd

📁 本设计是一个八位被除数除以四位除数
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity shift is
	port(shifted:in std_logic_vector(8 downto 0);
		sh_en:in std_logic;
		load:in std_logic;
		c:in std_logic;
		differ:out std_logic_vector(8 downto 0));
	end shift;
architecture behav of shift is
signal shiftin:std_logic_vector(8 downto 0);
begin
   sh_perform:process(shifted,sh_en,c)
	begin
	if load='1' then shiftin<=shifted;
	elsif rising_edge(sh_en) then
		shiftin(0)<=c;
		shiftin(1)<=shifted(0);
		shiftin(2)<=shifted(1);
		shiftin(3)<=shifted(2);
		shiftin(4)<=shifted(3);
		shiftin(5)<=shifted(4);
		shiftin(6)<=shifted(5);
		shiftin(7)<=shifted(6);
		shiftin(8)<=shifted(7);	
	end if;
	end process sh_perform;
	differ<=shiftin;
end behav;

⌨️ 快捷键说明

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