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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

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

Similar Threads - VHDL input matrix Date
C/++/# Question about input format file (for creating a net) Dec 13, 2017
C/++/# Question about limiting inputs in C Apr 24, 2017
Fortran How does Fortran know the Inputs and Outputs of Subroutines Jan 23, 2017
SWIFT: Make program wait for input Oct 10, 2016
Vhdl Traffic Signal May 23, 2007