new-sonar/gateware/eth.py
David Lenfesty 5595c7d113 gateware: import basic instance of LiteEth
more config to do, need to fully hook everything up, but it's a start
2023-02-07 21:00:38 -07:00

27 lines
714 B
Python

from amaranth import *
from amaranth_soc.wishbone.bus import Interface
# TODO maybe this should just call liteeth_gen to close the loop?
class LiteEth(Elaboratable, Interface):
def __init__(self):
# TODO change ADDR width
Interface.__init__(self, addr_width=32, data_width=32)
self.rgmii_eth_clocks_tx = Signal()
def elaborate(self, platform):
platform.add_file("liteeth_core.v", open("liteeth/gateware/liteeth_core.v", 'r').read())
m = Module()
core = Instance(
"liteeth_core",
i_sys_clock=ClockSignal(),
o_rgmii_eth_clocks_tx=self.rgmii_eth_clocks_tx,
)
m.submodules.core = core
return m