File tree 1 file changed +6
-2
lines changed
misoclib/com/litepcie/frontend/dma
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ def __init__(self, depth):
30
30
self ._loop_prog_n = CSRStorage ()
31
31
self ._index = CSRStatus (log2_int (depth ))
32
32
self ._level = CSRStatus (log2_int (depth ))
33
+ self ._loop = CSRStatus (16 )
33
34
self ._flush = CSR ()
34
35
35
36
self .irq = Signal ()
@@ -41,6 +42,7 @@ def __init__(self, depth):
41
42
we = self ._we .r & self ._we .re
42
43
loop_prog_n = self ._loop_prog_n .storage
43
44
index = self ._index .status
45
+ loop = self ._loop .status
44
46
level = self ._level .status
45
47
flush = self ._flush .r & self ._flush .re
46
48
@@ -86,10 +88,12 @@ def __init__(self, depth):
86
88
# "loop" mode
87
89
self .sync += \
88
90
If (flush ,
89
- index .eq (0 )
91
+ index .eq (0 ),
92
+ loop .eq (0 ),
90
93
).Elif (source .stb & source .ack ,
91
94
If (fifo .dout .start ,
92
- index .eq (0 )
95
+ index .eq (0 ),
96
+ loop .eq (loop + 1 )
93
97
).Else (
94
98
index .eq (index + 1 )
95
99
)
You can’t perform that action at this time.
0 commit comments