--- Quote Start ---
Im feeling pretty generous today. I hate seeing overly complicated case statements.
I think the following code does what you're trying to do:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.all;
entity prueba2 is
port (
A : in unsigned (7 downto 0);
B : in unsigned (7 downto 0);
inicio : in std_logic;
clk : in std_logic;
reset : in std_logic;
q : out unsigned (2 downto 0);
resultado : out unsigned (15 downto 0)
);
end prueba2;
architecture behavioral of prueba2 is
signal cuenta : unsigned(2 downto 0);
signal y : unsigned(15 downto 0);
begin
multi : process (A, clk, reset)
begin
if reset = '1' then
y <= (others => '0');
elsif rising_edge(clk) then
if inicio = '1' then
cuenta <= cuenta + 1;
end if;
if B /= x"00" then
Y <= Y + ( resize(B, 15)*(2**to_integer(cuenta)) );
end if;
end if;
end process;
q <= cuenta;
resultado <= y;
end architecture;
--- Quote End ---
well Tricky that might work but is too tricky for beginner, after all I can just say y = a*b
I assume it is exercise that gets more and more compact under pressure...great