Rotate a word on four displays using the board clock
Online version: https://fpga.labsland.com/altera/digital-logic/lab-04/part-04/
You already know how to move a word with switches. Here the board moves it once per second. Read HEX3 through HEX0 from left to right. At reset the display reads -dE1, where a dash means a blank. The message on this DE1-SoC is dE1.
Lab setup
LabsLand Online Editor · DE1-SoC
Physical DE1-SoCCyclone V · 5CSEMA5F31C6 · camera, switches and buttons in the browser
Compile the scrolling display on a DE1-SoC
Extract the project for your HDL and open timed_word.qpf in Quartus Prime Lite with the Cyclone V device package. Complete the mapping from the character index to each output position. Leave CYCLES_PER_SECOND at 50,000,000. The supplied timed_word.sdc defines the 20 ns period of CLOCK_50. Run Processing → Start Compilation and check that the fitted device is 5CSEMA5F31C6.
Open the DE1-SoC binary-upload lab in the Standard interface. Upload output_files/timed_word.sof to the firmware library, select that file and enter the board. Use SW8 to reset, SW9 to pause and the displays to time a full rotation. At reset you should see -dE1, where each dash denotes a blank position. Record the results in the observation table.
- Get the starterDownload
timed_word.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 Predict a complete turn in the worksheet below, then complete the design as its build steps describe. Open
timed_word.qpfand choose Processing → Start Compilation. Quartus writesoutput_files/timed_word.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
Predict a complete turn
Write one row for each of the 4 positions. Move the leftmost character to the right end at each tick. Pick one transition where a lit digit becomes blank and another where a character crosses the end of the display. Mark the two outputs you will watch.
Build
Open timed_word in the Standard Online Editor. The supplied counter produces the time interval and the current position. Complete the mapping between the output column, the position and the original character index. Derive a wrap rule that works for the last column at the last position. Keep the hardware clock parameter at 50,000,000.
Follow the physical word
Hold SW8 high to see the starting position. Lower it and observe a full rotation. Use SW9 to pause on one of your marked states. Record the entire display row and the time until that same state returns after you resume. Pressing reset while paused should restore the starting row. Lower both switches before leaving.
| Observation | Your prediction | Board camera |
|---|---|---|
| Initial word | ||
| A character crosses the end | ||
| Last position before wrap | ||
| First repeated state |
Submit your state table and measured rotation period. Explain why the complete word takes 4 seconds to return although each character moves once per second.
Adapted from FPGAcademy Digital Logic 21.1 · Lab 4, IV. verilog · vhdl · MIT
