nsgil85
Member level 4
hi all
i'v 2 std vectors (16 bit wide) and i need to compare them within threshold (4 bit wide).
i know there is a problem on the edges of the vector, for example:
2>= 0-7
any suggestion would be aprochiated
Best
Gil
i'v 2 std vectors (16 bit wide) and i need to compare them within threshold (4 bit wide).
Code:
enable <= '1' when unsigned(DATA) <= ((DATA2)+("0000"&unsigned(THRESHOLD))) and
unsigned(DATA) >= ((DATA2)-("0000"&unsigned(THRESHOLD))) else
'0' ;
2>= 0-7
any suggestion would be aprochiated
Best
Gil