COUTER : process (clk, reset) is
begin
- if reset = '1' then
- cnt <= (others => '0');
-
- elsif rising_edge(clk) then
- if clk_en = '1' then
- if eq_max = '1' then
- cnt <= (others => '0');
- else
- cnt <= cnt + 1;
+ if rising_edge(clk) then
+ if reset = '1' then
+ cnt <= (others => '0');
+
+ else
+ if clk_en = '1' then
+ if eq_max = '1' then
+ cnt <= (others => '0');
+ else
+ cnt <= cnt + 1;
+ end if;
end if;
end if;
end if;