- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you are confusing yourself because you have nested for loops. I think you want to put Avrg in the outer loop?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks my friend i found a way for it.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page