This may seem like a rather stupid question, but the transition from software to HDL's is sometimes rather frustrating initially!
My problem: I have an array multiplication I am trying to accomplish in Verilog. This is a multiplication of two arrays (point by point) which are of length 200 each. The following code worked fine in the testbench:
for (k=0; k<200; k=k+1)
result <= result + A[k] * B[k];
But it doesn't even come close to working in the Verilog module. I thought the reason was because the operation should take place over many many clock cycles. Since it involves writing out 200 multiplications and 199 additions if I do it by hand (!), I was wondering if there was a trick in making the for loop work (and be synthesizable)?
Thanks,
Faisal.