Binome
Full Member level 3
- Joined
- Nov 16, 2009
- Messages
- 153
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- Lyon, France
- Activity points
- 2,412
Hi,
I'm wondering why I observe such a comportment. I've got a DE0-Nano board and I'm using LEDs to control my design. Here are two different codes:
In the first case the LED is flashing green (wdone is equal to '1'), in the second one it doesn't (wdone is '0').
I don't understand why the rising edge of clock seems to be false but the process is running anyway. Please tell me what I don't know.
Thanks.
I'm wondering why I observe such a comportment. I've got a DE0-Nano board and I'm using LEDs to control my design. Here are two different codes:
Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity ctrl is
port(
clk : in std_logic;
wdone : out std_logic := '0');
end ctrl;
architecture rtl of ctrl is
begin
process(clk)
begin
wdone <= '1';
end process;
end rtl;
Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity ctrl is
port(
clk : in std_logic;
wdone : out std_logic := '0');
end ctrl;
architecture rtl of ctrl is
begin
process(clk)
begin
if rising_edge(clk) then
wdone <= '1';
end if;
end process;
end rtl;
I don't understand why the rising edge of clock seems to be false but the process is running anyway. Please tell me what I don't know.
Thanks.