Skip to content
Snippets Groups Projects
Commit 2d971198 authored by Tristan Gingold's avatar Tristan Gingold
Browse files

Fix blinking led

parent 594a9dd1
No related merge requests found
...@@ -125,7 +125,7 @@ begin ...@@ -125,7 +125,7 @@ begin
if rising_edge(clk_100) then if rising_edge(clk_100) then
if rst_n = '0' then if rst_n = '0' then
led1_o <= '1'; led1_o <= '1';
led2_o <= '1'; led2_o <= '0';
else else
led1_o <= counter (25); led1_o <= counter (25);
led2_o <= counter (23); led2_o <= counter (23);
...@@ -136,7 +136,7 @@ begin ...@@ -136,7 +136,7 @@ begin
iram_addr <= iahb_addr (IRAM_LOG_SIZE + 2 - 1 downto 2); iram_addr <= iahb_addr (IRAM_LOG_SIZE + 2 - 1 downto 2);
iram_data <= ahb_rdata; iram_data <= ahb_rdata;
proc_uart: process (clk_100) proc_init: process (clk_100)
begin begin
if rising_edge(clk_100) then if rising_edge(clk_100) then
iahb_start <= '0'; iahb_start <= '0';
...@@ -150,7 +150,7 @@ begin ...@@ -150,7 +150,7 @@ begin
case state is case state is
when INIT_DELAY => when INIT_DELAY =>
iahb_addr <= (others => '0'); iahb_addr <= (others => '0');
if counter = x"000_0010" then if counter = x"0c0_0000" then
state <= READ_NVM; state <= READ_NVM;
counter <= (others => '0'); counter <= (others => '0');
else else
...@@ -171,6 +171,7 @@ begin ...@@ -171,6 +171,7 @@ begin
end if; end if;
end if; end if;
when DONE => when DONE =>
counter <= counter + 1;
cpu_rst_n <= '1'; cpu_rst_n <= '1';
end case; end case;
end if; end if;
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
library ieee; library ieee;
use ieee.std_logic_1164.all; use ieee.std_logic_1164.all;
library smartfusion2;
use smartfusion2.all;
---------------------------------------------------------------------- ----------------------------------------------------------------------
-- uart entity declaration -- uart entity declaration
---------------------------------------------------------------------- ----------------------------------------------------------------------
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment