the 1-bit adder. Although the last step, breadboard
design, is optional, it is recommended that the students
complete that step because it helps them understand
fundamental principles such as the importance of
connecting power and ground, the principle of a wire
being equipotential and connecting to multiple gate
inputs, and the concept of 1 and 0 as 5V and ground
(GND).
Table 2. Laboratory Assignments
Adventure Game Finite State Machine
Turn Signal Finite State Machine (FSM)
C Programming: Fibonacci numbers +
C Programming: Temperature control
ARM Assembly Language Programming
ARM Single-Cycle Processor
ARM Multicycle Processor Control
ARM Multicycle Processor Datapath
In labs two and three the students build increasingly
complex digital circuits, a seven-segment display and a
finite state machine (FSM), using schematic entry and
then simulating, synthesizing, and building their design
in hardware on the DE2 board. We have found that it is
critical for students to first create designs in schematic
before entering their designs using a hardware
description language (HDL). By so doing, the students
become grounded in thinking of digital designs in
terms of gates and, more broadly, in terms of
combinational logic and registers. Without this
foundation, students who begin their digital design by
going directly to an HDL are at risk of viewing their
HDL designs as software instead of thinking about the
gates and hardware their HDL modules imply.
In labs four and five the students begin entering
their designs using an HDL, either Verilog or VHDL.
Lab 4 is a Thunderbird turn signal FSM. By proceeding
from Lab 3, implementing an FSM in schematic,
directly to Lab 4, students can clearly see the parallels
between schematic entry and HDL entry. In Lab 5, a
32-bit ALU design, students also learn how to write an
HDL testbench.
Labs six and seven introduce students to C
programming using the Raspberry Pi, a single-board
computer developed by the Raspberry Pi Foundation.
This board includes the Broadcom BCM2835 system-
on-a-chip (SoC), a processor based on the ARMv6
architecture. In Lab 6, students write three C programs:
one that calculates the Fibonacci sequence, another that
scrolls through lighting up the board’s LEDs, and a
third that is a number guessing game. These programs
also interface with the Raspberry Pi’s I/O (LEDs,
switches, and the console). In Lab 7, the students write
a temperature control program in C and build a custom
temperature control circuit that they interface with the
Raspberry Pi board.
In Lab 8, students practice their ARM assembly
language programming skills by first writing an
assembly program to calculate the Fibonacci sequence,
one of the same programs they wrote in C in Lab 6, and
then writing a second assembly program to compute
floating point addition.
Labs 9-11 bring together the topics of digital design
and computer architecture by guiding students in
designing, building, and testing two simplified ARM
processors in hardware. The students also write ARM
assembly programs in both assembly and machine code
to test their processors. In Lab 9, the students are given
the HDL code for the simplified ARM processor that
we discuss in lecture. That simplified processor
performs the ADD, SUB, AND, ORR, LDR, STR, and B
ARM assembly instructions only [5]. The students add
their 32-bit ALU from Lab 5 to complete the design.
After testing and examining the single-cycle processor
using a provided testbench and ARM assembly
program, they then expand the single-cycle ARM
processor to include two additional instructions, EOR
(exclusive OR) and LDRB (load register byte). They
sketch their modifications by hand on the schematic
from the textbook and then modify the HDL to include
these new instructions. They then also translate an
ARM assembly program into machine code, load it
onto the processor in hardware, and write a testbench
(i.e., modify the provided testbench) to determine
whether the processor worked correctly.
In Labs 10 and 11, the students build on the
knowledge they gained in all of the prior labs by
building a simplified multicycle processor from
scratch. Although the HDL design must be their own,
they may use the building blocks provided in Lab 9
such as register files, memories, and multiplexers.
Throughout the labs the students also practice the
guiding design principles of abstraction, modularity,
hierarchy, and regularity. For example, throughout each
lab, both hardware and software labs, students learn the
importance of abstraction – that is, abstracting away
unnecessary details – and modularity, having clearly
defined interfaces and functions. In fact, as the labs
increase in complexity, these design concepts become
increasingly important. For example, a student using a
multiplexer in Lab 5 must have, at that point, already
gone through the work or completely understanding a
multiplexer at the lower level and then be able to
abstract away the details so that they can focus on its
function. Abstraction, modularity, and regularity are
also explicitly practiced as students build HDL
modules that abstract away underlying details, have
well defined interfaces, and that are then used and re-
used in their design.