def METHOD_NAME(self, cd, freq, phase=0, margin=1e-2, with_reset=True):
    assert self.nclkouts < self.nclkouts_max
    clkout = Signal()
    self.clkouts[self.nclkouts] = (clkout, freq, phase, margin)
    if with_reset:
        self.specials += AsyncResetSynchronizer(cd, ~self.locked)
    self.comb += cd.clk.eq(clkout)
    create_clkout_log(self.logger, cd.name, freq, margin, self.nclkouts)
    self.nclkouts += 1