synthese problems

O

Olaf Petzold

Hi,

I've got the following error:
parse error, unexpected WHEN, expecting SEMICOLON

on synthesis of the this peace of code:

entity trigger is
port(
clk : in std_logic;
...
);
end entity;

architecture behavioral of trigger is

signal m_pattern : std_logic := '0';
signal m_edge : std_logic := '0';

begin

...

trig_proc: process(clk)
begin
if rising_edge(clk) then
match <= '1' -- HERE
when (m_pattern ='1') and (m_edge = '1')
else '0';
end if;

end process;

end behavioral;

Is this not allowed inside a process, only inside archtitectures??

Thanks and regards,
Olaf
 
M

Mike Treseler

Olaf Petzold wrote:

if rising_edge(clk) then
match <= '1' -- HERE
when (m_pattern ='1') and (m_edge = '1')
else '0';
end if;
Is this not allowed inside a process, only inside archtitectures??

Use *if/then/else* inside a process.
Use *when* outside.
That's just the way it is.

-- Mike Treseler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top