2015-02-21 17:13:43 -05:00
|
|
|
from migen.fhdl.std import *
|
|
|
|
from migen.genlib.fsm import *
|
|
|
|
from migen.actorlib.fifo import *
|
|
|
|
from migen.flow.actor import EndpointDescription
|
2015-04-27 09:19:54 -04:00
|
|
|
from migen.actorlib.packet import Arbiter, Dispatcher
|
2015-02-21 17:13:43 -05:00
|
|
|
|
|
|
|
user_layout = EndpointDescription(
|
2015-04-13 08:29:44 -04:00
|
|
|
[("dst", 8),
|
|
|
|
("length", 4*8),
|
|
|
|
("error", 1),
|
2015-04-27 09:19:54 -04:00
|
|
|
("data", 8)
|
2015-04-13 08:09:58 -04:00
|
|
|
],
|
|
|
|
packetized=True
|
2015-02-21 17:13:43 -05:00
|
|
|
)
|
|
|
|
|
2015-04-27 09:19:54 -04:00
|
|
|
phy_layout = [("data", 8)]
|
2015-02-21 17:13:43 -05:00
|
|
|
|
2015-04-13 08:27:31 -04:00
|
|
|
|
2015-03-22 06:08:47 -04:00
|
|
|
class LiteUSBPipe:
|
2015-04-13 08:09:58 -04:00
|
|
|
def __init__(self, layout):
|
|
|
|
self.sink = Sink(layout)
|
|
|
|
self.source = Source(layout)
|
2015-02-21 17:13:43 -05:00
|
|
|
|