📄 reg_6bits.vhd
字号:
------------------------------------------------------------------------
-- reg_6bits.vhd --
------------------------------------------------------------------------
-- Authors : Albert Zemba & Mihai Cucicea
------------------------------------------------------------------------
-- Software version: Xilinx ISE 7.1i
-- WebPack
------------------------------------------------------------------------
-- This source file contains the reg_6bits component
------------------------------------------------------------------------
-- Behavioral description
-- A 6 bit register with reset and load
------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity reg_6bits is
port(clk, reset, load: in std_logic;
a : in std_logic_vector(5 downto 0);
y : out std_logic_vector(5 downto 0):= "000001"
);
end reg_6bits;
architecture Behavioral of reg_6bits is
begin
process (clk)
begin
if (clk'event and clk = '1') then
if (reset='1') then
y<="000001";
else
if (load='1') then
y <= a;
end if;
end if;
end if;
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -