原创 VHDL常见语句

2009-11-20 09:04 2103 3 3 分类: FPGA/CPLD

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;

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
3
关闭 站长推荐上一条 /3 下一条