clk : in std_logic;
reset : in std_logic;
din : in std_logic_vector (PWM_WIDTH-1 downto 0);
+ sel : in std_logic;
we : in std_logic;
-- PWM interface
pwm_cnt : in std_logic_vector (PWM_WIDTH-1 downto 0);
if reset = '1' then
reg <= (others => '0');
else
- if we = '1' then
+ if we = '1' and sel = '1' then
reg <= din;
end if;
end if;