mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/cores/uart: adding address_width (default 32bits) to UARTBone constructor
This commit is contained in:
parent
9374196974
commit
f06ef5205a
1 changed files with 3 additions and 3 deletions
|
@ -431,17 +431,17 @@ class Stream2Wishbone(LiteXModule):
|
|||
|
||||
|
||||
class UARTBone(Stream2Wishbone):
|
||||
def __init__(self, phy, clk_freq, cd="sys"):
|
||||
def __init__(self, phy, clk_freq, cd="sys", address_width=32):
|
||||
if cd == "sys":
|
||||
self.phy = phy
|
||||
Stream2Wishbone.__init__(self, self.phy, clk_freq=clk_freq)
|
||||
Stream2Wishbone.__init__(self, self.phy, clk_freq=clk_freq, address_width=address_width)
|
||||
else:
|
||||
self.phy = ClockDomainsRenamer(cd)(phy)
|
||||
self.tx_cdc = stream.ClockDomainCrossing([("data", 8)], cd_from="sys", cd_to=cd)
|
||||
self.rx_cdc = stream.ClockDomainCrossing([("data", 8)], cd_from=cd, cd_to="sys")
|
||||
self.comb += self.phy.source.connect(self.rx_cdc.sink)
|
||||
self.comb += self.tx_cdc.source.connect(self.phy.sink)
|
||||
Stream2Wishbone.__init__(self, clk_freq=clk_freq)
|
||||
Stream2Wishbone.__init__(self, clk_freq=clk_freq, address_width=address_width)
|
||||
self.comb += self.rx_cdc.source.connect(self.sink)
|
||||
self.comb += self.source.connect(self.tx_cdc.sink)
|
||||
|
||||
|
|
Loading…
Reference in a new issue