Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dvisampler/dma: bugfixes

  • Loading branch information...
commit d685ed21fc456b83180e2435fb0ae9696d553f03 1 parent 66b4bae
@sbourdeauducq sbourdeauducq authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 milkymist/dvisampler/dma.py
View
9 milkymist/dvisampler/dma.py
@@ -107,7 +107,8 @@ def __init__(self, asmiport, nslots):
pack_counter = Signal(max=pack_factor)
self.comb += last_pixel.eq(pack_counter == (pack_factor - 1))
self.sync += If(write_pixel,
- [If(pack_counter == i, cur_memory_word[32*i:32*(i+1)].eq(encoded_pixel)) for i in range(pack_factor)],
+ [If(pack_counter == (pack_factor-i-1),
+ cur_memory_word[32*i:32*(i+1)].eq(encoded_pixel)) for i in range(pack_factor)],
pack_counter.eq(pack_counter + 1)
)
@@ -123,11 +124,9 @@ def __init__(self, asmiport, nslots):
self.submodules += fsm
fsm.act(fsm.WAIT_SOF,
- self.frame.ack.eq(~sof),
reset_words.eq(1),
- If(self._slot_array.address_valid,
- If(self.frame.stb & sof, fsm.next_state(fsm.TRANSFER_PIXEL))
- )
+ self.frame.ack.eq(~self._slot_array.address_valid | ~sof),
+ If(self._slot_array.address_valid & sof & self.frame.stb, fsm.next_state(fsm.TRANSFER_PIXEL))
)
fsm.act(fsm.TRANSFER_PIXEL,
self.frame.ack.eq(1),
Please sign in to comment.
Something went wrong with that request. Please try again.