4 ms·
I cannot overstress just how much attention one has to pay to verification of any results produced using Excel. Don't get me wrong, I think it is a fantastic t
by robomartin 3y ago
I cannot overstress just how much attention one has to pay to verification of any results produced using Excel. Don't get me wrong, I think it is a fantastic tool and have been using it for decades. However, I have the scars to prove just how badly it can hurt you.
One of the best (worst?) cases was a bug that caused a custom high speed board based on Xilinx FPGA's to have intermittent failures that were very difficult to track down.
It was six months of almost 12 hours a day fully engulfed in debugging this FPGA code. I must have re-written it from the bottom up three times during this period. You get to the point where you start to doubt spaces within statements...even when you know damn well they are irrelevant.
And then, one day, at two in the morning, while looking at the code that generated coefficients for a set of polyphase FIR filers, and a micro-coded state machine that drove that module, I saw the problem.
I made a mistake in the calculations and used ROUND() instead of ROUNDUP(). This caused all kinds of crazy issues, like FIFO's being short by one element and jumps occurring at the wrong time. It was truly maddening.
The Verilog code this spreadsheet generated was copied and pasted right into a couple of Verilog modules and compiled into the chip without even looking at it. It worked very well, it just didn't do what we wanted it to do.
We still use Excel a lot to help generate code. However, lessons learned over the years made us far less trusting, which is good.