Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] VHDL:problem with for-generate statement

Status
Not open for further replies.

darshkamal

Junior Member level 1
Joined
Nov 7, 2011
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,443
I've this code which introduces an error:


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--Signals declarations are as follows:
 
    signal real_int,imag_int:mat3x8;
    signal i:int_1;
    signal j:ufixed (9 downto 0);
 
--data types are defined as follows:
 
  type my_array5 is array (0 to 7) of sfixed(7 downto -8) ;
  type mat3x8 is array (1 to 3) of my_array5;
 
--The error is in the following lines:
 
outer1:for a in 2 to 3 generate --stages after the first stage
        outer2:for b in 0 to (8/(2**a)-1) generate--b denotes the group that we are at now
          j<=to_ufixed(0.0,9,0);     --j is the power of the factor 'W',j=0 at the start of each group
          i<=b*(2**a);    --i is used to denote the index of the 1st element in each group
          inner:for k in 0 to ((2**a)/2)-1 generate --k determines the no of butterflyes in the current group
            for slice2:b_fly use entity work.b_fly(b_fly1);
              begin
                slice2:b_fly
                generic map(N1=>10,N3=>8)--N3=8 because it's 8-point fft
                port map(x_real=>real_int(a-1)(i+k),x_imag=>imag_int(a-1)(i+k),
                         y_real=>real_int(a-1,i+k+2**(a-1)),y_imag=>imag_int(a-1,i+k+2**(a-1)),
                         N=>a,
                         K=>ufixed(j),
                         z1_real=>real_int(a,i+k),z1_imag=>imag_int(a,i+k),
                         z2_real=>real_int(a,i+k+2**(a-1)),z2_imag=>imag_int(a,i+k+2**(a-1)));
                j<=j+1;
          end generate inner;
        end generate outer2;
      end generate outer1;


----------------------------
Error is
Code:
** Error: FFT8.vhd(55): (vcom-1450) Actual (indexed name) for formal "x_real" is not a static signal name.

** Error: FFT8.vhd(55): (vcom-1450) Actual (indexed name) for formal "x_imag" is not a static signal name.

** Error: FFT8.vhd(56): (vcom-1450) Actual (indexed name) for formal "y_real" is not a static signal name.

** Error: FFT8.vhd(56): (vcom-1450) Actual (indexed name) for formal "y_imag" is not a static signal name.

** Error:FFT8.vhd(59): (vcom-1450) Actual (indexed name) for formal "z1_real" is not a static signal name.

**Error: FFT8.vhd(59): (vcom-1450) Actual (indexed name) for formal "z1_imag" is not a static signal name.

** Error:FFT8.vhd(60): (vcom-1450) Actual (indexed name) for formal "z2_real" is not a static signal name.

** Error:FFT8.vhd(60): (vcom-1450) Actual (indexed name) for formal "z2_imag" is not a static signal name.
 
Last edited by a moderator:

I think the problem is that you are using "a" (2**a) in the declaration for outer2, and that's not allowed-I think you need a constant.
 

"i" isn't a constant
 

    V

    Points: 2
    Helpful Answer Positive Rating
Yes, variable i is not a constant used in the instantiation. Variable i is changing according to i<=b*(2**a);. But I cannot think of how to work around other than change the implementation structure.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Maybe the easiest (not necessarily the RIGHT) way to do it would be something like generating ALL the blocks, and then let the synthesis trim away the ones that aren't used. In other words, if you don't connect the outputs of specific blocks, they'll be eliminated.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top