Draw three characters with seven segments
Online version: https://fpga.labsland.com/altera/digital-logic/lab-01/part-04/
Digital Logic · Lab 1, Part IV · DE1-SoC
Your circuit translates a two-bit code into a character on HEX0. On this display a low pin lights its segment. You will derive a Boolean expression for each pin and check the characters on a real display.
Lab setup
LabsLand Online Editor · DE1-SoC
Physical DE1-SoCCyclone V · 5CSEMA5F31C6 · camera, switches and buttons in the browser
Build in Quartus and upload the bitstream
Download and extract the Quartus project for your HDL. Open letter_decoder.qpf in Quartus Prime Lite with the Cyclone V device package. Edit the letter_decoder design. Segment 0 is already wired. Derive and implement the other six active-low pins as Boolean expressions.
Choose Processing → Start Compilation. Verify that the fitter completed for 5CSEMA5F31C6. In the DE1-SoC binary upload lab, choose Standard, upload output_files/letter_decoder.sof and wait for the programming confirmation. Locate the LED or HEX labels on the board camera before taking your readings.
If your course uses a LabsLand classroom, the upload opens a firmware library instead. Choose Browse files, wait until the SOF is selected, then choose Enter board with selected firmware.
- Get the starterDownload
letter_decoder.v - Open the LabsLand Online EditorOpen the lab Choose DE1-SoC · Verilog when you open the lab. LabsLand asks you to sign in. Use the access your course or institution provides.
- Follow the worksheetPredict first, then build, read the board and hand in. The build steps are below.
- Install Quartus Prime Lite with Cyclone V supportSkip this if it is already installed.
- Download the activityDownload worksheet and Quartus project Includes the worksheet and the Quartus project.
- Complete the design and compileStart with Map the segments in the worksheet below, then complete the design as its build steps describe. Open
letter_decoder.qpfand choose Processing → Start Compilation. Quartus writesoutput_files/letter_decoder.sof. - Upload the bitstream to LabsLandUpload bitstream LabsLand asks you to sign in. Use the access your course or institution provides.
Already compiled? Upload your .sof directly
Starter files · Verilog · VHDL · SystemVerilog
Worksheet and starter (.zip) for offline work or printing
Map the segments
Number the segments clockwise from the top. Segment 0 is the top bar, 1 the upper right, 2 the lower right, 3 the bottom, 4 the lower left and 5 the upper left. Segment 6 is the center. Sketch the lowercase d, capital E and digit 1 with these bars. For d, leave both the top and upper-left bars dark.
| SW1 SW0 | Character | Segments lit | Pin levels 6…0 |
|---|---|---|---|
| 00 | d | ||
| 01 | E | ||
| 10 | 1 | ||
| 11 | blank |
Read one column of your seven pin levels at a time. Which two input codes turn off the center bar? Find an expression for that pin, then do the other six.
Build
Create letter_decoder in your HDL editor, choose it as the top-level file and paste the starter. Its logic for segment 0 is supplied. Implement the other six pins as Boolean expressions. Choose Standard, synthesize and upload.
Read the board
Change SW1 and SW0 through the four codes and read HEX0 in the board camera. With E showing, flip SW2. Explain why the character should stay the same.
Hand in
Submit the table, one derivation and the four observed characters. If the blank code lights every segment, identify the convention your equations have reversed.
Adapted from FPGAcademy Digital Logic 21.1, Lab 1, Part IV. LabsLand wrote the remote exercise and HDL. Original Verilog handout · Original VHDL handout · MIT notice
