signal temp:std_logic_vector(1downto0);是什么意思?

来源:百度知道 编辑:UC知道 时间:2024/05/28 01:59:53
看到段程序不晓得是什么意思,是1位2进制半加器里的,请高手讲解下- -!

std_logic_vector是一维数组,数组中的每个元素的数据类型都是std_logic型,1downto0,为定义数组中元素的个数为2,downto确定数组元素的下标从左至右递减:temp(1),temp(0)即最左边的是权值最高的位。

2位数组
同理,(2 downto 1)也是2位