Digital Logic Lab 1

LabsLand extension · Virtual breadboard

Wire a status indicator through the FPGA

A switch and a green indicator live on a virtual breadboard. Two red LEDs live on the physical DE1-SoC. Can you use the red LEDs to tell whether a fault is in the switch input or in the green indicator output?

After Digital Logic Lab 1, use the same DE1-SoC and change its interface to Breadboard. The square brackets in the GPIO diagram identify each signal by number.

Lab setup

Physical DE1-SoCVirtual breadboard

  1. Get the starterDownload indicator_pair.v
  2. Open the LabsLand Online EditorOpen the lab LabsLand asks you to sign in. Use the access your course or institution provides.

Verilog · VHDL · SystemVerilog

Build the circuit

  1. Open Change beside User interface. Select Breadboard, then Configure. Use + to add a slide switch and an LED.
  2. Place the switch across three adjacent breadboard columns. Connect its left terminal to the red 3.3 V rail and its right terminal to the ground rail. Connect its middle terminal to FPGA input V_GPIO[24]. Follow the GPIO_0[24] label in the connector diagram.
  3. Place one LED lead on the ground rail. Wire the other lead to FPGA output V_GPIO[35]. Each unbroken group of five breadboard holes in a column shares a connection. Trace each wire to its signal before leaving the configurator.
  4. Wait for Ready and Saved, then select Done. Download the starter for your HDL. In the editor, choose New, name the file indicator_pair, paste the starter and select it as the top-level file. Predict the two red LED states and the green indicator state for each switch position.

Switch and LED connections. The left switch terminal goes to 3.3 V, the center terminal to FPGA input 24 and the right terminal to ground. Output 35 drives the virtual LED.

Open the full-size wiring diagram. The breadboard and its green indicator are virtual. Your HDL runs on the FPGA, and the camera shows LEDR1 and LEDR0 on the physical board.

Find the fault

Synthesize the starter and select Upload to FPGA. When the station reports that the program is ready, double-click the breadboard switch to change its position. Move the switch once in each direction to establish the starting state. Give the camera a few seconds after each change. Read the green indicator in the breadboard and the two rightmost red LEDs in the camera.

Switch position Physical LEDR1 Physical LEDR0 Breadboard indicator
First position
Opposite position
Return to first position

Your target is for the green indicator to agree with LEDR0. LEDR1 should still show the opposite state. Change one output expression, synthesize again and repeat the three observations.

Repaired design Physical LEDR1 Physical LEDR0 Breadboard indicator
First position
Opposite position
Return to first position

Submit your edit, an observation from each position, and an explanation of how the two red LEDs helped you locate the fault. If neither red LED changes when you operate the switch, which connection would you inspect first?

LabsLand material license