Я работаю над проектом для школы для кодера 10-4 с двумя выходами.Я довольно уверен в архитектуре, я думаю, что моя ошибка - просто синтаксис.Я продолжаю получать, что "объект T1 используется не объявленным", пожалуйста, любая помощь была бы удивительной!Нашей инструкцией было найти первый MSB, затем замаскировать его и найти второй.
library ieee;
use ieee.std_logic_1164.all;
entity enhanced_prio is
port(
r: in std_logic_vector(9 downto 0);
fst, snd: out std_logic_vector(3 downto 0)
);
end enhanced_prio;
architecture count of enhanced_prio is
signal temp:std_logic_vector(9 downto 0);
signal t1:std_logic_vector(3 downto 0);
process (temp,t1)
begin
if(r="1000000000")then
fst <= "1010";
t1 <= "1010";
else (r = "0100000000") then
fst <= "1001";
t1 <= "1001";
elsif (r = "0010000000") then
fst <= "1000";
t1 <= "1000";
elsif (r = "0001000000") then
fst <= "0111";
t1 <= "0111";
elsif (r = "0000100000") then
fst <= "0110";
t1 <= "0110";
elsif (r = "0000010000") then
fst <= "0101";
t1 <= "0101";
elsif (r = "0000001000") then
fst <= "0100";
t1 <= "0100";
elsif (r = "0000000100") then
fst <= "0011";
t1 <= "0011";
elsif (r = "0000000010") then
fst <= "0010";
t1 <= "0010";
elsif (r = "0000000001") then
fst <= "0001";
t1 <= "0001";
else (r = other ) then
fst<= "1111";
t1 <= "1111";
end if;
if (t1 = "1010") then temp <= r AND "0111111111";
elsif (t1 = "1001") then temp <= r AND "0011111111";
elsif (t1 = "1000") then temp <= r AND "0001111111";
elsif (t1 = "0111") then temp <= r AND "0000111111";
elsif (t1 = "0110") then temp <= r AND "0000011111";
elsif (t1 = "0101") then temp <= r AND "0000001111";
elsif (t1 = "0100") then temp <= r AND "0000000111";
elsif (t1 = "0011") then temp <= r AND "0000000011";
elsif (t1 = "0010") then temp <= r AND "0000000001";
elsif (t1 = "0001") then temp <= r AND "0000000000";
else (t1 = "1111") then temp <= r AND "1111111111";
end if;
if (temp = "1000000000") then
snd <= "1010";
elsif (temp = "0100000000") then
snd <= "1001";
elsif (temp = "0010000000") then
snd <= "1000";
elsif (temp = "0001000000") then
snd <= "0111";
elsif (temp = "0000100000") then
snd <= "0110";
elsif (temp = "0000010000") then
snd <= "0101";
elsif (temp = "0000001000") then
snd <= "0100";
elsif (temp = "0000000100") then
snd <= "0011";
elsif (temp = "0000000010") then
snd <= "0010";
elsif (temp = "0000000001") then
snd <= "0001";
else (temp = other ) then
snd<= "1111";
end if;
end process;
end count;