litex/misoclib/mem/litesata/frontend/common.py

31 lines
821 B
Python
Raw Normal View History

from misoclib.mem.litesata.common import *
2015-01-14 03:19:41 -05:00
2015-04-13 09:12:39 -04:00
2015-01-16 17:52:41 -05:00
class LiteSATAMasterPort:
def __init__(self, dw):
self.source = Source(command_tx_description(dw))
self.sink = Sink(command_rx_description(dw))
2015-01-14 03:19:41 -05:00
def connect(self, slave):
return [
Record.connect(self.source, slave.sink),
Record.connect(slave.source, self.sink)
]
2015-01-14 03:19:41 -05:00
2015-04-13 09:12:39 -04:00
2015-01-16 17:52:41 -05:00
class LiteSATASlavePort:
def __init__(self, dw):
self.sink = Sink(command_tx_description(dw))
self.source = Source(command_rx_description(dw))
2015-01-14 03:19:41 -05:00
def connect(self, master):
return [
Record.connect(self.sink, master.source),
Record.connect(master.sink, self.source)
]
2015-01-22 04:45:11 -05:00
2015-04-13 09:12:39 -04:00
2015-01-22 04:45:11 -05:00
class LiteSATAUserPort(LiteSATASlavePort):
def __init__(self, dw):
LiteSATASlavePort.__init__(self, dw)