Kod: Zaznacz cały
library ieee;
use ieee.std_logic_1164.all;
use work.FA.all;
entity CSA is
port( ac, bc, cinc : in std_logic_vector ( m-1 downto 0);
sumac, coutc, : out std_logic_vector ( m-1 downto 0));
end CSA;
------------
architecture struct1 of CSA is
constant m: integer :=8;
component FA is --fulladder
port (
a,b,cin: in std_logic;
suma,cout: out std_logic);
end component;
begin
for i in (m-1) downto 0 loop
-- use sign "=>" to clarify the pin mapping
gate1 : FA port map (a => ac(i), b => bc(i), cin => cinc(i), suma => sumac(i), cout => coutc(i));
end loop;
end struct1;
Kod: Zaznacz cały
Error (10500): VHDL syntax error at CSA.vhd(13) near text ":"; expecting an identifier
Error (10523): Ignored construct CSA at CSA.vhd(11) due to previous errors
Error (10500): VHDL syntax error at CSA.vhd(30) near text "for"; expecting "end", or "(", or an identifier ("for" is a reserved keyword), or a concurrent statement
Error (10500): VHDL syntax error at CSA.vhd(30) near text "downto"; expecting "<="
Error (10500): VHDL syntax error at CSA.vhd(33) near text "loop"; expecting ";", or an identifier ("loop" is a reserved keyword), or "architecture"