From Hamsterworks Wiki!
Here is one solution to the problem posed in The HDL paradigm in a Spreadsheet
The average of the numbers will be in cell D8.
So there you have it - computing the average of a list of numbers without loops, and with all assignments happening every step of the clock
And so you can see what this looks like in HDL here is the equivalent expressed in VHDL
process(clk) begin if rising_edge(clk) then if count /= 0 then average <= total / count; else average <= 0; end if; count <= count+1; total <= total+value; end if; end process;