Multiple loop GENERATE

Joined
Jan 28, 2010
Messages
4
Reaction score
0
Hi, I need to make a Generate statement depending on 2 variables.

I have tried to code it this way but it does not work:

registro8bits: FOR i IN 1 TO numcol
FOR j IN 0 TO numfil GENERATE
registrazo: registrode8bits port map (reloj_clk_1, reloj_ce_1, Reset, intermedia(j,i-1),intermedia(j,i));
Salida(j,i)<=intermedia(j,i);
END GENERATE;
END loop;

any ideas?

Thank you in advance
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
- the outer loop has incorrect syntax
- each generate line needs a label

Try this:
Code:
registro8bits: FOR i IN 1 TO numcol generate
inner: FOR j IN 0 TO numfil GENERATE
registrazo: registrode8bits port map (reloj_clk_1, reloj_ce_1, Reset, intermedia(j,i-1),intermedia(j,i));
Salida(j,i)<=intermedia(j,i);
END GENERATE inner;
END generate registro8bits;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top