Witam, jestem poczatkujacy w VHDL'u. Pracuje na webPacku Xilina i ModelSim'ie do symulacji. Mam problem nastepujacy. Chcialem zrobic takie cos:
architecture Behavioral of przerzutniki is signal wynik : bit_vector (1 downto 0); signal temp : bit; begin process (zegar, x, y, wybierz, wynik) begin if (zegar = '0') then case wybierz is when "00" => wynik(1) <= x or (not y and wynik(1)); wynik(0) <= not wynik(1); when "01" => wynik(1) <= (not wynik(1) and x) or (not y and wynik(1)); wynik(0) <= not wynik(1); when "10" => wynik(1) <= x; wynik(0) <= not wynik(1);
when "11" => wynik(1) <= wynik(1) xor x; wynik(0) <= not wynik(1); end case; else wynik <= "00"; end if; Q <= wynik(1); nieQ <= wynik(0); end process; end Behavioral;
Co tu jest zle, sadzis sie cos o sygnal wynik, ze cos nie jest kompatybilne. Takie mam bledy: ERROR:HDLParsers:808 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 22. and can not have such operands in this context. ERROR:HDLParsers:808 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 23. and can not have such operands in this context. ERROR:HDLParsers:808 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 23. and can not have such operands in this context. ERROR:HDLParsers:800 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 24. Type of wynik is incompatible with type of x. ERROR:HDLParsers:808 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 25. xor can not have such operands in this context. ERROR:HDLParsers:812 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 25. A value is missing in case. ERROR:HDLParsers:800 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 30. Type of Q is incompatible with type of wynik. ERROR:HDLParsers:800 - "F:/Moje Dokumenty/VHDL - projects/przerzutniki/przerzutniki.vhd" Line 31. Type of nieQ is incompatible with type of wynik.
Jestem poczatkujacy wybaczcie.
Fraktal ...