10327: can't determine definition of operator ""=""

Joined
Nov 6, 2009
Messages
3
Reaction score
0
Hello!

As the titles describes I get this error when trying to compile:
Error (10327): VHDL error at ps2lab1.vhd(126): can't determine definition of operator ""="" -- found 0 possible definitions

I have defined at the top of my code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

this is the part with the error:

PROCESS (scan_ready)
BEGIN
IF (scan_ready'EVENT AND scan_ready = '1') THEN
history(4) <= history(3);
history(3) <= history(2);
history(2) <= history(1);
history(1) <= scan_code;
END IF;
END PROCESS;

I don't understand why this won't work. Any idea?
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
If it is a boolean, you should not compare to '1'; you can use it without an explicit comparison:
Code:
PROCESS (scan_ready)
BEGIN
IF (scan_ready'EVENT AND scan_ready) THEN
--code
END IF;
END PROCESS;

Or, if you prefer, you can explicitly compare to true:
Code:
PROCESS (scan_ready)
BEGIN
IF (scan_ready'EVENT AND scan_ready = true) THEN
--code
END IF;
END PROCESS;
 

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

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,147
Latest member
CarenSchni
Top