Skip to content

Commit

Permalink
frontend/dma/LitePCIeDMADescriptorSplitter: Minor simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Nov 17, 2023
1 parent 8a37ba2 commit 7388de2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions litepcie/frontend/dma.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ def __init__(self, max_size, address_width):
fsm.act("IDLE",
# Set/Clear signals.
NextValue(source.first, 1),
NextValue(source.last, 0),
NextValue(source.address, sink.address),
NextValue(length, sink.length),
If(sink.length > max_size,
NextValue(source.last, 0),
NextValue(source.length, max_size)
).Else(
NextValue(source.last, 1),
Expand All @@ -232,7 +232,6 @@ def __init__(self, max_size, address_width):
length_next.eq(length - max_size),
NextValue(length, length_next),
If(length_next > max_size,
NextValue(source.last, 0),
NextValue(source.length, max_size)
).Else(
NextValue(source.last, 1),
Expand Down

0 comments on commit 7388de2

Please sign in to comment.