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

error 10327 please help!

booman
Beginner
430 Views

I am trying to learn vhdl case statements and have been scratching my head trying to find the issue please help:

library ieee;
use ieee.std_logic_1164.all;library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity task1sq is
port(a,b,c,d: in std_logic;
sq: out std_logic);
end task1sq;

architecture behaviour of task1sq is
begin
process(a,b,c,d) --if implementation for prime
begin
case a & b & c & d is
when "0011" => sq <= '0';
when "0010" => sq <= '0';
when "0101" => sq <= '0';
when "0111" => sq <= '0';
when "0110" => sq <= '0';
when "1100" => sq <= '0';
when "1101" => sq <= '0';
when "1111" => sq <= '0';
when "1110" => sq <= '0';
when "1000" => sq <= '0';
when "1011" => sq <= '0';
when "1010" => sq <= '0';
when others => sq <= '1';
end case;
end process;
end behaviour;

0 Kudos
1 Solution
RichardTanSY_Intel
399 Views

The Error messages shown is:

Error (10327): VHDL error at task1sq.vhd(15): can't determine definition of operator ""&"" -- found 4 possible definitions


I have change the code below to pass the Analysis & Synthesis.

Recommend to checkout this page https://nandland.com/case-statement/ on how to use the case statement.


library ieee;

use ieee.std_logic_1164.all;library ieee;

use ieee.std_logic_1164.all;

use ieee.numeric_std.all;


entity task1sq is

port(a,b,c,d: in std_logic;

sq: out std_logic);

end task1sq;


architecture behaviour of task1sq is

begin

process(a,b,c,d) --if implementation for prime


variable v_CONCATENATE : std_logic_vector(3 downto 0);


begin


  v_CONCATENATE := a & b &c & d;

   

  case v_CONCATENATE is


when "0011" => sq <= '0';

when "0010" => sq <= '0';

when "0101" => sq <= '0';

when "0111" => sq <= '0';

when "0110" => sq <= '0';

when "1100" => sq <= '0';

when "1101" => sq <= '0';

when "1111" => sq <= '0';

when "1110" => sq <= '0';

when "1000" => sq <= '0';

when "1011" => sq <= '0';

when "1010" => sq <= '0';

when others => sq <= '1';


end case;

end process;

end behaviour;


Best Regards,

Richard Tan

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


View solution in original post

0 Kudos
3 Replies
sstrell
Honored Contributor III
406 Views

FYI it helps if you post the actual error message you get instead of just a number since that gives way more info, including what line number is causing the error.  I googled and found this is an undefined operator error but I still don't know what line has the issue.

My guess is that you need to have "end entity task1sq;" instead of just "end task1sq;".

0 Kudos
RichardTanSY_Intel
400 Views

The Error messages shown is:

Error (10327): VHDL error at task1sq.vhd(15): can't determine definition of operator ""&"" -- found 4 possible definitions


I have change the code below to pass the Analysis & Synthesis.

Recommend to checkout this page https://nandland.com/case-statement/ on how to use the case statement.


library ieee;

use ieee.std_logic_1164.all;library ieee;

use ieee.std_logic_1164.all;

use ieee.numeric_std.all;


entity task1sq is

port(a,b,c,d: in std_logic;

sq: out std_logic);

end task1sq;


architecture behaviour of task1sq is

begin

process(a,b,c,d) --if implementation for prime


variable v_CONCATENATE : std_logic_vector(3 downto 0);


begin


  v_CONCATENATE := a & b &c & d;

   

  case v_CONCATENATE is


when "0011" => sq <= '0';

when "0010" => sq <= '0';

when "0101" => sq <= '0';

when "0111" => sq <= '0';

when "0110" => sq <= '0';

when "1100" => sq <= '0';

when "1101" => sq <= '0';

when "1111" => sq <= '0';

when "1110" => sq <= '0';

when "1000" => sq <= '0';

when "1011" => sq <= '0';

when "1010" => sq <= '0';

when others => sq <= '1';


end case;

end process;

end behaviour;


Best Regards,

Richard Tan

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


0 Kudos
RichardTanSY_Intel
373 Views

Thank you for acknowledge the solution provided.

 I’m glad that your question has been addressed, I now transition this thread to community support.

Thank you.

 

Best Regards,

Richard Tan

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


0 Kudos
Reply