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.

how to declare 2D vector of type unsigned?

Status
Not open for further replies.

fahim1

Member level 4
Joined
Jun 4, 2015
Messages
75
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
517
hi
can we declare 2D vector of type unsigned?how?
tnx
 

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
signal some_vector : unsigned ( 7 downto 0 ) ; -- ( 7 downto 0 ) is just an example
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,065
Helped
2,077
Reputation
4,171
Reaction score
2,030
Trophy points
1,393
Activity points
39,121
for a 2d vector:

Code:
type my_array_t is array(natural range <>, natural range <>) of unsigned(7 downto 0);
signal my_array : my_array_t(1 downto 0, 10000 downto 623);
 
  • Like
Reactions: fahim1

    fahim1

    Points: 2
    Helpful Answer Positive Rating

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
A vector is a set of single bits (my example):
xxxxxxxx

An array is a set of vectors of the same length (TrickyDicky's example)
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx

Which one are you asking about?
 
  • Like
Reactions: fahim1

    fahim1

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top