-
Notifications
You must be signed in to change notification settings - Fork 24
Emp updates #368
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
Emp updates #368
Conversation
0127a69 to
4e0719e
Compare
4e0719e to
4847bfc
Compare
|
Turns out the original implementation of |
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.
@mcoshiro Since this script and fpga2_runipsynth.tcl don't seem to be called from any other script, what are their use cases? Also, I think they could be made more generic, e.g.:
# Minimal script to synthesize all IPs
set origin_dir "."
set proj_name "tf_1"
open_project $origin_dir/$proj_name.xpr
update_compile_order -fileset sources_1
# Create and launch all OOC runs for all IPs
launch_runs synth_1 -scripts_only
reset_runs [get_runs *_synth_1]
launch_runs -jobs 24 [get_runs *_synth_1]
wait_on_runs [get_runs *_synth_1]
exitThere 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.
Thanks, I hadn't realized you could clean this up with the wildcards. This is just a small utility I've been using to speed things up since running the various synth runs from the GUI is really slow for some reason; I wanted to put it somewhere version controlled so it doesn't get lost, but I can remove it from this repo and store it somewhere else if you would like.
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.
OK, that's what I suspected, and I've written similar things in the past. I think this is a useful tool to have in the repo, and I would just propose making it more generic, so that we only need one script that can be used for both the standalone and EMP-integrated projects, as well as moving it one directory up, i.e., to IntegrationTests/common/script/. Being more generic, I think that location makes more sense.
4847bfc to
df1e923
Compare
|
Hm, something weird is going on: since rebasing on the current master, sometimes, the FPGA2 SectorProcessor gets built in the |
|
There were some strange errors in https://gitlab.cern.ch/cms-l1tk/firmware-hls/-/jobs/61896820, so I cleaned out some directories on the Gitlab runner and tried rerunning the CI tests. Now, the job that runs the simulation passes, but there are many discrepancies when the results are checked: The only thing I can imagine having this effect are the changes to emData/download.sh in 4ed5130, where the delay argument is updated. Maybe this means some of the updates to the test bench that @aryd made need to be retuned? What do you think, @mcoshiro? |
Never mind. The update to download.sh only affects the full FPGA2 project, not the reduced FPGA1 project. So I don't know why this is failing here. |
|
Hm, I locally have a build of |
Actually, I think I just found the issue, and it's this commit: fe772a9. I know we've gone back and forth with this previously, but emData/MemPrints no longer exists after download.sh runs, so I think this commit needs to be reverted. |
Can do, but if I recall, not having this check previously resulted in some of the python scripts stepping on each other when the build was run with multiple threads. Was this fixed somewhere else? |
We discussed this just now during the meeting, but yes, this was fixed in this commit that was part of #363: 416a056 Sorry for burying it in a somewhat unrelated PR. |
|
Thanks for reverting the change in download.sh, @mcoshiro. Apparently, we still see discrepancies in the reduced FPGA1 simulation, and I realized the change to the target clock frequency here may be causing issues: firmware-hls/project/settings_hls.tcl Lines 12 to 13 in 10d6e9b
I think changing the target frequency changes the latency of some modules, which throws off the printout from the test bench. I tested this by creating a new branch that's identical to this PR branch, but where I revert the target frequency (michael_pr_test). And it passes all the CI tests: We want to be able to adjust the target frequency in order to help with timing, so I would propose rebasing once more onto the master branch after #373 is merged. Hopefully, the printout will then be flexible enough to not be thrown off by modules having different latencies. |
…ipulation for ex. checking output
…start robustification
…ird segfault in Vivado 2022.2
… comparison script. Simulation and hardware now largely match.
10d6e9b to
ff314ca
Compare
aehart
left a comment
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 investigated the discrepancies for the reduced FPGA1 project that we see even after rebasing on #373, and found they were caused by inconsistent latencies in the InputRouters, something we've seen before. Apparently, increasing the target frequency used for C-synthesis not only increases the latencies for the IRs, but also makes the latencies different for different instances, for some reason.
I took the liberty of pushing a commit that adds a latency pragma to the IR, which fixed the issue in my testing. And I'll set this PR to merge automatically once the CI tests finish.
I haven't had a lot of cycles for debugging this PR, so thanks for looking into this Andrew! I guess this also explains (some of) why some projects seemed to have the variable IR latency thing and some didn't. |
Large collection of developments for EMP-integrated project. This branch now generates and meets timing fairly reliably (~75% of the time for more performant implementation strategies). Hardware usage is much more reliable, and most events agree between simulation and hardware, though there seem to be edge cases where simulation and hardware disagree, namely the first event in simulation seems to be special and the last event fed through the buffer on hardware always seems to differ. There are also various bug fixes in the inter-FPGA interface, the TB-KFin/KF interface, and in KFout.
Changes include:
sp2_mem_writernow monitors BX change, and will reset SectorProcessor if it is not in time with start signalThings that are currently included, but may be modified/removed
This branch is currently based on
memory_resync.