litex/misoclib/mem/litesata/phy/__init__.py

25 lines
924 B
Python
Raw Normal View History

from misoclib.mem.litesata.common import *
from misoclib.mem.litesata.phy.ctrl import *
from misoclib.mem.litesata.phy.datapath import *
2015-01-16 17:52:41 -05:00
class LiteSATAPHY(Module):
2015-01-19 11:52:05 -05:00
def __init__(self, device, pads, revision, clk_freq):
self.pads = pads
2015-01-19 11:52:05 -05:00
self.revision = revision
2015-01-16 17:52:41 -05:00
# Transceiver / Clocks
if device[:3] == "xc7": # Kintex 7
from misoclib.mem.litesata.phy.k7.trx import K7LiteSATAPHYTRX
from misoclib.mem.litesata.phy.k7.crg import K7LiteSATAPHYCRG
self.submodules.trx = K7LiteSATAPHYTRX(pads, revision)
self.submodules.crg = K7LiteSATAPHYCRG(pads, self.trx, revision, clk_freq)
2015-01-16 17:52:41 -05:00
else:
msg = "Device" + device + "not (yet) supported."
raise NotImplementedError(msg)
# Control
self.submodules.ctrl = LiteSATAPHYCtrl(self.trx, self.crg, clk_freq)
2015-01-16 17:52:41 -05:00
# Datapath
self.submodules.datapath = LiteSATAPHYDatapath(self.trx, self.ctrl)
2015-01-16 17:52:41 -05:00
self.sink, self.source = self.datapath.sink, self.datapath.source