L
Lily
Guest
Hi,
i need help with this 4 to 1 multiplexer. Here is my part of my program
--declaration for signals & constants
signal mux_out_arith,mux_out_logic : std_logic_vector(3 downto 0);
signal op_add, op_inc, op_sub, op_cmp, op_and : std_logic_vector(3 downto 0);
constant add : std_logic_vector(3 downto 0):="0000";
constant inc : std_logic_vector(3 downto 0):="0001";
constant sub : std_logic_vector(3 downto 0):="0010";
constant cmp : std_logic_vector(3 downto 0):="0011";
arith_mux4_1 : process (op_add,op_inc,op_sub,op_cmp, sel)
begin
case sel is
when "0000" => mux_out_arith <= op_add;
when "0001" => mux_out_arith <= op_sub;
when "0011" => mux_out_arith <= op_inc;
when others => mux_out_arith <= op_cmp;
end case;
end process arith_mux4_1;
when i compile i've got error something like this
Type error in string literal (base type is not ARRAY_TYPE).
can anybody out there help me ?
thanks.
i need help with this 4 to 1 multiplexer. Here is my part of my program
--declaration for signals & constants
signal mux_out_arith,mux_out_logic : std_logic_vector(3 downto 0);
signal op_add, op_inc, op_sub, op_cmp, op_and : std_logic_vector(3 downto 0);
constant add : std_logic_vector(3 downto 0):="0000";
constant inc : std_logic_vector(3 downto 0):="0001";
constant sub : std_logic_vector(3 downto 0):="0010";
constant cmp : std_logic_vector(3 downto 0):="0011";
arith_mux4_1 : process (op_add,op_inc,op_sub,op_cmp, sel)
begin
case sel is
when "0000" => mux_out_arith <= op_add;
when "0001" => mux_out_arith <= op_sub;
when "0011" => mux_out_arith <= op_inc;
when others => mux_out_arith <= op_cmp;
end case;
end process arith_mux4_1;
when i compile i've got error something like this
Type error in string literal (base type is not ARRAY_TYPE).
can anybody out there help me ?
thanks.