This week we got a lot of work done in terms of synthesizing the kernel. At the start of the week, we managed to get a synth running using floats as the main datatype. The problem with this one is that since floats were so computationally intensive, it was pretty much impossible to get the critical path to converge to the target critical path, and so we couldn’t meet timing. Nevertheless, this was a significant step in the right direction.
So my next task was to begin the migration from floats into our custom fixed point datatype. Basically any calculation we would perform on the particle positions or speeds, we would replace with a fixed point datatype. For now, we decided to use a fixed point representation where we have 6 bits representing the integral part of the number and 6 bits representing the fractional part of the number.
Unfortunately, this would prove to be quite an involved task, as we would also need to make significant changes to all of the math libraries in order to change them to use the new datatype. So, a majority of this week was spent incrementally compiling and changing the math libraries to use the arbitrary precision datatype instead of the floats. This was complicated by the fact that there were still some weird C++ issues that led to some weird aliasing of the datatype to the int datatype. Another specific issue we had to investigate was how we would take care of some specific math functions (such as square root); thankfully, this issue was easily addressed using the equivalents in the HLS math library. Other than that, we seem to have mostly figured out those issues, and now we have a compile running!
Our next step is to finalize the changes to get a complete synth of the kernel and then upload the project to normal Vitis so we can generate a binary file and upload it onto the board in time for the in-class demo. All in all, I am much more optimistic as to the effectiveness of our project after this week.