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

Subversion Repositories uart_block

[/] [uart_block/] [trunk/] [hdl/] [iseProject/] [baud_generator.vhd] - Diff between revs 6 and 8

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

Rev 6 Rev 8
Line 25... Line 25...
                if rst = '1' then
                if rst = '1' then
                        wait_clk_cycles := (others => '0');
                        wait_clk_cycles := (others => '0');
                        half_cycle := '0' & cycle_wait(cycle_wait'high downto 1);
                        half_cycle := '0' & cycle_wait(cycle_wait'high downto 1);
                        genTick <= '0';
                        genTick <= '0';
                elsif rising_edge(clk) then
                elsif rising_edge(clk) then
                        if wait_clk_cycles = cycle_wait then
                        -- Just decremented the cycle_wait by one because genTick would be updated on the next cycle
 
                        -- and we really want to bring genTick <= '1' when (wait_clk_cycles = cycle_wait)
 
                        if wait_clk_cycles = (cycle_wait - conv_std_logic_vector(1, (nBitsLarge-1))) then
                                genTick <= '1';
                                genTick <= '1';
                                wait_clk_cycles := (others => '0');
                                wait_clk_cycles := (others => '0');
                        else
                        else
                                wait_clk_cycles := wait_clk_cycles + conv_std_logic_vector(1, (nBitsLarge-1));
                                wait_clk_cycles := wait_clk_cycles + conv_std_logic_vector(1, (nBitsLarge-1));
                                -- If we're at half of the cycle
                                -- If we're at half of the cycle

powered by: WebSVN 2.1.0

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