xfcp: Rename signals based on upstream/downstsream port role and data direction to simplify connections

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2025-03-11 18:33:57 -07:00
parent 8d4ad59727
commit 7df14e54e5
12 changed files with 432 additions and 432 deletions

View File

@@ -46,20 +46,20 @@ class TB(object):
cocotb.start_soon(Clock(dut.clk, 8, units="ns").start())
self.axis_source = AxiStreamSource(AxiStreamBus.from_entity(dut.up_xfcp_in), dut.clk, dut.rst)
self.axis_sink = AxiStreamSink(AxiStreamBus.from_entity(dut.up_xfcp_out), dut.clk, dut.rst)
self.usp_source = AxiStreamSource(AxiStreamBus.from_entity(dut.xfcp_usp_ds), dut.clk, dut.rst)
self.usp_sink = AxiStreamSink(AxiStreamBus.from_entity(dut.xfcp_usp_us), dut.clk, dut.rst)
self.axil_ram = AxiLiteRam(AxiLiteBus.from_entity(dut.m_axil), dut.clk, dut.rst, size=2**16)
def set_idle_generator(self, generator=None):
if generator:
self.axis_source.set_pause_generator(generator())
self.usp_source.set_pause_generator(generator())
self.axil_ram.write_if.b_channel.set_pause_generator(generator())
self.axil_ram.read_if.r_channel.set_pause_generator(generator())
def set_backpressure_generator(self, generator=None):
if generator:
self.axis_sink.set_pause_generator(generator())
self.usp_sink.set_pause_generator(generator())
self.axil_ram.write_if.aw_channel.set_pause_generator(generator())
self.axil_ram.write_if.w_channel.set_pause_generator(generator())
self.axil_ram.read_if.ar_channel.set_pause_generator(generator())
@@ -101,9 +101,9 @@ async def run_test_write(dut, idle_inserter=None, backpressure_inserter=None):
tb.log.debug("TX packet: %s", pkt)
await tb.axis_source.send(pkt.build())
await tb.usp_source.send(pkt.build())
rx_frame = await tb.axis_sink.recv()
rx_frame = await tb.usp_sink.recv()
rx_pkt = XfcpFrame.parse(rx_frame.tdata)
tb.log.debug("RX packet: %s", rx_pkt)
@@ -146,9 +146,9 @@ async def run_test_read(dut, idle_inserter=None, backpressure_inserter=None):
tb.log.debug("TX packet: %s", pkt)
await tb.axis_source.send(pkt.build())
await tb.usp_source.send(pkt.build())
rx_frame = await tb.axis_sink.recv()
rx_frame = await tb.usp_sink.recv()
rx_pkt = XfcpFrame.parse(rx_frame.tdata)
tb.log.debug("RX packet: %s", rx_pkt)
@@ -174,9 +174,9 @@ async def run_test_id(dut, idle_inserter=None, backpressure_inserter=None):
tb.log.debug("TX packet: %s", pkt)
await tb.axis_source.send(pkt.build())
await tb.usp_source.send(pkt.build())
rx_frame = await tb.axis_sink.recv()
rx_frame = await tb.usp_sink.recv()
rx_pkt = XfcpFrame.parse(rx_frame.tdata)
tb.log.debug("RX packet: %s", rx_pkt)

View File

@@ -29,7 +29,7 @@ module test_taxi_xfcp_mod_axil #
logic clk;
logic rst;
taxi_axis_if #(.DATA_W(8), .LAST_EN(1), .USER_EN(1), .USER_W(1)) up_xfcp_in(), up_xfcp_out();
taxi_axis_if #(.DATA_W(8), .LAST_EN(1), .USER_EN(1), .USER_W(1)) xfcp_usp_ds(), xfcp_usp_us();
taxi_axil_if #(
.DATA_W(AXIL_DATA_W),
@@ -47,8 +47,8 @@ uut (
/*
* XFCP upstream port
*/
.up_xfcp_in(up_xfcp_in),
.up_xfcp_out(up_xfcp_out),
.xfcp_usp_ds(xfcp_usp_ds),
.xfcp_usp_us(xfcp_usp_us),
/*
* AXI lite master interface