[SOLVED] Verilog- Lab 0

25.00 $

Category:

Description

Rate this product

Switches, LEDs, and Multiplexers

The purpose of this lab is to learn how to utilize some I/O devices (i.e., switches and LEDs) on an FPGA development board and implement simple Multiplexer circuits utilizing these I/O devices.

Part 1 (Building a 3-bit 2×1 MUX)

 

For this part, you will design the circuit in Figure 1 and implement it on the Nexys board. The circuit implements a 2×1 MUX with 3-bit inputs and outputs. In other words, the inputs X, Y and output M are all 3-bit signals.

  1. Write Verilog code to describe a 2×1 MUX with 1-bit inputs and outputs (you can use dataflow or

behavioral modeling for this item). Call the file

`mux_2x1_simple`

  1. Use the `mux_2x1_simple` to implement a 3-bit input/output 2×1 MUX as shown in Figure 1. In other words, instantiate several instances of the

`mux_2x1_simple` module to create the 3-bit version. Call the file `mux_2x1_3bit`

  1. Verify the functionality of your code by implementing

it on the Nexys board using the following IO             Figure 1: 2×1 MUX specifications:

  1. SW2 ß SW0 for the input X
  2. SW5 ß SW3 for the input Y
  3. SW15 for the select signal
  4. LED2 ß LED0 for the output M
  5. LED15 to reflect the status of the select signal

Part 2 (Building a 3-bit 4×1 MUX)

 

For this part, you will use several instances of the

`mux_2x1_3bit`, that was developed in Part 1, to design and implement a 3-bit 4×1 MUX as shown in Figure 2. The circuit implements a 4×1 MUX with 3-bit inputs and outputs. The MUX will route X, Y, Z, or W to M depending on the value placed on S0 and S1.

  1. Write Verilog code to describe the 4×1 MUX, you should instantiate as many `mux_2x1_3bit` as

necessary. Call the file `mux_4x1_3bit`                                                    Figure 2: 4×1 MUX

  1. Verify the functionality of your code by implementing it on the Nexys board using the following IO specifications:
    1. SW2 ß SW0 for the input X
    2. SW5 ß SW3 for the input Y
    3. SW8 ß SW6 for the input Z
    4. SW11 ß SW9 for the input W
    5. SW15 ß SW14 for the select signal
    6. LED2 ß LED0 for the output M
    7. LED15 ß LED14 to reflect the status of the select signal