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] array type can't be unconstained

Status
Not open for further replies.

nsgil85

Member level 4
Member level 4
Joined
Dec 11, 2012
Messages
73
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,833
Hello,

I have this package code:


Code VHDL - [expand]
1
2
3
4
5
6
7
8
package package_arrays is
 
type array_uns  is array ( natural range <> ) of unsigned ; 
 
end package package_arrays ;
 
package body package_arrays is
end package body package_arrays ;



and this code:


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
library work ;
    use work.package_arrays.all ;
    
entity s_disp is 
 
    generic
    ( 
        GENERIC_POS_CONF_ROWS           : positive := 4 ;           
        GENERIC_POS_CONF_DATA_WIDTH     : positive := 8 ;                                   
    ) ;                                             
                                                
    port                                                                                    
    (       
 
        PORT_IN_UNS_ARRAY_DATA      : in array_uns(0 to GENERIC_POS_CONF_ROWS -1)(GENERIC_POS_CONF_DATA_WIDTH -1 downto 0) ;    
 
        PORT_OUT_UNS_DATA           : out unsigned( GENERIC_POS_CONF_DATA_WIDTH -1 downto 0) ;                                                                                                                                                          
        G_RST                       : in std_logic ;
        G_CLK                       : in std_logic      
    ) ;  
    
end entity s_disp;
architecture rtl_s_disp of s_disp is 
 
begin
 
end architecture rtl_s_disp;



and i get from Quartus this message :
Error (10294): VHDL Type Declaration error at package_arrays.vhd(52): element type for array type cannot be unconstrained


why do i get this message? i wrote the range in the entity level

Thanks
Gil
 

Unconstrained array element types are basically supported by VHDL-2008, not before.

As far as I understand, a separate type declaration for the unconstraint unsigned element would be needed, means the shown syntax won't be right in VHDL-2008.

The other question is if your tool supports this VHDL-2008 feature.
 

So how would you suggest to declare this unconstrained array?

Quartus support VHDL-2008 and meanwhile i manged to synthesis it , but this should be implemented on ISE.

Thanks
Gil
 

The syntax you have is correct - the type assignment is done at the object declaration.
ISE doesnt support VHDL 2008. So you'll have to constrain the array at the type declaration.
Only Vivado 2014.4 and later has 2008 support.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top