T
Trygve Laugstřl
Guest
Hello!
I'm trying to get the following snippet to work and I'm 1) wondering
what's wrong and 2) wondering if I'm going about this the right way.
I have two clocks, one CPU clock (at 48MHz) and a LCD clock (200kHz)
which control the CPU and the output to the LCD (obviously enough). What
I want to happen is that the CPU will set trigger on the leading edge of
the CPU clock and clear it on the falling edge of the LCD clock (which
should ensure that it has been picked up by the 'main' process).
The error message I'm getting is "statement is not synthesizable since
it does not hold its value under NOT(clock-edge) condition".
The code:
trigger_xfer: process(reset, clk, clk_200kHz, output_trigger)
begin
trigger <= '0';
if reset = '1' then
trigger <= '0';
elsif clk'event and clk = '1' and output_trigger = '1' then
trigger <= '1';
elsif clk_200kHz'event and clk_200kHz = '0' then
trigger <= '0';
end if;
end process;
main: process(...)
if reset
...
elsif clk_200kHz'event and clk_200kHz = '1' then
...
end if;
end process;
I'm trying to get the following snippet to work and I'm 1) wondering
what's wrong and 2) wondering if I'm going about this the right way.
I have two clocks, one CPU clock (at 48MHz) and a LCD clock (200kHz)
which control the CPU and the output to the LCD (obviously enough). What
I want to happen is that the CPU will set trigger on the leading edge of
the CPU clock and clear it on the falling edge of the LCD clock (which
should ensure that it has been picked up by the 'main' process).
The error message I'm getting is "statement is not synthesizable since
it does not hold its value under NOT(clock-edge) condition".
The code:
trigger_xfer: process(reset, clk, clk_200kHz, output_trigger)
begin
trigger <= '0';
if reset = '1' then
trigger <= '0';
elsif clk'event and clk = '1' and output_trigger = '1' then
trigger <= '1';
elsif clk_200kHz'event and clk_200kHz = '0' then
trigger <= '0';
end if;
end process;
main: process(...)
if reset
...
elsif clk_200kHz'event and clk_200kHz = '1' then
...
end if;
end process;