Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

VHDL input to matrix

  1. Feb 22, 2012 #1


    User Avatar
    Gold Member

    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.
    Code (Text):

                    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
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted