Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHow to design a pwm generator?
I intend to design a PWM block by Freq input(interger 16bit ). ----------------------------------------------------------------------- Now I use a division IP core to caculate the counter by a...
Altera_Forum
Honored Contributor
15 years agosignal freq: unsigned(15 downto 0);
signal accu: unsigned(19 downto 0);
if rising_edge(clk) then
accu <= accu + freq;
end if;
square_out <= accu(19);