Olá galera,
Eu estou fazendo uma experiencia sobre um circuito somador/subtrator em VHDL. Porém, quando vou compilar no Quartus II ele aponta um erro de sintaxe, mesmo eu ja tendo revisado inúmeras vezes. Segue o código e o erro encontrado:
entity registrador is
port ( A, C: in STD_LOGIC_vector (3 downto 0);
soma: STD_LOGIC;
B, D: out STD_LOGIC_vector (3 downto 0));
end registrador;
Architecture teste of registrador is
begin
B(0)<= A(1);
B(1)<= A(2);
B(2)<= A(3);
B(3)<= A(0);
D(0)<= C(1);
D(1)<= C(2);
D(2)<= C(3);
D(3)<= soma;
end teste;
entity circuito3 is
port ( X, Y: in STD_LOGIC_vector (3 downto 0);
clock, reset, M, LS: in STD_LOGIC;
S1, S2: buffer STD_LOGIC_vectorr (3 downto 0);
Cin, Cout: buffer STD_LOGIC) ;
end circuito3;
Architecture simulacao of circuito3 is
signal soma,aux: bit;
COMPONENT registrador
port ( A, C: in STD_LOGIC_vector (3 downto 0);
soma: STD_LOGIC;
B, D: out STD_LOGIC_vector (3 downto 0));
end COMPONENT;
begin
process
variable Q1,Q2: STD_LOGIC_vector (3 downto 0);
begin
if (reset='0') then
Q1:= "0000";
Q2:= "0000";
end if;
if (LS='0') then
Q1:= X;
Q2:= Y;
end if;
S1<= Q1;
S2<= Q2;
wait until reset='0' or LS= '0';
end process;
soma<= S1(0) xor (S2(0) xor M ) xor Cin;
Cout<= ((S2(0) xor M) and S1(0)) or ((S2(0) xor M) and Cin) or (S1(0) and Cin);
Cin<= Cout;
process
variable Q3,Q4: STD_LOGIC_vector (3 downto 0);
begin
reg1: registrador PORT MAP(S1, S2, soma, Q3, Q4);
wait until clock'event and clock='1';
end process;
end simulacao;
quanto ao erro:
Error (10500): VHDL syntax error at circuito3.vhd(66) near text "PORT"; expecting "(", or "'", or "."
Error (10500): VHDL syntax error at circuito3.vhd(66) near text ";"; expecting ":=", or "<="
Info: Found 0 design units, including 0 entities, in source file circuito3.vhd
Error: Quartus II Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings
Error: Peak virtual memory: 226 megabytes
Error: Processing ended: Mon May 22 22:45:29 2017
Error: Elapsed time: 00:00:03
Error: Total CPU time (on all processors): 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 4 errors, 0 warnings
Se alguem pudesse me ajuda agradeceria muito