mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
cores/uart: expose fsm/timer (to ease probing with LiteScope).
This commit is contained in:
parent
17195c5e96
commit
4df336341b
1 changed files with 2 additions and 3 deletions
|
@ -273,10 +273,9 @@ class Stream2Wishbone(Module):
|
||||||
bytes_count_done = (bytes_count == (data_width//8 - 1))
|
bytes_count_done = (bytes_count == (data_width//8 - 1))
|
||||||
words_count_done = (words_count == (length - 1))
|
words_count_done = (words_count == (length - 1))
|
||||||
|
|
||||||
fsm = ResetInserter()(FSM(reset_state="RECEIVE-CMD"))
|
self.submodules.fsm = fsm = ResetInserter()(FSM(reset_state="RECEIVE-CMD"))
|
||||||
timer = WaitTimer(int(100e-3*clk_freq))
|
self.submodules.timer = timer = WaitTimer(int(100e-3*clk_freq))
|
||||||
self.comb += timer.wait.eq(~fsm.ongoing("RECEIVE-CMD"))
|
self.comb += timer.wait.eq(~fsm.ongoing("RECEIVE-CMD"))
|
||||||
self.submodules += fsm, timer
|
|
||||||
self.comb += fsm.reset.eq(timer.done)
|
self.comb += fsm.reset.eq(timer.done)
|
||||||
fsm.act("RECEIVE-CMD",
|
fsm.act("RECEIVE-CMD",
|
||||||
sink.ready.eq(1),
|
sink.ready.eq(1),
|
||||||
|
|
Loading…
Reference in a new issue