Skip to content

Fix TCP stack – vFPGA routing and add TCP performance examples#149

Open
adpp00 wants to merge 2 commits intofpgasystems:masterfrom
adpp00:tcp
Open

Fix TCP stack – vFPGA routing and add TCP performance examples#149
adpp00 wants to merge 2 commits intofpgasystems:masterfrom
adpp00:tcp

Conversation

@adpp00
Copy link
Copy Markdown

@adpp00 adpp00 commented Oct 31, 2025

Description

This pull request includes:

  1. Fix routing between the TCP stack and vFPGA
  2. Add new TCP examples (tcp_perf)

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • A new research paper code implementation
  • Other

Tests & Results

Verified the fix and performance through the new tcp_perf example.
Results and detailed instructions are included in the README file /examples/11_perf_tcp/README.md.

  • Tested the data path between the TCP stack and vFPGA using tcp_perf
  • Achieved throughput up to 100 Gbps on hardware
  • No errors during synthesis or runtime

Checklist

  • I have commented my code and made corresponding changes to the documentation.
  • I have added tests/results that prove my fix is effective or that my feature works.
  • My changes generate no new warnings or errors & all tests successfully pass.

@bo3z bo3z added this to the 0.3.0 milestone Nov 8, 2025
@bo3z bo3z self-requested a review November 21, 2025 02:24
@bo3z bo3z added the bugfix Fix for a bug label Nov 21, 2025
Copy link
Copy Markdown
Collaborator

@bo3z bo3z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for bringing back the TCP/IP stack. The code looks very good. I've finished the review and there are some minor comments that cover corner cases and make sure the TCP/IP stack follows the same design principles as other components in Coyote. I can look into addressing these.

Comment on lines -112 to -119
`ifdef EN_TCP
// TCP
metaIntf.m m_open_port_cmd,
metaIntf.s m_open_port_sts,
metaIntf.m m_open_conn_cmd,
metaIntf.s m_open_conn_sts,
`endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TCP management functions (open connection, close connect etc.) should be part of the MMU and cnfg_slave as memory mapped registers. This is to make it consistent with RDMA. More details in the overview comment of this PR.

Comment on lines -72 to -79
// TCP
`ifdef EN_TCP
metaIntf.m m_open_port_cmd,
metaIntf.s s_open_port_sts,
metaIntf.m m_open_conn_cmd,
metaIntf.s s_open_conn_sts,
`endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as in the MMU; TCP management interfaces (tcp_listen_req, tcp_listen_rsp, tcp_open_req, tcp_open_rsp, tcp_close_req) should be in memory-mapped registers here (in cnfg_slave, cnfg_slave_avx) and not in the vFPGA user logic. Can we move these 5 here?

metaIntf.s s_open_conn_sts,
`endif

// Writeback
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as in cnfg_slave.

Comment on lines +285 to +290
if (sid_hit) begin
dst_vfid_N = vfid_sid;
end else begin
dst_vfid_N = vfid_port;
end
end
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me to better understand - is it common to have sid_hit = 0? Assuming the connections were set-up properly, such behaviour shouldn't really happen, right?

for(genvar i = 0; i < N_REGIONS; i++) begin
assign m_rx_meta_ready[i] = m_rx_meta[i].ready;
assign m_rx_meta[i].valid = m_rx_meta_valid[i];
assign m_rx_meta[i].data = m_rx_meta_data[i];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this synthesise correctly? If I recall correctly, arrays inside generate blocks are finnicky.


/**
* @brief TCP RX multiplexer
* @brief RX arbitration (tlast-based)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the TCP stack guarantee there will always be a tlast?

logic [N_REGIONS-1 : 0] s_axis_tx_last;
logic [AXI_DATA_BITS-1 : 0] s_axis_tx_data [N_REGIONS];

for(genvar i = 0; i < N_REGIONS; i++) begin
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, we should check if these arrays will synthesize correctly in a genvar block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants