Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VHDL 2D Array Initialization using single Index

type kelvin_Array is array(0 to 3, 0 to 1) of integer
signal array_int1 :kelvin_Array;
signal array_int2 :kelvin_Array;

begin
array_int1 (0,0) <= 5; --using 2 indexes

what I wanted is

array_int1(0) <= (5,3);

Please let me know how can I achieve this.

Regards, Kelvin

like image 691
Kelvin Kalariya Avatar asked Jul 30 '26 21:07

Kelvin Kalariya


1 Answers

It looks like you want a single dimensional array of a single dimensional array of two integers, eg:

  type matthew_Array is array(0 to 1) of integer;
  type matthew_Array_Array is array(0 to 9) of matthew_Array;

  signal array_int1 : matthew_Array_Array;

begin

  array_int1(0) <= (5,3);

https://www.edaplayground.com/x/5Lz8

like image 193
Matthew Taylor Avatar answered Aug 01 '26 23:08

Matthew Taylor