registro_pixel.vhd
来自「用VHDL实现视频控制程序,实现对图像的采集和压缩,」· VHDL 代码 · 共 39 行
VHD
39 行
library IEEE;
use IEEE.std_logic_1164.all;
entity registro_pixel is
generic ( N:integer:=8 );
port (
PIXEL_IN: in STD_LOGIC_VECTOR (N-1 downto 0);
PIXEL_OUT: out STD_LOGIC_VECTOR (N-1 downto 0);
Enable: in STD_LOGIC;
clk: in STD_LOGIC;
resetz: in STD_LOGIC
);
end registro_pixel;
architecture registro_pixel_arch of registro_pixel is
signal salida, p_salida: std_logic_vector(N-1 downto 0);
begin
sinc: process(resetz,clk)
begin
if(resetz='0')then
salida<=(OTHERS=>'0');
elsif(clk'event and clk='1')then
salida<=p_salida;
end if;
end process sinc;
PIXEL_OUT<=salida;
registro: process(PIXEL_IN,enable,salida)
begin
if(enable='1')then
p_salida<=PIXEL_IN;
else
p_salida<=salida;
end if;
end process registro;
end registro_pixel_arch;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?