使用单个索引进行VHDL 2D阵列初始化

时间:2017-06-20 12:14:53

标签: multidimensional-array vhdl

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

我想要的是

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

请让我知道如何实现这一目标。

此致 凯尔文

1 个答案:

答案 0 :(得分:3)

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