VHDL中的数组类型不匹配
我的VHDL代码非常简单的问题。我已经定义了以下代码:
type irf_array is array(0 to 1) of integer;
signal index : std_logic;
....
index := input(5);
out := irf_array(index);
当试图编译这个简单的代码片段时,我得到以下错误:
Error: array index type mismatch [6.4]
所以我想知道是否有人知道如何使用std_logic值作为我的数组的输入。
非常感谢!
没有找到相关结果
已邀请:
1 个回复
草票
您可以使用std_logic_vector而不是unsigned类型,并进行额外的转换: