how to declare 2D vector of type unsigned?

Status
Not open for further replies.

fahim1

Member level 4
hi
can we declare 2D vector of type unsigned?how?
tnx

shaiko

signal some_vector : unsigned ( 7 downto 0 ) ; -- ( 7 downto 0 ) is just an example

TrickyDicky

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);

fahim1

fahim1

Points: 2

shaiko

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

fahim1

Points: 2