A
AG
Guest
Hi,
I am new in vhdl.
In my book, the following code is given :
entity LATCH ....
end entity;
architecture A of LATCH is
begin
process
begin
if CK='1' then
Q <= D;
QB <= not D;
end if;
wait on CK,D; -- compiler error
end process;
end A;
Compilier says during elaboration :
'Wait Statement must contain condition clause with UNTIL keyword'
If I use the sensitivity list instead, the problem disappears. (except the
fact that the behavior is not strictly equivalent).
In my book, it says that using "sensitivity list" is an old fashion way of
coding, and using the wait statement is better (more generic). Who should I
believe ?
This leads me to the following question : if not all vhdl statement are
valid, how do I write portable vhdl so that it can be compiled on several
targets ?
I use Quartus II web free edition.
Thanks.
Heydji.
I am new in vhdl.
In my book, the following code is given :
entity LATCH ....
end entity;
architecture A of LATCH is
begin
process
begin
if CK='1' then
Q <= D;
QB <= not D;
end if;
wait on CK,D; -- compiler error
end process;
end A;
Compilier says during elaboration :
'Wait Statement must contain condition clause with UNTIL keyword'
If I use the sensitivity list instead, the problem disappears. (except the
fact that the behavior is not strictly equivalent).
In my book, it says that using "sensitivity list" is an old fashion way of
coding, and using the wait statement is better (more generic). Who should I
believe ?
This leads me to the following question : if not all vhdl statement are
valid, how do I write portable vhdl so that it can be compiled on several
targets ?
I use Quartus II web free edition.
Thanks.
Heydji.