首页 文章

VHDL矢量阵列

提问于
浏览
0

我试图在VHDL中创建一个向量数组但是我在modelsim中遇到错误 . 我有:

type   read_data_array is array (0 to 73) of std_logic_vector(7 downto 0);    
signal reg_data_stream              : read_data_array;

我将数据存储到数组中:

reg_data_stream(counter) <= read_data;

“read_data”是std_logic_vector(7 downto 0),“counter”是从0递增的基本计数器 .

1 回答

  • 0

    要索引数组或向量,VHDL需要一个整数 . 如果counter是 std_logic_vector ,请尝试:

    to_integer(unsigned(counter)) <= read_data;
    

相关问题