-
Notifications
You must be signed in to change notification settings - Fork 681
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
MMIO FFT Generator #1067
MMIO FFT Generator #1067
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should also be some changes to the docs mentioning that this exists. (You should aggregate all the docs used to integrate this in some concise way).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also should add to the CI the test for this accelerator. See the .github
and .circleci
directories
Holding off on this until we have it working since we still don't know what the correct FFT output is. |
So what the correct FFT output is ? I run your FFTGenerator project ,the result is |
The test points sample a 16mhz sine wave at 128mhz so we expect to see Read 5 contain large nonzero real and imaginary values. All other reads should be close to 0 (ideally they would be 0 but imprecision in the fixed point representation adds some error). Since the FFT itself has been verified and taped out in the past, the issue is likely with the test point generation or due to us misunderstanding the number representation for the FFT input. The script for the test point generation can be found here: https://github.com/ucb-bar/FFTGenerator/blob/02e796d26c38370c737e61dfcee7399c6e5ee76e/test_pts.py |
I noted that " exponent = (-2 * pi * (freq / freq_samp) * complex(0, n) ) ; points.append(e ** exponent)" in test_pts.py. But a sinx=(exp(jx)-exp(-jx))/(2*j). And I am also confused about the number representation of for the FFT input . It is a concat of |
I'm not too familiar with the math behind generating the test points; I'm meeting with someone next week to go over that so I can provide more clarification then. The number representation can be found on line 95 of Tail.scala. My understanding is that the first 16 bits (specified by I tried your suggestion for generating the sample points with the following code: points = []
for n in points_n:
numerator = (e ** complex(0, n)) - (e ** complex(0, -n))
denominator = complex(0, 2)
sin_n = numerator/denominator
points.append(sin_n) and got the following output:
which still does not look correct since there is no noticeable spike at read 5. I will follow up next week once I meet with someone who has used the FFT code before and can provide some more insight. |
@lpppeipei as an update, we have verified that the FFT generator functions correctly. In the latest commit, the method described for generating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits. Waiting on CI to be added but overall this looks pretty good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just remembered that you should also add to the Chipyard docs as well.
Co-authored-by: Abraham Gonzalez <abe.j.gonza@gmail.com>
e1b71e2
to
f4587c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like there is still issue with doc building and with the tutorial patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
After run make CONFIG=FFTRocketConfig, ERROR as follows: |
Do you have this issue only with |
I run it again. It's OK now. Thanks. |
Hi AnimeshAgrawal, Is it possible to run the FFTRocketConfig design on Xilinx Artix-7 ? |
I'm not sure; I haven't tried doing this before. If you search for FPGA in the chipyard documentation you'll find a couple options: https://chipyard.readthedocs.io/en/stable/search.html?q=fpga&check_keywords=yes&area=default You can check out firesim (berkeley's platform for fpga-accelerated simulation) or look at the docs for more information on running the generated verilog on your own fpga! |
Thanks a lot! |
I follow your advice to read the "FPGA Prototyping" part of the chipayard docs. Finally I decided to run the FFTRocketConfig design on VCU118. And I first add " Then I run "make SUB_PROJECT=vcu118 CONFIG=FFTRocketVCU118Config bitstream" I got a ".bit" file indeed. But when I open the ".xpr" file in vivado 2018.3, it seems not right. The following is the simulation: Any wrong with my flow ? |
I haven't tried simulating Chipyard SoCs on an FPGA before so I'm not sure how you can fix it. Another approach is you can try is running the simulation with something like:
Then, the verilog for |
Type of change: new feature
Impact: other
Testing:
Compile
fft-test.c
in the FFT Generator Repo and run it using the RocketWithFFT config. Should see close to 0 outputs for all lanes except lane 5, which should be a large, nonzero, value.Status:
FFT is receiving the passed in input but is not currently not outputting the expected values. Issue is either with the FFT or with the input points.
Release Notes
MMIO-based FFT Generator.