A PWM Controller in VHDL