1
0
Fork 0

cxp GW: add mem size getter for each mem region

This commit is contained in:
morgan 2024-10-07 11:57:18 +08:00
parent 485739404f
commit 2ca9a3191d
1 changed files with 8 additions and 2 deletions

View File

@ -25,14 +25,20 @@ class CXP_Interface(Module, AutoCSR):
def get_tx_port(self):
return self.upconn.command.mem.get_port(write_capable=True)
def get_tx_mem_size(self):
return self.upconn.command.mem.depth*self.upconn.command.mem.width
def get_rx_port(self):
return self.downconn.packet_decoder.mem.get_port(write_capable=False)
def get_rx_mem_size(self):
return self.downconn.packet_decoder.mem.depth*self.downconn.packet_decoder.mem.width
def get_loopback_tx_port(self):
return self.downconn.command.mem.get_port(write_capable=True)
def get_mem_size(self):
return buffer_depth*word_dw
def get_loopback_tx_mem_size(self):
return self.downconn.command.mem.depth*self.downconn.command.mem.width
class DownConn_Interface(Module, AutoCSR):
def __init__(self, phy, debug_sma, pmod_pads):