some suggestions(not compiled)
ARCHITECTURE logic OF rms_estimator IS
signal sum : unsigned(ACCBIT+31 downto 0):=(OTHERS =>'0');
signal i : unsigned(ACCBIT downto 0):=(OTHERS =>'0');
BEGIN
PROCESS(clk,clr)
BEGIN
IF(clr = '1') THEN
squared_rms <= (OTHERS =>'0');
sum <= (OTHERS =>'0');
ready <= '0';
i < =(OTHERS =>'0');
ELSIF rising_edge(clk) THEN
if (i=2**ACCBIT - 1) then
sum <= (others => '0');
squared_rms<=std_logic_vector(sum(ACCBIT+31 downto ACCBIT));
ready<='1';
i <= (others => '0');
else
sum<= sum + unsigned(pad & squared_abs); -- what is pad? '0'?
i<=i+1;
ready<='0';
--squared_rms<=(others=>'0'); -- you may keep it latched
end if;
END IF;
END PROCESS;
END ARCHITECTURE logic;