- #1
perplexabot
Gold Member
- 329
- 5
Hello all. So there is a Din signal that is sending some integers according to some clock, my goal is to get each one of these integers and store it in a 8 x 8 matrix. Here is the code I have done, please tell me what you think. Also a quick question: In my code I have assumed that when the compiler goes in and out of the process function, my variables ii and jj will retain there values, so in C++ for example I would assign them as static variables. Is my assumption true? Thank you.
PS: I hope this isn't a misplaced post
Code:
PROCESS (Din)
if (jj < 8) LOOP
if (ii < 8) LOOP
InBlock(jj,ii) := Din; -- assigning array slot to Dinput...
IF ii = 7 THEN
jj := jj + 1;
ii := 0;
END IF;
ii := ii + 1;
END LOOP;
END LOOP;
END PROCESS;
PS: I hope this isn't a misplaced post