|
本帖最后由 fpgaw 于 2010-7-15 12:30 编辑
有高手能帮忙解释一下下列程序中hstart,hstop,vstart,vstop的作用吗?是用来干嘛的,是一个类似于计数器的信号还是说是一行数据第一个像素的像素值?谢谢
entity hw_calc is
port (
-- interface from sensor
vclk : in std_logic; -- videoclock
vsy : in std_logic; -- VSync (Micron: FRAME_VALID-Signal)
vref : in std_logic; -- Frame Valid
hsy : in std_logic; -- HSync (Micron: LINE_VALID-Signal)
href : in std_logic; -- Line Valid (pixel between hstart and hstop)
vdata : in std_logic_vector( 7 downto 0); -- Video Data (line between vstart and vstop)
hstart : in std_logic_vector(15 downto 0); -- horizontal start pixel after hsy
hstop : in std_logic_vector(15 downto 0); -- horizonatl stop pixel after hsy
vstart : in std_logic_vector(15 downto 0); -- vertical start line after vsy (always 0 in line mode)
vstop : in std_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; |
|