Forum Discussion
Altera_Forum
Honored Contributor
13 years agoWell let me have a go at it in vhdl off my head(not tested) assuming sine phase starts at 0:
let count be binary of suitable width e.g. 20 bits free running i.e. donot stop at 64000-1
process
begin
wait until clk = '1';
count <= count +1;
sign_bit_d <= sign_bit;
if sign_bit /= sign_bit_d then
count <= (others => '0');
mute <= '0';
if count < 64000-1 then
mute <= '1';
end if;
end if;
end process;
output <= input when mute = '0' else (others => '0');