Skip to content

Commit b5bdf68

Browse files
Merge pull request #195 from maass-hamburg/set-mode-in-wishbone.Interface
LiteEthMACWishboneInterface: set mode in wishbone.Interface
2 parents c1c46e5 + 1dadd64 commit b5bdf68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

liteeth/mac/wishbone.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def __init__(self, dw, nrxslots=2, ntxslots=2, endianness="big", timestamp=None,
2424
):
2525
self.sink = stream.Endpoint(eth_phy_description(dw))
2626
self.source = stream.Endpoint(eth_phy_description(dw))
27-
self.bus_rx = wishbone.Interface(data_width=dw)
28-
self.bus_tx = wishbone.Interface(data_width=dw)
27+
self.bus_rx = wishbone.Interface(data_width=dw, mode="r" if rxslots_read_only else "rw")
28+
self.bus_tx = wishbone.Interface(data_width=dw, mode="w" if txslots_write_only else "rw")
2929

3030
# # #
3131

0 commit comments

Comments
 (0)