spartan3e: invert reset and use the interrupt example by stefan
[calu.git] / cpu / src / core_top_s3e.vhd
index e047c62f8dbb665f1e20b4099475780850e768e2..eb1082322f202fe6bcd2bdb70d448bf7bac8d277 100644 (file)
@@ -17,6 +17,7 @@ entity core_top is
                  -- uart
                        bus_tx : out std_logic;
                        bus_rx : in std_logic;
+                       led1 : out std_logic;
                        
                        sseg0 : out std_logic_vector(0 to 6);
                        sseg1 : out std_logic_vector(0 to 6);
@@ -167,7 +168,8 @@ syn: process(sys_clk, sys_res)
 
 begin
 
-       if sys_res = '0' then
+       if sys_res = '1' then
+               led1 <= '0';
 --                     vers.result <= (others => '0');
 --                     vers.result_addr <= (others => '0');
 --                     vers.address <= (others => '0');
@@ -183,8 +185,9 @@ begin
                sync <= (others => '0');
        
        elsif rising_edge(sys_clk) then
+               led1 <= '1';
 --             vers <= vers_nxt;
-                       sync(1) <= sys_res;
+                       sync(1) <= not sys_res;
                        for i in 2 to SYNC_STAGES loop
                                sync(i) <= sync(i - 1);
                        end loop;