interi 发表于 2010-6-27 23:56:46

求图像处理程序注释

本帖最后由 fpgaw 于 2010-7-15 12:30 编辑

有高手能帮忙解释一下下列程序中hstart,hstop,vstart,vstop的作用吗?是用来干嘛的,是一个类似于计数器的信号还是说是一行数据第一个像素的像素值?谢谢
entity hw_calc is
port (
-- interface from sensor
vclk    : instd_logic;      -- videoclock
vsy   : instd_logic;      -- VSync (Micron: FRAME_VALID-Signal)
vref    : instd_logic;      -- Frame Valid
hsy   : instd_logic;      -- HSync (Micron: LINE_VALID-Signal)
href    : instd_logic;      -- Line Valid (pixel between hstart and hstop)
vdata   : instd_logic_vector( 7 downto 0);-- Video Data (line between vstart and vstop)
hstart    : instd_logic_vector(15 downto 0);-- horizontal start pixel after hsy
hstop   : instd_logic_vector(15 downto 0);-- horizonatl stop pixel after hsy
vstart    : instd_logic_vector(15 downto 0);-- vertical start line after vsy (always 0 in line mode)
vstop   : instd_logic_vector(15 downto 0);-- vertical stop line after vsy (always 0 in line mode)
-- interface to sdram-controller (framebuffer)
hw_wr   : out std_logic;      -- write enable
hw_data   : out std_logic_vector( 7 downto 0);-- data
);
end entity;
architecture hw_calc_arch of hw_calc is
begin
-------------------------------------------------------------------------
--data processing
-------------------------------------------------------------------------
calc: process (vclk)
begin
if (vclk'event and vclk = '1') then
if sys_res= '1' then
    hw_data <= x"00";
    hw_wr <= '0';
else
   hw_data <=vdata;   --invert image
hw_wr <= '1';
end if;
end if;
end process calc;
end hw_calc_arch;
页: [1]
查看完整版本: 求图像处理程序注释