cores/clock/xilinx_common: Add BUFH support and lower buf parameter before use to allow user to specify it in upper or lower case.
This commit is contained in:
parent
3a7aaf5124
commit
57840c63a3
|
@ -53,10 +53,13 @@ class XilinxClocking(Module, AutoCSR):
|
|||
else:
|
||||
clkout_buf = Signal()
|
||||
self.comb += cd.clk.eq(clkout_buf)
|
||||
buf = buf.lower()
|
||||
if buf == "bufg":
|
||||
self.specials += Instance("BUFG", i_I=clkout, o_O=clkout_buf)
|
||||
elif buf == "bufr":
|
||||
self.specials += Instance("BUFR", i_I=clkout, o_O=clkout_buf)
|
||||
elif buf == "bufh":
|
||||
self.specials += Instance("BUFH", i_I=clkout, o_O=clkout_buf)
|
||||
elif buf == "bufgce":
|
||||
if ce is None:
|
||||
raise ValueError("BUFGCE requires user to provide a clock enable ce Signal")
|
||||
|
|
Loading…
Reference in New Issue