mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/interconnect/stream_packet: use reverse_bytes from litex.gen
This commit is contained in:
parent
b796853893
commit
6f3131e259
1 changed files with 2 additions and 8 deletions
|
@ -3,19 +3,13 @@ from migen.genlib.roundrobin import *
|
|||
from migen.genlib.record import *
|
||||
from migen.genlib.fsm import FSM, NextState
|
||||
|
||||
from litex.gen import *
|
||||
|
||||
from litex.soc.interconnect import stream
|
||||
|
||||
# TODO: clean up code below
|
||||
# XXX
|
||||
|
||||
def reverse_bytes(signal):
|
||||
n = (len(signal)+7)//8
|
||||
r = []
|
||||
for i in reversed(range(n)):
|
||||
r.append(signal[i*8:min((i+1)*8, len(signal))])
|
||||
return Cat(iter(r))
|
||||
|
||||
|
||||
class Status(Module):
|
||||
def __init__(self, endpoint):
|
||||
self.first = first = Signal(reset=1)
|
||||
|
|
Loading…
Reference in a new issue