Lab 1

Rotate a word across four displays

Digital Logic · Lab 1, Part V · DE1-SoC

Make a four-character message move one place to the left when the selection increases. A character leaving HEX3 must reappear on HEX0. Each display needs a selector for its character and a decoder for its seven segments.

Lab setup

Physical DE1-SoCCyclone V · 5CSEMA5F31C6 · camera, switches and buttons in the browser

  1. Get the starterDownload word_rotator.v
  2. Open the LabsLand Online EditorOpen the lab LabsLand asks you to sign in. Use the access your course or institution provides.
  3. Follow the worksheetPredict first, then build, read the board and hand in. The build steps are below.

Starter files · Verilog · VHDL · SystemVerilog

Arrange the message

Read the displays from HEX3 to HEX0. At rotation zero they receive SW7…6, SW5…4, SW3…2 and SW1…0 respectively. Use 00 for d, 01 for E, 10 for 1 and 11 for blank. Set SW7…0 to 00011011. Draw a box for every display, including the blank, and predict what you will see for each setting of SW9…8.

Build

Create word_rotator in the Online Editor for your HDL, choose it as the top-level file and paste the starter. Its four lanes decode the initial message. Complete the selection in each lane. At one left rotation HEX0 must receive the old HEX3 character. Keep the LEDR outputs mirroring all ten switches. Select Standard, synthesize and upload to the FPGA.

Read the board

SW9…8 Prediction, HEX3 to HEX0 Camera reading, HEX3 to HEX0
00
01
10
11

Read the four rightmost displays. Write a dash for a blank. Return to rotation zero and change the message switches to 01101100. Confirm that the displayed word changes. This test distinguishes a selector that reads your switches from a circuit that rotates a fixed word.

Hand in

Submit your HDL, the four readings and the result with the second message. Explain which source pair HEX1 receives when SW9…8 is 10.

Adapted from FPGAcademy Digital Logic 21.1, Lab 1, Part V. LabsLand wrote the programs and remote procedure. Verilog handout · VHDL handout · MIT notice