OpenCores
URL https://opencores.org/ocsvn/jart/jart/trunk

Subversion Repositories jart

[/] [jart/] [branches/] [ver0branch/] [yu.vhd] - Diff between revs 77 and 80

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 77 Rev 80
Line 32... Line 32...
 
 
entity yu is
entity yu is
        generic (
        generic (
                TOP : integer := 1024;                                                          -- Define the max counting number.. the number must be expressed as 2 power, cause the range of counting is going to be defined as TOP-1 downto TOP/2.
                TOP : integer := 1024;                                                          -- Define the max counting number.. the number must be expressed as 2 power, cause the range of counting is going to be defined as TOP-1 downto TOP/2.
                                                                                                                        -- However this is going to be by now, cause in the future the ray generation will GO on for higher resolution images , and perhaps it would be required a more extended range for the yu component.
                                                                                                                        -- However this is going to be by now, cause in the future the ray generation will GO on for higher resolution images , and perhaps it would be required a more extended range for the yu component.
                SCREENW : integer range 0 to 1023 := 320                         --  resolution width is 320 
                SCREENW : integer := 320                        --  resolution width is 320 
        );
        );
        port (
        port (
                clk,ena,rst             : in std_logic;
                clk,rst,ena             : in std_logic;
                lineDone                : out std_logic;                                        -- Finished image row. once a hundred and sixty times....
                lineDone                : out std_logic;                                        -- Finished image row. once a hundred and sixty times....
                ypos                    : out integer range TOP/2 to TOP-1
                ypos                    : out integer range TOP/2 to TOP-1
--              ocntr                   : out integer range 0 to SCREENW/2 
--              ocntr                   : out integer range 0 to SCREENW/2 
        );
        );
end entity;
end entity;
Line 126... Line 126...
 
 
                        -- Now, the integration function, cause we are at a new line..
                        -- Now, the integration function, cause we are at a new line..
                        if cc = 0 then
                        if cc = 0 then
                                ypos <= f1;
                                ypos <= f1;
                                f0 := f1;
                                f0 := f1;
                                lineDone <='1';
 
                        else
                        else
                                lineDone <='0';
 
                                ypos <= f0;
                                ypos <= f0;
                                if sf0(0)='1' then
                                if sf0(0)='1' then
                                        f0 := f0 - 1;
                                        f0 := f0 - 1;
                                end if;
                                end if;
                        end if;
                        end if;
 
 
                        -- Count when reach linefeed +3 (159) then turn cc into 0, else turn it into cc+1!
                        -- Count when reach linefeed +3 (159) then turn cc into 0, else turn it into cc+1!
                        if cc=linefeed+3 then
                        if cc=linefeed+3 then
 
                                lineDone <='1';
                                if sf1(0) = '1' then
                                if sf1(0) = '1' then
                                        f1 := f1 - 1;
                                        f1 := f1 - 1;
                                end if;
                                end if;
                                cc:=0;
                                cc:=0;
                        else
                        else
 
                                lineDone <='0';
                                cc:=cc+1;
                                cc:=cc+1;
                        end if;
                        end if;
 
 
                end if;
                end if;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.