M_VAL
h_period += (M_VAL * xres * 2 * 1000)/(5 * dclk);
h_period /= 2 * M_VAL;
duty_cycle = C_VAL * 1000 - (M_VAL * h_period)/100;