Skip to content

FPGA: support simulate fpga-host with dut#624

Merged
klin02 merged 1 commit intomasterfrom
fpga-sim
Jun 3, 2025
Merged

FPGA: support simulate fpga-host with dut#624
klin02 merged 1 commit intomasterfrom
fpga-sim

Conversation

@klin02
Copy link
Copy Markdown
Member

@klin02 klin02 commented May 31, 2025

This change supports software simulation of FPGA-host interacting with DUT in a xdma-like way. We use a simv process to simulate DUT and send difftest_data with xdma-like pcie. The simv process will interacting with fpga-host by share memory acting as xdma device.

Code of the xdma_ctrl.v is modified from the code of fengkehan fengkehan@bosc.ac.cn and fix some bugs.

@klin02 klin02 changed the title ci test FPGA: support simulate fpga-host with dut Jun 1, 2025
@klin02 klin02 force-pushed the fpga-sim branch 2 times, most recently from 6252a2d to 6f5fdae Compare June 1, 2025 07:30
@klin02
Copy link
Copy Markdown
Member Author

klin02 commented Jun 1, 2025

Note when THREAD_MEMPOOL is enabled, the fpga-host will only start difftest when num of recieved data package greater than 256. However, the microbench workload only produce less than 256 package during running, and slowly produce other package after exiting, which resulting in a longer time in CI job.

This change supports software simulation of FPGA-host interacting
with DUT in a xdma-like way. We use a simv process to simulate DUT
and send difftest_data with xdma-like pcie. The simv process will
interacting with fpga-host by share memory acting as xdma device.

Code of the xdma_ctrl.v is modified from the code of fengkehan
<fengkehan@bosc.ac.cn> and fix some bugs.
@xiaokamikami
Copy link
Copy Markdown
Member

Note when THREAD_MEMPOOL is enabled, the fpga-host will only start difftest when num of recieved data package greater than 256. However, the microbench workload only produce less than 256 package during running, and slowly produce other package after exiting, which resulting in a longer time in CI job.

Yes, this is because the current idx limit of the sent packet is 256, we use 256 to divide the whole memory block, and the divided data can achieve lock-free operation

@klin02 klin02 merged commit 4af3653 into master Jun 3, 2025
5 checks passed
@klin02 klin02 deleted the fpga-sim branch June 3, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants