3.2.4  程序包、库

3.2.4.3  库的种类

VHDL库可分为 5种:

   1、IEEE 库

      定义了四个常用的程序包

        std_logic_1164 (std_logic types & related  functions)

        std_logic_arith (arithmetic functions)

  std_logic_signed (signed arithmetic functions)

  std_logic_unsigned (unsigned arithmetic functions)

                                                             

       Type STD_LOGIC:

         9 logic value system (‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’, ‘-’)                            

             ‘W’, ‘L’, ‘H” weak values (Not supported by Synthesis)

             ‘X’ - used for unknown

             ‘Z’ - (not ‘z’) used for tri-state

             ‘-’ Don’t Care                                               

   2、STD 库(默认库)

            库中程序包为:standard,

            定义最基本的数据类型:Bit,bit_vector ,Boolean,Integer,Real,and Time

            注:Type BIT

                     2  logic value system (‘0’, ‘1’)

   3、面向ASIC的库

   4、WORK库(默认库)

   5、用户定义库

 

3.2.4.4  库及程序包的使用

库及程序包的使用语法:

library   库名;

    use   库名.程序包名.All;

例:

          library  ieee;

          use  ieee.std_logic_1164.all; 

2 选 1 选择器:

 

 

 

上一页  下一页  返回