Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Mismatch in Default FINN FPGA Flow Tutorial Using MNIST Numerals Example #1211

Open
prospersu opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@prospersu
Copy link

Prerequisites

  • [Y] Test that the bug appears on the current version of the dev-branch. (Make sure to include the commit hash of the commit you checked out).
  • [Y] Check that the issue hasn't already been reported, by checking the currently open issues.
  • [Y] If there are steps to reproduce the problem, make sure to write them down below.
  • [Y] If relevant, please include the ONNX files, which were created directly before and/or after the bug.

Quick Summary

When running the FINN FPGA flow using the MNIST Numerals example, the output results do not match the expected values. Despite compiling the code successfully, the simulation shows data mismatches and zero validated data points.

Details

Steps to Reproduce

  1. Clone the FINN repository.
  2. Checkout the dev branch, with commit hash.
  3. Start the Docker container with the command.
  4. Run transformation on the ONNX file or run the dataflow builder inside the tutorial folder.
  5. Compile the FPGA flow using the MNIST Numerals example.
  6. Observe the mismatch in output during the simulation.

Expected Behavior

The simulation should produce output data that matches the expected values, with zero error counts and validated data points.

Actual Behavior

The simulation completes with errors:

  • Total error count: 1
  • Mismatch between the expected data and the output data in the testbench (lines 151-162 of the code).
  • The validation process reports zero validated data points.
  • The examples are shown below
    Screenshot 2024-10-11 033153
    Screenshot 2024-10-11 033216

Possible Fix

Potential issues could be related to data misalignment between the input samples and expected outputs or timing issues in the testbench synchronization. Verifying the pointers (wr_ptr, rd_ptr) and ensuring data transfer synchronization in the testbench might resolve the problem.

Additional Context

  • The error occurs even without any code modification from the original FINN example.
  • Relevant ONNX files and simulation waveforms can be provided upon request.
@auphelia
Copy link
Collaborator

Hi @prospersu ,

Thanks for creating the issue, could you check if this PR solves your issue: #1212

The folding configuration wasn't updated with the latest FINN version and so the folding wasn't applied. That might have caused a mismatch between expected folding from the test bench and the actual FINN IP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants