zoukankan      html  css  js  c++  java
  • VHDL之code structure

     1  VHDL units

    VHDL code is composed of at least 3 fundamental sections:

     1) LIBRARY declarations: Contains a list of all libraries to be used in the design. For example: ieee, std, work, etc.

     2) ENTITY: Specifies the I/O pins of the circuit.

     3) ARCHITECTURE: Contains the VHDL code proper, which describes how the circuit should behave (function).

    2  Library declarations

      A LIBRARY is a collection of commonly used pieces of code. Placing such pieces inside a library allows them to be reused or shared by other designs.

      To declare a LIBRARY(that is, to make it visble to the design) two lines of code are needed:

    1 library library_name;
    2 use library_name.package_name.package_parts;

      Three packages from three different libraries, are usually needed in design:

      - ieee.std_logic_1164 (from the ieee library)

      - standard (from the std library)

      work (work library)   

    1 library IEEE;
    2 use ieee.std_logic_1164.all
    3 
    4 library std;
    5 use std.standard.all
    6 
    7 library work;
    8 use work.all;

       The libraries std and work are made visible by default, so there is no need to declare them; only the ieee library must be explicitly written when the STD_LOGIC(or STD_ULOGIC) data type is employed in design.

  • 相关阅读:
    浅谈python web三大框架
    Mysql异常
    格式化时间转换
    MySql存储日期为long型,判断时间大小
    Linux下部署项目
    excel
    Tomcate的启动问题
    计算时间差
    地图系的转换
    关于获取本机真实IP
  • 原文地址:https://www.cnblogs.com/mengdie/p/4483103.html
Copyright © 2011-2022 走看看