VHDL_Prac_3

Embed Size (px)

Citation preview

  • 7/21/2019 VHDL_Prac_3

    1/2

    ELEC343 Basic VHDL Design Practical 3

    1

    ELEC343 Digital Systems Design

    Basic VHDL DesignPractical 3

    A Decoder and an Encoder

    Design a 3 to 8 decoder and an 8 to 3 encoder.

    1. A 3 to 8 decoder:

    The Truth Table

    A2 A1 A0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

    0 0 0 0 0 0 0 0 0 0 1

    0 0 1 0 0 0 0 0 0 1 00 1 0 0 0 0 0 0 1 0 0

    0 1 1 0 0 0 0 1 0 0 0

    1 0 0 0 0 0 1 0 0 0 0

    1 0 1 0 0 1 0 0 0 0 0

    1 1 0 0 1 0 0 0 0 0 0

    1 1 1 1 0 0 0 0 0 0 0

    The code for a 3 to 8 decoder is given in the lecture notes. You need to realize

    all three ways designing this decoder: when-else, with-select, and case-when.

    Write your own constraints file. Use the 8 LEDs from L32 to L25 and any 3

    switches on your FPGA board to be associated with your outputs and inputs

    respectively.

    After configuring the FPGA board, show your correct demo resulting from

    each of the three ways to your tutor.

  • 7/21/2019 VHDL_Prac_3

    2/2

    ELEC343 Basic VHDL Design Practical 3

    2

    2. An 8 to 3 encoder:

    An 8 to 3 encoder exactly performs the opposite function of a 3 to 8 decoder.

    You do not have to try all the three statements, and may use any way you like

    to finish the design.

    Again, you need to configure the FPGA board and show your result to your

    tutor.