So we are implementing inverse calculation of 8*8 matrices using LU decomposition on a Basys 3 Artix 7 FPGA:
1) Upon synthesis and implementation, we found that the LUT consumption and I/O cons is extremely high and exceeds by a huge margin. The values are tabulated below:
Consumption Number Available in the Basys3 board LUT 173897 20800 IO 931 106 DSP 90 90 FlipFlop 3743 41600
How do I go about optimizing the number of LUTs and IO consumed?
We use an 8 bit representation for each element of the matrix and the code uses a lot of temporary variables inside for statements to get the intermediate results.
The modules are as follows: In the top module, we compute the LU decomposition of the input matrix and then pass the L and the U matrices to the module that computes the inverse. We then pass the resulting values to the output port.
2) We are wondering on how to pass the matrix as an input to the FPGA.
We considered two options:
a)Serializing the input completely (stream the bits via a UART connection from the computer) and developing an appropriate decoding circuitry to assign the inputs accordingly at run time. We are apprehensive about the hardware consumption as we have already exceeded the limits for consumption.
b)Inputting the values in the computer and storing the input in the RAM and reading the values from the RAM and feeding it to our program. We referred to the following link: https://stackoverflow.com/questions/27211466/storing-array-in-fpga , but the answer was not very clear on how to go about each of the method step by step. (Like how to create a GUI (if needed) to pass the input values and then passing it to the board and storing it in a RAM and reading from the RAM) and how to incorporate the code (for reading or writing to RAM) into a source code (if required). I also referred a bit to this manual: https://www.xilinx.com/support/documentation/sw_manuals/xilinx13_2/data2mem.pdf , but being a complete novice, I am not sure on how to proceed.
Please provide a step by step procedure on how we pass and store the matrix as an input and read from it and store the results in an output, any links to relevant IPs which can be included in the code and any extra references which we can learn from.