vhdl coding

download vhdl coding

If you can't read please download the document

  • date post

    07-Nov-2014
  • Category

    Documents

  • view

    66
  • download

    4

Embed Size (px)

description

basics

Transcript of vhdl coding

VHDL Coding Basics

Overview

Chip

Libraries Library ieee; Use ieee.std_logic_1164.all; Use ieee.std_logic_arith.all;

Use ieee.std_logic_signed.all; Use ieee.std_logic_unsigned.all;

Data Types bit values: '0', '1' boolean values: TRUE, FALSE integer values: -(231) to +(231 - 1) std_logic values: 'U','X','1','0','Z','W','H','L','-'

U' = uninitialized 'X' = unknown 'W' = weak 'X 'Z' = floating 'H'/'L' = weak '1'/'0 '-' = don't care Std_logic_vector (n downto 0); Std_logic_vector (0 upto n);

Entity Define inputs and outputs Example:

Inputs and Outputs

Entity test is Port( A,B,C,D: in std_logic; E: out std_logic); End test;

A B E

ChipC D

Architecture Define functionality of the chip

A X