Skip to content

Commit 200791c

Browse files
committedMar 3, 2015
uart: generate ack for rx (serialboot OK with sim)
1 parent 7c058a5 commit 200791c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

Diff for: ‎misoclib/com/uart/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ def __init__(self, phy):
2626
]
2727
self.comb += [
2828
self.ev.tx.trigger.eq(phy.sink.stb & phy.sink.ack),
29-
self.ev.rx.trigger.eq(phy.source.stb) #phy.source.ack supposed to be always 1
29+
self.ev.rx.trigger.eq(phy.source.stb & phy.source.ack),
30+
phy.source.ack.eq(~self.ev.rx.pending)
3031
]

Diff for: ‎misoclib/com/uart/phy/sim.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ def __init__(self, pads):
1212
self.sink.ack.eq(pads.source_ack),
1313

1414
self.source.stb.eq(pads.sink_stb),
15-
self.source.data.eq(pads.sink_data)
15+
self.source.data.eq(pads.sink_data),
16+
pads.sink_ack.eq(self.source.ack)
1617
]

0 commit comments

Comments
 (0)
Please sign in to comment.