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.

Determine the dimentions of an array using the "range" attribute.

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
Code:
-- a,b,c,d are entity generics
type some_array is array ( a to b ) of std_logic_vector ( c downto d ) ;
signal my_array : some_array

suppose I want to find the ranges of the depth and width dimentions.
what is the correct syntax to do so?

Code:
width_of_some_array <= 
depth_of_some_array <=
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,076
Helped
2,078
Reputation
4,173
Reaction score
2,032
Trophy points
1,393
Activity points
39,231
Width <= my_array(a)'length;
depth <= myarray'length;
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top