generator_reg8.vhd

来自「sin產生器」· VHDL 代码 · 共 35 行

VHD
35
字号
library IEEE;
use IEEE.std_logic_1164.all;

entity generator_reg8 is
port (
CLR : in std_logic;
CE : in std_logic;
CLK : in std_logic;
DATA : in std_logic_vector (11 downto 0);
Q : out std_logic_vector (11 downto 0)
);
end entity;



architecture reg_arch8 of generator_reg8 is
signal TEMP_Q_1: std_logic_vector (11 downto 0);
begin

process (CLK, CLR)
begin

if CLR = '1' then
TEMP_Q_1 <= (others => '0');
elsif rising_edge(CLK) then
if CE = '1' then
TEMP_Q_1 <= DATA;
end if;
end if;

end process;

Q <= TEMP_Q_1;

end architecture;

⌨️ 快捷键说明

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