Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16597 Discussions

what should i replace with question mark?

Altera_Forum
Honored Contributor II
1,329 Views

hi every body 

this is my code 

architecture structure of main is ..... begin L1:for s in 0 to N-1 generate L2:for t in 0 to 2**s-1 generate -- Output index constant output_index : integer := (2**s-1) + t; -- Input indices (based on the output index) constant input_index_start : integer := 2*output_index+1 ; constant input_index_end : integer := 2*output_index + 2; begin DUT: entity work.trans port map ( rstN => rstN, clk => clk, data => n(input_index_end downto input_index_start), i => n(output_index), d => m(output_index) ); Avrg(???????????)<=m(output_index); end generate; end generate;  

 

m is the output of my for-generate statement. 

i wanna save the value of m in Avrg , every loop . 

i mean in the first loop i want to save m in the LSB of Avrg(0) 

in the second , save it in Avrg(1) 

etc. 

what should i replace with question mark?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
381 Views

you are confusing yourself because you have nested for loops. I think you want to put Avrg in the outer loop?

0 Kudos
Altera_Forum
Honored Contributor II
381 Views

thanks my friend i found a way for it.

0 Kudos
Reply