continue code refactoring
[litex.git] / liteeth / common.py
1 from collections import OrderedDict
2
3 from migen.fhdl.std import *
4 from migen.fhdl.std import *
5 from migen.flow.actor import Sink, Source
6 from migen.bank.description import *
7 from migen.genlib.resetsync import AsyncResetSynchronizer
8 from migen.flow.actor import EndpointDescription
9
10 eth_mtu = 1532
11 eth_preamble = 0xD555555555555555
12 buffer_depth = 2**log2_int(eth_mtu, need_pow2=False)
13
14 def eth_description(dw):
15 layout = [
16 ("d", dw),
17 ("last_be", dw//8),
18 ("error", dw//8)
19 ]
20 return EndpointDescription(layout, packetized=True)