Hello Everyone
i wrote a code for a barrel shifter and it passes the compilation
but in the simulation it gives me nothing in the output
here is the code:
library ieee;
use ieee.std_logic_1164.all;
Entity barrel_shifter is
Generic(n: integer := 8);
port(inp: in std_logic_vector (7 downto 0);
shifter: in integer range 0 to 1;
outp
ut std_logic_vector (7 downto 0)
);
end barrel_shifter;
architecture behave of barrel_shifter is
signal tmp: std_logic_vector(7 downto 0);
begin
process(inp,shifter)
begin
if (shifter = 0) then
tmp <= inp;
else
tmp(0)<='0';
for i in 1 to inp'HIGH loop --for i in 1 to 7 loop;
tmp(i)<=inp(i-1);
end loop;
end if;
end process;
outp<=tmp;
end behave;
can someone explain me why it shows nothing in the simulation?
i wrote a code for a barrel shifter and it passes the compilation
but in the simulation it gives me nothing in the output
here is the code:
library ieee;
use ieee.std_logic_1164.all;
Entity barrel_shifter is
Generic(n: integer := 8);
port(inp: in std_logic_vector (7 downto 0);
shifter: in integer range 0 to 1;
outp
);
end barrel_shifter;
architecture behave of barrel_shifter is
signal tmp: std_logic_vector(7 downto 0);
begin
process(inp,shifter)
begin
if (shifter = 0) then
tmp <= inp;
else
tmp(0)<='0';
for i in 1 to inp'HIGH loop --for i in 1 to 7 loop;
tmp(i)<=inp(i-1);
end loop;
end if;
end process;
outp<=tmp;
end behave;
can someone explain me why it shows nothing in the simulation?