litex/liteeth/common.py

21 lines
532 B
Python
Raw Normal View History

2015-01-28 03:14:01 -05:00
from collections import OrderedDict
from migen.fhdl.std import *
2015-01-27 18:33:26 -05:00
from migen.fhdl.std import *
2015-01-28 03:14:01 -05:00
from migen.flow.actor import Sink, Source
from migen.bank.description import *
from migen.genlib.resetsync import AsyncResetSynchronizer
2015-01-27 18:33:26 -05:00
from migen.flow.actor import EndpointDescription
eth_mtu = 1532
eth_preamble = 0xD555555555555555
buffer_depth = 2**log2_int(eth_mtu, need_pow2=False)
def eth_description(dw):
layout = [
("d", dw),
("last_be", dw//8),
("error", dw//8)
]
return EndpointDescription(layout, packetized=True)