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

📄 reg.vhd

📁 实现16种运算的alu,包括+,-,+1,-1,与或非以及移位比较运算。经调试成功。
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;

entity reg is
	port
	(
		clr: 		in	std_logic;
		D:		 	in	std_logic_vector(15 downto 0);
		clock:		in	std_logic;
		write:		in	std_logic;
	    sel:		in	std_logic;
		Q:		 	out	std_logic_vector(15 downto 0)
	);
	
end reg;

architecture behav of reg is
begin
	process(clr,clock)
	begin
		if clr = '0' then
			Q <= x"0000"; 	
		elsif (clock'event and clock = '1') then
			if sel = '1' and write = '1' then
				Q <= D;
			end if;
		end if;
	end process;
end behav;

⌨️ 快捷键说明

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