Lab 4

Rotate a word on four displays using the board clock

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

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

  1. Get the starterDownload timed_word.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

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