("det", 32)
]
-class SATALinkLayerTX(Module):
+class SATALinkTX(Module):
def __init__(self, phy):
self.sink = Sink(link_layout(32))
self.from_rx = Sink(from_rx)
)
)
-class SATALinkLayerRX(Module):
+class SATALinkRX(Module):
def __init__(self, phy):
self.source = Source(link_layout(32))
self.to_tx = Source(from_rx)
self.to_tx.det.eq(det)
]
-class SATALinkLayer(Module):
+class SATALink(Module):
def __init__(self, phy):
- self.submodules.tx = SATALinkLayerTX(phy)
- self.submodules.rx = SATALinkLayerRX(phy)
+ self.submodules.tx = SATALinkTX(phy)
+ self.submodules.rx = SATALinkRX(phy)
self.comb += Record.connect(self.rx.to_tx, self.tx.from_rx)
self.sink, self.source = self.tx.sink, self.rx.source
from migen.sim.generic import run_simulation
from lib.sata.std import *
-from lib.sata.link import SATALinkLayer
+from lib.sata.link import SATALink
from lib.sata.test.bfm import *
from lib.sata.test.common import *
def __init__(self):
self.submodules.bfm = BFM(phy_debug=False,
link_random_level=50, transport_debug=False, transport_loopback=True)
- self.submodules.link_layer = SATALinkLayer(self.bfm.phy)
+ self.submodules.link = SATALink(self.bfm.phy)
self.submodules.streamer = LinkStreamer()
streamer_ack_randomizer = AckRandomizer(link_layout(32), level=50)
self.submodules += logger_ack_randomizer
self.comb += [
Record.connect(self.streamer.source, streamer_ack_randomizer.sink),
- Record.connect(streamer_ack_randomizer.source, self.link_layer.sink),
- Record.connect(self.link_layer.source, logger_ack_randomizer.sink),
+ Record.connect(streamer_ack_randomizer.source, self.link.sink),
+ Record.connect(self.link.source, logger_ack_randomizer.sink),
Record.connect(logger_ack_randomizer.source, self.logger.sink)
]
from migen.sim.generic import run_simulation
from lib.sata.std import *
-from lib.sata.link import SATALinkLayer
-from lib.sata.transport import SATATransportLayer
+from lib.sata.link import SATALink
+from lib.sata.transport import SATATransport
from lib.sata.test.bfm import *
from lib.sata.test.common import *
def __init__(self):
self.submodules.bfm = BFM(phy_debug=False,
link_random_level=0, transport_debug=True, transport_loopback=True)
- self.submodules.link = SATALinkLayer(self.bfm.phy)
- self.submodules.transport = SATATransportLayer(self.link)
+ self.submodules.link = SATALink(self.bfm.phy)
+ self.submodules.transport = SATATransport(self.link)
def gen_simulation(self, selfp):
for i in range(100):
r.append(signal[start:end].eq(item))
return r
-class SATATransportLayerTX(Module):
+class SATATransportTX(Module):
def __init__(self, link):
self.sink = sink = Sink(transport_tx_layout(32))
r.append(item.eq(signal[start:end]))
return r
-class SATATransportLayerRX(Module):
+class SATATransportRX(Module):
def __init__(self, link):
self.source = source = Source(transport_rx_layout(32))
self.comb += cmd_done.eq(cnt==cmd_len)
self.comb += link.source.ack.eq(cmd_receive | (data_receive & source.ack))
-class SATATransportLayer(Module):
+class SATATransport(Module):
def __init__(self, link):
- self.submodules.tx = SATATransportLayerTX(link)
- self.submodules.rx = SATATransportLayerRX(link)
+ self.submodules.tx = SATATransportTX(link)
+ self.submodules.rx = SATATransportRX(link)
self.sink, self.source = self.tx.sink, self.rx.source