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  

  

 ---------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;
---------------------------------------
ENTITY mux IS
PORT ( a, b, c, d, s0, s1: IN STD_LOGIC;
    y: OUT STD_LOGIC);
END mux;
---------------------------------------
ARCHITECTURE pure_logic OF mux IS
BEGIN
 y <= (a AND NOT s1 AND NOT s0) OR
    (b AND NOT s1 AND s0) OR
    (c AND s1 AND NOT s0) OR
     (d AND s1 AND s0);
END pure_logic;
---------------------------------------

Miscellaneous operators

    **    Exponentiation

    abs      Absolute value

  The exponentiation operator has two operands. This operator is defined for any integer or floating point number. The right operand (exponent) must be of integer type. When the exponent is the positive integer, then the left operand is repeatedly multiplied by itself. When the exponent is the negative number, then the result is a reverse of exponentiation with the exponent equal to the absolute value of the right operand. If the exponent is equal to 0 the result will be 1.

  The abs operator has only one operand. It allows defining the operand's absolute value. The result is of the same type as the operand.

2 **  =
3.8 ** = 54.872
** (-) = / (**) = 0.0625

最新文章

  1. getAttribute、setAttribute、removeAttribute
  2. 用U盘安卓esxi虚拟机出现 error loading /s.v00 错误解决办法
  3. mysql小结
  4. Windows Azure初体验
  5. OC对象的归档及解档浅析
  6. 第四章 使用Docker镜像和仓库
  7. Android缓存学习入门
  8. 神奇的莫比乌斯带(mobius)
  9. android mvvm
  10. Java 8的五大开发技巧
  11. memcached和mongodb 在windows下安装
  12. 从git上下载代码并导入eclipse
  13. 一道C语言面试题:得到整数的M进制表示字符串
  14. 站点接入QQ登录
  15. &quot;ORA-01460: 转换请求无法实现或不合理&quot;及C#操作Blob总结
  16. Integer Sequence Dividing CodeForces - 1102A (规律)
  17. 洛谷P3959 宝藏(NOIP2017)(状压DP,子集DP)
  18. 解决Jmeter插件ERROR: java.io.IOException: Agent is unreachable via TCP的错误
  19. bootstrap modal插件弹出窗口如何限制最大高度,并且在内容过多时可以滚动显示
  20. Python3.5 学习十二 数据库介绍

热门文章

  1. 关于嵌入式web服务器
  2. NYIST 760 See LCS again
  3. [HDU2328]Corporate Identity(后缀数组)
  4. [bzoj2060][Usaco2010 Nov]Visiting Cows 拜访奶牛_树形dp
  5. 关于Activiti的工作流选型
  6. RDS for MySQL 通过 mysqlbinlog 查看 binlog 乱码
  7. javax ee常用类
  8. UIView 的图层关系
  9. c++ 11 thread 初试
  10. Android+Jquery Mobile学习系列(3)-创建Android项目