type color is (blue,green,yellow,red);
signal p:color;------信号p是color数据类型
------------------------------------------------------------------------------
type nn is array (1 downto 0) of std_logic_vector(2 downto 0);
signal n1,n2:nn;-------定义二维数组
---------------------------------------------------------------------
条件信号赋值语句:并行描述语句
x<='0' when a='0' and b='0' else
'0' when a='1' else
'1' ;
--------------------------------------------------------------------------
选择信号赋值语句
with sel select
q<=d0 when"00",
d1 when"01",
d2 when others;
文章评论(0条评论)
登录后参与讨论