码迷,mamicode.com
首页 > 其他好文 > 详细

VHDL之concurrent之operators

时间:2015-05-20 23:45:34      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:

 

Using operators

  Operators can be used to implement any combinational circuit. However, as will become apparent later, complex circuits are usually easier to write using sequential code, even if the circuit does not contain sequential logic.

  技术分享

 

Example  Multiplexer  

  技术分享

 1 ---------------------------------------
 2 LIBRARY ieee;
 3 USE ieee.std_logic_1164.all;
 4 ---------------------------------------
 5 ENTITY mux IS
 6 PORT ( a, b, c, d, s0, s1: IN STD_LOGIC;
 7     y: OUT STD_LOGIC);
 8 END mux;
 9 ---------------------------------------
10  ARCHITECTURE pure_logic OF mux IS
11  BEGIN
12   y <= (a AND NOT s1 AND NOT s0) OR
13      (b AND NOT s1 AND s0) OR
14      (c AND s1 AND NOT s0) OR
15      (d AND s1 AND s0);
16  END pure_logic;
17  ---------------------------------------

 

VHDL之concurrent之operators

标签:

原文地址:http://www.cnblogs.com/mengdie/p/4518317.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!