Fifth chapter combinational Logic circuit design

Source: Internet
Author: User

Fifth chapter combinational Logic circuit design

5.1-Gate Circuit

5.2 Encoder

5.3 Priority Encoder

5.4 Decoder

5.5 Multi-Channel Selector

5.6 Numeric Comparator

5.7 Addition device

In the previous chapters, we introduced VHDL language statements, grammar and the use of VHDL language design hardware circuit basic method, this chapter focuses on the use of VHDL language design of the basic combination of logic module method.

5.1-Gate Circuit

Two-input XOR gate

The logical expression for the two-input XOR gate is as follows:


The logical symbols of the two input XOR gates are shown in the figure, and the truth tables are shown in the following table:

A b y

0 0 0

0 1 1

1 0 1

1 1 0

Example: An XOR gate designed by means of behavior description

(based on logical expression)

LIBRARY IEEE;

Use IEEE. Std_logic_1164.all;

ENTITY XOR2_V1 is

PORT (A,b:in std_logic;

Y:out std_logic);

END XOR2_V1;

ARCHITECTURE behave of XOR2_V1 is

BEGIN

Y <= a XOR b; --Parallel statements

END behave;

Example: An XOR gate designed by means of data flow description

(According to the truth table)

LIBRARY IEEE;

Use IEEE. Std_logic_1164.all;

ENTITY Xor2_v2 is

PORT (A,b:in std_logic;

Y:out std_logic);

END Xor2_v2;

ARCHITECTURE dataflow of XOR2_V2 is

BEGIN

PROCESS (A, B)

VARIABLE comb:std_logic_vector (1 Downto 0);

BEGIN

Comb: = A & B;

Case Comb is

                when

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.