Найдены '0' определения оператора "=", невозможно определить точное перегруженное определение соответствия для "=" - PullRequest
0 голосов
/ 12 октября 2019

Когда я хочу проверить синтаксис в симуляции, у меня появляется эта ошибка. "Строка 105: найдено '0' определений оператора" = ", не могу определить точное перегруженное определение соответствия для" = "" Я пытался добавить библиотеки, как говорили другие в других похожих потоках, но это не помогло. Это мой код, и мои библиотеки использовали:

    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    use IEEE.STD_LOGIC_ARITH.ALL;
    use ieee.std_logic_unsigned.all;
    use IEEE.NUMERIC_STD.ALL;
  -- Uncomment the following library declaration if using
  -- arithmetic functions with Signed or Unsigned values
  --use IEEE.NUMERIC_STD.ALL;

  -- Uncomment the following library declaration if instantiating
  -- any Xilinx primitives in this code.
  --library UNISIM;
  --use UNISIM.VComponents.all;

entity multiwib is

port(trigger : in std_logic;
      reset   : in std_logic;
      CLK     : in std_logic;
      led     : out std_logic
      );

end multiwib;

architecture multiwib_arch of multiwib is
type stany is (stabilny,niestabilny);
 signal stan, stan_nast : stany;
signal licztakty : std_logic_vector(25 downto 0);
signal flaga : std_logic;

begin

reg:process(clk,reset)
begin
    if(reset='1')then
        stan<=stabilny;
    elsif(clk'event and clk='1')then
        stan<=stan_nast;
    end if;
end process reg;


multi:process(clk,trigger)
begin

stan_nast<=stan;

case stan is
      when stabilny=>
             flaga<='0';
             led<='0';
             licztakty<=(others=>'0');

             if(trigger='1')then
             stan<=niestabilny;
             led<='1';
             end if;

        when niestabilny=>

                 if flaga ='1' then

                      stan<=stabilny;
                else 
                      stan<=niestabilny;
                 end if;



 end case;

end process multi;

licznik: процесс (clk, reset) begin

    if reset ='1' then
            licztakty<=(others=>'0');
    elsif(clk'event and clk='1') then
            if(stan=niestabilny) then
                licztakty<=licztakty+"01";
                led<='1';
            elsif(stan=niestabilny and licztakty="?10111110101111000010000000?")then
               flaga<='1';
            elsif(stan=stabilny) then
                    licztakty<=(others=>'0');
            end if;

    end if;

end process licznik;

end multiwib_arch;

1 Ответ

0 голосов
/ 12 октября 2019

Вы написали licztakty="?10111110101111000010000000?".

licztakty является std_logic_vector и? не является допустимым значением std_logic. допустимые значения: 'U', 'X', '0', '1', 'Z', 'W', 'L', 'H', '-'

'?'заставляет компиляцию попробовать и сравнить std_logic_vector со строкой, и я предполагаю, что вы не написали пользовательскую функцию '=' для сравнения.

...