From b765bdf34e623ae663fe9e048e875ce61a7c2fce Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Tue, 21 Sep 2021 14:23:00 +0200 Subject: [PATCH] efinix: pll: allow output name to be changed --- litex/soc/cores/clock/efinix_trion.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/litex/soc/cores/clock/efinix_trion.py b/litex/soc/cores/clock/efinix_trion.py index 1b5c099ab..a179e1857 100644 --- a/litex/soc/cores/clock/efinix_trion.py +++ b/litex/soc/cores/clock/efinix_trion.py @@ -79,10 +79,13 @@ class TRIONPLL(Module): self.logger.info("Using {}".format(pll_res)) self.logger.info("Clock source: {}, using EXT_CLK{}".format(block['input_clock'], clock_no)) - def create_clkout(self, cd, freq, phase=0, margin=1e-2, with_reset=False, user_clk=True): + def create_clkout(self, cd, freq, phase=0, margin=1e-2, name='', with_reset=False, user_clk=True): assert self.nclkouts < self.nclkouts_max - clk_out_name = '{}_CLKOUT{}'.format(self.pll_name, self.nclkouts) + if name != '': + clk_out_name = name + else: + clk_out_name = '{}_CLKOUT{}'.format(self.pll_name, self.nclkouts) if user_clk == True: self.platform.add_extension([(clk_out_name, 0, Pins(1))])