我做的积分清零电路如下:请高手指点有没有什么问题。该如何改进?
process(clk,sys_rst)
begin
if sys_rst then
ACC<=(others=>'0');
elsif clk'event and clk='1' then
if ID_ce='1' then
ACC<=(others=>'0');
elsif clk_en='1' then
ACC<=ACC+data_in;
end if;
end if;
end process;
process(clk)
begin
if clk'event and clk='1' then
if ID_ce='1' then
ACC_out<=ACC;
end if;
end if;
end process;