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:
|
else:
|
||||||
clkout_buf = Signal()
|
clkout_buf = Signal()
|
||||||
self.comb += cd.clk.eq(clkout_buf)
|
self.comb += cd.clk.eq(clkout_buf)
|
||||||
|
buf = buf.lower()
|
||||||
if buf == "bufg":
|
if buf == "bufg":
|
||||||
self.specials += Instance("BUFG", i_I=clkout, o_O=clkout_buf)
|
self.specials += Instance("BUFG", i_I=clkout, o_O=clkout_buf)
|
||||||
elif buf == "bufr":
|
elif buf == "bufr":
|
||||||
self.specials += Instance("BUFR", i_I=clkout, o_O=clkout_buf)
|
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":
|
elif buf == "bufgce":
|
||||||
if ce is None:
|
if ce is None:
|
||||||
raise ValueError("BUFGCE requires user to provide a clock enable ce Signal")
|
raise ValueError("BUFGCE requires user to provide a clock enable ce Signal")
|
||||||
|
|
Loading…
Reference in New Issue