Я не знаю, почему его отображение ошибки, хотя синтаксис кажется правильным.Здравствуйте, я новичок в программировании VHDL, пожалуйста, помогите мне с этими ошибками.
Я занимаюсь программированием sramctl, где адрес added_in является адресом ввода и адресом вывода sram_adds. Я просто сопоставляю адрес и не рассматриваю шину данных.
library IEEE;
use IEEE.std_logic_1164.all;
entity sramctrl is
port(clk,adsn,blastn,lwdrn,lhold:in std_logic;
adds_in :in std_logic_vector(9 downto 2);
adds_4msb:in std_logic_vector(31 downto 28);
readyn,btermn,sramcsn,sramoen,lholda :out std_logic;
sram_adds:out std_logic_vector(9 downto 2));
end sramctrl;
architecture behavioral of sramctrl is
type state_type is(s0,s1,s2);
signal state:state_type;
begin
process(clk,adsn,blastn,lwdrn,lhold,adds_in,adds_4msb)
begin
variable sa:std_logic:='0';
variable a31_a28 :std_logic_vector(3 downto 0):="0000";
variable temp:std_logic_vector(9 downto 2):="00000000";
if(rising_edge(clk))then
if ((not adsn) and (adds_4msb="0000"))then
a31_28 := adds_4msb;
end if;
if (lhold='1')then
lholda<='1';
else
lholda<='0';
end if;
sa:=lhold and lholda ;
case state is
when s0=>sramoen<='1';
sramcsn<='1';
readyn<='1';
btermn<='1';
if((not adsn) and (not adds_4msb) and sa)then
temp:=adds_in;
if(lwdrn='1')then
state<=s1;
ready<='0';
else
state<=s2;
end if;
else
state<=s0;
end if;
when s1=>sramoen<='1';
sramcsn<='0';
if(lwdrn and (not blastn) and sa)then
sram_adds<=temp;
readyn<='1';
btermn<='1';
state<=s0;
elsif(lwdrn and blastn and sa)then
if(temp=X"fe")then
sram_adds<=temp;
temp:=temp+1;
btermn<='0';
readyn<='0';
state<=s1;
elsif(temp=X"ff")then
sram_adds<=temp;
btermn<='1';
readyn<='1';
state<=s0;
else
sram_adds<=temp;
temp:=temp+1;
btermn<='1';
readyn<='0';
state<=s1;
end if;
else
state<=s2;
end if;
when s2=>sramoen<='0';
sramcsn<='0';
if((not lwdrn) and (not blastn) and sa)then
sram_adds<=temp;
readyn<='1';
btermn<='1';
state<=s0;
elsif((not lwdrn) and blastn and sa)then
if(temp=X"fe")then
sram_adds<=temp;
temp:=temp+1;
btermn<='0';
readyn<='0';
state<=s2;
elsif(temp=X"ff")then
sram_adds<=temp;
btermn<='1';
readyn<='1';
state<=s0;
else
sram_adds<=temp;
temp:=temp+1;
btermn<='1';
readyn<='0';
state<=s2;
end if;
else
state<=s2;
end if;
when others =>state<=s0;
end case;
end if;
end process;
end behavioral ;
Не удалось найти решение, пожалуйста, помогите мне. Ошибки она выдвинулась:
COMP96 Compile Архитектура "поведенческой" сущностей "sramctrl"
COMP96 ОШИБКА COMP96_0019: "Ключевое слово 'конец' ожидаемого". «design.vhd» 18 9
COMP96 ERROR COMP96_0019: «Ожидается« конец ключевого слова ». «design.vhd» 19 3
COMP96 ERROR COMP96_0016: «Ожидается объявление единицы дизайна». "design.vhd"
Внутри переменных процесса должны быть объявлены перед операцией 'begin'. – Amir