process (mclk, puc) is
begin
- if puc = '1' then
- reg_baud <= (others => '0');
- reg_ie <= (others => '0');
-
- elsif mclk'event and mclk = '1' then
- if reg_we (UBAUD) = '1' then
- reg_baud (7 downto 0) <= per_din_low;
- end if;
+ if mclk'event and mclk = '1' then
+ if puc = '1' then
+ reg_baud <= (others => '0');
+ reg_ie <= (others => '0');
+
+ else
+ if reg_we (UBAUD) = '1' then
+ reg_baud (7 downto 0) <= per_din_low;
+ end if;
- if reg_we (UBAUD+1) = '1' then
- reg_baud (15 downto 8) <= per_din_high;
- end if;
+ if reg_we (UBAUD+1) = '1' then
+ reg_baud (15 downto 8) <= per_din_high;
+ end if;
- if reg_we (USTAT) = '1' then
- reg_ie <= per_din_low;
+ if reg_we (USTAT) = '1' then
+ reg_ie <= per_din_low;
+ end if;
end if;
end if;
end process;