VHDL нет объявления функции для "=" (оператор if, std_logic) - PullRequest
0 голосов
/ 20 января 2019

Полагаю, пришло время для меня.Поэтому для школы я пишу этот элемент управления VHDL и продолжаю получать одни и те же ошибки.Я искал различные подобные вопросы, но не мог найти решение.Увы, я должен признать, что я абсолютный новичок в VHDL, но научные работники в школе также не могли решить эту проблему.Вот мой код:

library ieee;

use ieee.std_logic_1164.all; 

use ieee.std_logic_arith.ALL; 



entity steuerung is 

  port  

  ( 

    Clk             : in std_logic;
    Reset           : in std_logic;
    AktPos          : in std_logic_vector(15 downto 0);
    Notaus          : in std_logic;
    Betrieb         : in std_logic;
    HPR             : in std_logic;
    HPL             : in std_logic;
    ESR             : in std_logic;
    ESL             : in std_logic;
    CntClr          : out std_logic;
    LedR            : out std_logic;
    LedG            : out std_logic;
    M_An            : out std_logic;
    M_Li            : out std_logic;
    M_Re            : out std_logic;
    State           : out std_logic_vector(2 downto 0)
  );

end steuerung;


architecture behave of steuerung is
begin
        process(Clk, Reset, AktPos, Notaus, Betrieb, ESR, ESL)

            type statet is (auf, ab, steht, notaus, reset_ab, reset_auf);

            variable var_zustand: statet;

            variable var_ausgabe: std_logic_vector (2 downto 0);

        begin

            if Reset = '1' then

                var_zustand := steht;

            elsif(Clk'event and Betrieb = '1') then

                case var_zustand is

                    when steht =>

                        if (ESR = '0' and ESL = '0' and Notaus = '0') then

                            var_zustand := steht;

                        end if;

                        if (ESL = '1' and Notaus = '0' and ESR = '0') then

                            var_zustand := reset_ab;

                        end if;

                        if (ESR = '1' and Notaus = '0') then

                            var_zustand := reset_auf;

                        end if;

                        if (Notaus = '1') then

                            var_zustand := notaus;

                        end if;

                    when reset_ab =>

                        if (Notaus = '1') then

                            var_zustand := notaus;

                        elsif (ESL = '0' and Notaus = '0' and AktPos < "10111110100000000") then

                            var_zustand := ab;

                        elsif (Notaus = '0' and AktPos >= "10111110100000000") then

                            var_zustand := steht;

                        end if;

                    when ab =>

                        if (AktPos < "10111110100000000" and ESL = '0' and Notaus = '0') then

                            var_zustand := ab;

                        end if;

                        if ((ESL = '1' or AktPos >= "10111110100000000") and Notaus = '0') then

                            var_zustand := reset_ab;

                        end if;

                        if (Notaus = '1') then

                            var_zustand := notaus;

                        end if;

                    when auf =>

                        if (AktPos > "0100000110000000" and ESR = '0' and Notaus = '0') then

                            var_zustand := auf;

                        end if;

                        if ((AktPos <= "0100000110000000" or ESR = '1') and Notaus = '0') then

                            var_zustand := reset_auf;

                        end if;

                        if (Notaus = '1') then

                            var_zustand := notaus;

                        end if;

                    when reset_auf =>

                        if (Notaus = '1') then

                            var_zustand := notaus;

                        elsif (Notaus = '0' and ESR = '0' and AktPos  > "0100000110000000") then

                            var_zustand := auf;

                        elsif (AktPos <= "0100000110000000" and Notaus = '0') then

                            var_zustand := steht;

                        end if;

                    when notaus =>

                        if (Betrieb = '0') then

                            var_zustand := notaus;

                        end if;

                        if (Betrieb = '1') then

                            var_zustand := steht;

                        end if;

                    when others =>

                        var_zustand := steht;

                end case;

            end if;



                case var_zustand is

                    when steht =>

                        var_ausgabe := "000";

                        M_An <= '0';

                        M_Li <= '0';

                        M_Re <= '0';

                        LedR <= '0';

                    when ab =>

                        var_ausgabe := "010";

                        M_An <= '1';

                        M_Li <= '1';

                        M_Re <= '0';

                    when reset_ab =>

                        var_ausgabe := "001";

                        CntClr <= '1';

                    when auf =>

                    M_An <= '1';

                    M_Li <= '0';

                    M_Re <= '1';

                    var_ausgabe := "100";

                    when reset_auf =>

                        var_ausgabe := "011";

                        CntClr <= '1';

                    when notaus =>

                        var_ausgabe := "110";

                        M_An <= '0';

                        M_Li <= '0';

                        M_Re <= '0';

                        LedR <= '1';

                    when others =>

                        var_ausgabe := "111";

                        M_An <= '0';

                        M_Li <= '0';

                        M_Re <= '0';

                        LedR <= '1';

                end case;



                State <= var_ausgabe;

        end process;

end behave;

Все ошибки, которые я получаю,

.. / hdl_temp / steuerung.vhd: 40: 95: нет объявлений функций для оператора "="

, но для нескольких разных линий (40, 43, 46, 49, 53, 55, 57, 61, 6467, 71, 74, 77, 81, 83, 85).Надеюсь, это понятно, несмотря на то, что туда бросили немца.Я подчеркивал это буквально недели, чувствуя себя идиотом.Что я не вижу?

...