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

Subversion Repositories ion

[/] [ion/] [trunk/] [vhdl/] [demo/] [c2sb_demo.vhdl] - Diff between revs 234 and 240

Show entire file | Details | Blame | View Log

Rev 234 Rev 240
Line 136... Line 136...
 
 
-- Synchronization FF chain for asynchronous reset input
-- Synchronization FF chain for asynchronous reset input
signal reset_sync :         std_logic_vector(3 downto 0);
signal reset_sync :         std_logic_vector(3 downto 0);
 
 
-- Reset pushbutton debouncing logic
-- Reset pushbutton debouncing logic
subtype t_debouncer is integer range 0 to CLOCK_FREQ*4;
subtype t_debouncer is natural range 0 to CLOCK_FREQ*4;
constant DEBOUNCING_DELAY : t_debouncer := 1500;
constant DEBOUNCING_DELAY : t_debouncer := 1500;
signal debouncing_counter : t_debouncer := (CLOCK_FREQ/1000) * DEBOUNCING_DELAY;
signal debouncing_counter : t_debouncer := (CLOCK_FREQ/1000) * DEBOUNCING_DELAY;
 
 
-- Quad 7-segment display (non multiplexed) & LEDS
-- Quad 7-segment display (non multiplexed) & LEDS
signal display_data :       std_logic_vector(15 downto 0);
signal display_data :       std_logic_vector(15 downto 0);
Line 256... Line 256...
        clk         => clk,
        clk         => clk,
        reset       => reset
        reset       => reset
    );
    );
 
 
 
 
 
 
--##############################################################################
--##############################################################################
-- GPIO and LEDs
-- GPIO and LEDs
--##############################################################################
--##############################################################################
 
 
---- LEDS -- We'll use the LEDs to display debug info --------------------------
---- LEDS -- We'll use the LEDs to display debug info --------------------------
 
 
-- HEX display is mostly unused
-- HEX display is mostly unused
reg_display <= p0_out(31 downto 16);
reg_display <= p0_out(31 downto 16);
 
 
 
 
-- Show the SD interface signals on the green leds for debug
-- Show the SD interface signals on the green leds for debug
reg_gleds <= p1_in(0) & "0000" & p0_out(2 downto 0);
reg_gleds <= p1_in(0) & "0000" & p0_out(2 downto 0);
 
 
-- Red leds (light with '1') -- some CPU control signals
-- Red leds (light with '1') -- some CPU control signals
red_leds(0) <= debug_info.cache_enabled;
red_leds(0) <= debug_info.cache_enabled;
Line 277... Line 279...
red_leds(3) <= '0';
red_leds(3) <= '0';
red_leds(4) <= '0';
red_leds(4) <= '0';
red_leds(5) <= '0';
red_leds(5) <= '0';
red_leds(6) <= '0';
red_leds(6) <= '0';
red_leds(7) <= '0';
red_leds(7) <= '0';
red_leds(8) <= '0';
red_leds(8) <= reset;
red_leds(9) <= clk_1hz;
red_leds(9) <= clk_1hz;
 
 
 
 
--##############################################################################
--##############################################################################
-- terasIC Cyclone II STARTER KIT BOARD -- interface to on-board devices
-- terasIC Cyclone II STARTER KIT BOARD -- interface to on-board devices
Line 362... Line 364...
            end if;
            end if;
        end if;
        end if;
    end if;
    end if;
end process reset_debouncing;
end process reset_debouncing;
 
 
--
-- Reset will be active and glitch free for some serious time (1.5 s).
reset <= '1' when debouncing_counter /= 0 or pll_locked='0' else '0';
reset <= '1' when debouncing_counter /= 0 or pll_locked='0' else '0';
 
 
-- Generate a 1-Hz 'clock' to flash a LED for visual reference.
-- Generate a 1-Hz 'clock' to flash a LED for visual reference.
process(clk)
process(clk)
begin
begin

powered by: WebSVN 2.1.0

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