اشکال این کد چیه؟ (کد مالتی پلکسر)
library ieee;
use ieee.std_logic_1164.all;
entity mux_8 is
port (i0 :in std_logic_vector(7 downto 0);
i1 :in std_logic_vector(7 downto 0);
i2 :in std_logic_vector(7 downto 0);
i3 :in std_logic_vector(7 downto 0);
i4 :in std_logic_vector(7 downto 0);
i5 :in std_logic_vector(7 downto 0);
i6 :in std_logic_vector(7 downto 0);
i7 :in std_logic_vector(7 downto 0);
s :in std_logic_vector(2 downto 0);
o :in std_logic_vector(7 downto 0));
end entity;
architecture mux_8_arch of mux_8 is
begin
with s select
o <= i0 when "000",
i1 when "001",
i2 when "010",
i3 when "011",
i4 when "100",
i5 when "101",
i6 when "110",
i7 when others;
end architecture;
کامپایل نمیشه
# Error: COMP96_0143: mux_8.vhd : (19, 2): Object "o" may not be written
library ieee;
use ieee.std_logic_1164.all;
entity mux_8 is
port (i0 :in std_logic_vector(7 downto 0);
i1 :in std_logic_vector(7 downto 0);
i2 :in std_logic_vector(7 downto 0);
i3 :in std_logic_vector(7 downto 0);
i4 :in std_logic_vector(7 downto 0);
i5 :in std_logic_vector(7 downto 0);
i6 :in std_logic_vector(7 downto 0);
i7 :in std_logic_vector(7 downto 0);
s :in std_logic_vector(2 downto 0);
o :in std_logic_vector(7 downto 0));
end entity;
architecture mux_8_arch of mux_8 is
begin
with s select
o <= i0 when "000",
i1 when "001",
i2 when "010",
i3 when "011",
i4 when "100",
i5 when "101",
i6 when "110",
i7 when others;
end architecture;
کامپایل نمیشه
# Error: COMP96_0143: mux_8.vhd : (19, 2): Object "o" may not be written
دیدگاه