frontend/axi: add wrap burst support
This commit is contained in:
parent
9c729ae7b5
commit
6cc42c63c5
|
@ -6,12 +6,11 @@ Converts AXI ports to Native ports.
|
||||||
Features:
|
Features:
|
||||||
- Write/Read arbitration.
|
- Write/Read arbitration.
|
||||||
- Write/Read data buffers (configurable depth).
|
- Write/Read data buffers (configurable depth).
|
||||||
- Burst support (INCR/FIXED).
|
- Burst support (FIXED/INCR/WRAP).
|
||||||
- ID support (configurable width).
|
- ID support (configurable width).
|
||||||
|
|
||||||
Limitations:
|
Limitations:
|
||||||
- Write response always supposed to be ready.
|
- Write response always supposed to be ready.
|
||||||
- No WRAP burst support.
|
|
||||||
- No address alignment (address must be aligned on PHY's datawidth)
|
- No address alignment (address must be aligned on PHY's datawidth)
|
||||||
- No reordering.
|
- No reordering.
|
||||||
"""
|
"""
|
||||||
|
@ -25,7 +24,7 @@ from litex.soc.interconnect import stream
|
||||||
burst_types = {
|
burst_types = {
|
||||||
"fixed": 0b00,
|
"fixed": 0b00,
|
||||||
"incr": 0b01,
|
"incr": 0b01,
|
||||||
"wrap": 0b10, # FIXME: Not implemented
|
"wrap": 0b10,
|
||||||
"reserved": 0b11
|
"reserved": 0b11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +102,8 @@ class LiteDRAMAXIBurst2Beat(Module):
|
||||||
)
|
)
|
||||||
fsm.act("BURST2BEAT",
|
fsm.act("BURST2BEAT",
|
||||||
ax_beat.valid.eq(1),
|
ax_beat.valid.eq(1),
|
||||||
If(ax_burst.burst == burst_types["incr"],
|
If((ax_burst.burst == burst_types["incr"]) |
|
||||||
|
(ax_burst.burst == burst_types["wrap"]),
|
||||||
ax_beat.addr.eq(ax_burst.addr + offset)
|
ax_beat.addr.eq(ax_burst.addr + offset)
|
||||||
).Else(
|
).Else(
|
||||||
ax_beat.addr.eq(ax_burst.addr)
|
ax_beat.addr.eq(ax_burst.addr)
|
||||||
|
@ -115,7 +115,12 @@ class LiteDRAMAXIBurst2Beat(Module):
|
||||||
NextState("IDLE")
|
NextState("IDLE")
|
||||||
).Else(
|
).Else(
|
||||||
NextValue(count, count + 1),
|
NextValue(count, count + 1),
|
||||||
NextValue(offset, offset + size)
|
NextValue(offset, offset + size),
|
||||||
|
If(ax_burst.burst == burst_types["wrap"],
|
||||||
|
If(offset == (ax_burst.len + 1 - 1)*size,
|
||||||
|
NextValue(offset, 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue