Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16595 Discussions

Error (10327): VHDL error at QA4.vhd(48): can't determine definition of operator "">""

jcl2000
Beginner
2,194 Views

Not sure why i'm getting this error, any help would be appreciated. 
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

Entity Radar is
port(rin : in STD_LOGIC_VECTOR(7 downto 0);
AngleCode : in STD_LOGIC_VECTOR(3 downto 0);
xDist : out STD_LOGIC_VECTOR(7 downto 0);
Warning : out STD_LOGIC_VECTOR(2 downto 0));

end entity Radar;

architecture behavior of Radar is

signal int_rin,rinby8,xDistUnsigned: unsigned(7 downto 0);
constant code0: std_logic_vector(3 downto 0) := "0000";
constant code1: std_logic_vector(3 downto 0) := "0001";
constant code2: std_logic_vector(3 downto 0) := "0010";
constant code3: std_logic_vector(3 downto 0) := "0011";
constant code4: std_logic_vector(3 downto 0) := "0100";
constant code5: std_logic_vector(3 downto 0) := "0101";
constant code6: std_logic_vector(3 downto 0) := "0110";
constant code7: std_logic_vector(3 downto 0) := "0111";
constant code8: std_logic_vector(3 downto 0) := "1000";

 


begin
int_rin <= unsigned(rin);
rinby8 <= shift_right(int_rin,3);
with AngleCode select
xDistUnsigned <= "00000000" when code0,
rinby8 when code1,
shift_left(rinby8,1) when code2,
rinby8+shift_left(rinby8,1) when code3,
shift_left(rinby8,2) when code4,
rinby8+shift_left(rinby8,2) when code5,
shift_left(rinby8,3) when code6,
rinby8+shift_left(rinby8,3) when code7,
int_rin when others;

xDist <= std_logic_vector(XDistUnsigned(7 downto 0));



Warning <= "111" when(xDist > 11001000) else
"110" when(xDist > 10010110) else
"100" when(xDist > 01100100) else
"011" when(xDist > 00110010) else
"010" when(xDist > 00011001) else
"001" when(xDist > 00000101) else
"000";
end architecture behavior;

0 Kudos
1 Solution
RichardTanSY_Intel
2,175 Views

I am not a VHDL expert but I believe that the less than ">" operator has been used to compare two type of value: std_logic_vector and integer. 

Greater than and less than are relational operators, while using relational operators is that the two numbers being compared must be of the same 'type'. An integer cannot be compared to a std_logic_vector type value.

From what I get from another case:  

https://community.intel.com/t5/Intel-Quartus-Prime-Software/Error-10327-Can-t-determine-definition-of-operator-quot-quot/td-p/61149

You can use explicit numeric types SIGNED or UNSIGNED. Alternatively you can use a library that treats all std_logic_vector as SIGNED or UNSIGNED type: IEEE.STD_LOGIC_SIGNED respectively IEEE.STD_LOGIC_UNSIGNED.

I hope it helps. 

Best Regards,
Richard Tan

p/s: If any answer from the community or Intel support are helpful, please feel free to give Kudos. 

View solution in original post

0 Kudos
2 Replies
RichardTanSY_Intel
2,176 Views

I am not a VHDL expert but I believe that the less than ">" operator has been used to compare two type of value: std_logic_vector and integer. 

Greater than and less than are relational operators, while using relational operators is that the two numbers being compared must be of the same 'type'. An integer cannot be compared to a std_logic_vector type value.

From what I get from another case:  

https://community.intel.com/t5/Intel-Quartus-Prime-Software/Error-10327-Can-t-determine-definition-of-operator-quot-quot/td-p/61149

You can use explicit numeric types SIGNED or UNSIGNED. Alternatively you can use a library that treats all std_logic_vector as SIGNED or UNSIGNED type: IEEE.STD_LOGIC_SIGNED respectively IEEE.STD_LOGIC_UNSIGNED.

I hope it helps. 

Best Regards,
Richard Tan

p/s: If any answer from the community or Intel support are helpful, please feel free to give Kudos. 

0 Kudos
RichardTanSY_Intel
2,155 Views

I believed that I have answered your question and I yet to receive any response from you to the previous question/reply/answer that I have provided. 
With that, I will now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.

Best Regards,
Richard Tan

p/s: If any answer from the community or Intel support are helpful, please feel free to give Kudos. 

0 Kudos
Reply