Skip to content

Commit

Permalink
uart: generate ack for rx (serialboot OK with sim)
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Mar 3, 2015
1 parent 7c058a5 commit 200791c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion misoclib/com/uart/__init__.py
Expand Up @@ -26,5 +26,6 @@ def __init__(self, phy):
]
self.comb += [
self.ev.tx.trigger.eq(phy.sink.stb & phy.sink.ack),
self.ev.rx.trigger.eq(phy.source.stb) #phy.source.ack supposed to be always 1
self.ev.rx.trigger.eq(phy.source.stb & phy.source.ack),
phy.source.ack.eq(~self.ev.rx.pending)
]
3 changes: 2 additions & 1 deletion misoclib/com/uart/phy/sim.py
Expand Up @@ -12,5 +12,6 @@ def __init__(self, pads):
self.sink.ack.eq(pads.source_ack),

self.source.stb.eq(pads.sink_stb),
self.source.data.eq(pads.sink_data)
self.source.data.eq(pads.sink_data),
pads.sink_ack.eq(self.source.ack)
]

0 comments on commit 200791c

Please sign in to comment.