library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity xiangwei is
port( rst : in std_logic;
clk : in std_logic;
SHLout : out std_logic_vector(7 downto 0));
end;
architecture rtl of xiangwei is
begin
process(clk)
variable suanzhu : std_logic_vector(7 downto 0):="00000000";
begin
if (clk'event and clk='1') then
if(rst='0') then
suanzhu:="00000000";
end if;
if(rst='1') then
if(suanzhu<256) then
suanzhu:=suanzhu+1;
SHLout<=suanzhu;
else
suanzhu:="00000000";
end if;
end if;
end if;
end process;
end;