Authors: Nathan A. & Devin Nowowiejski
Date: October 2025
This project implements a single-cycle ARM processor with memory-mapped I/O capabilities on the Intel DE10-Lite FPGA board. The design includes a complete datapath, control unit, memory subsystem, and interactive debugging/display interface.
- Single-Cycle ARM Processor: Implements a subset of ARMv4 instructions
- Memory-Mapped I/O: Two configurable I/O ports (Port 0 and Port 1) with data and control registers
- Interactive Debugging: PeekTop display system for real-time processor state visualization
- Debounced Step Clock: Manual clock stepping for instruction-by-instruction execution
- Seven-Segment Display: Hexadecimal display output for debugging and I/O visualization
- Intel DE10-Lite FPGA Development Board (MAX 10)
- Quartus Prime software for synthesis and programming
- SLP.sv: Top-level integration module connecting all components
- Instantiates CPU, memories, debouncer, and PeekTop display
- Maps FPGA inputs (keys, switches, clock) to outputs (seven-segment displays)
-
arm.sv: ARM processor coordinator
- Coordinates instruction decoding, execution, and memory access
- Integrates control unit and datapath
-
datapath.sv: Processor datapath
- Implements register file, ALU, multiplexers, and data flow paths
- Provides debug signals for state visualization
-
ControlUnit.sv: Instruction decoder and control signal generator
- Decodes instruction opcodes and condition codes
- Generates control signals for datapath components
-
ALU.sv: Arithmetic Logic Unit
- Performs arithmetic and logical operations
- Updates condition flags (N, Z, C, V)
-
imem.sv: Instruction memory (ROM)
- Reads 32-bit instructions from
memfile.dat - Word-aligned access (256 instructions capacity)
- Reads 32-bit instructions from
-
MemoryWithIO.sv: Data memory with memory-mapped I/O
- 1024-word RAM for data storage
- Two configurable I/O ports with data and control registers
- Memory-mapped addresses for I/O operations
-
Register_File.sv: 16-register file (R0-R15)
- Dual read ports, single write port
- Includes program counter (R15) support
-
PCPlus4.sv: Program counter incrementer
-
Extlmm.sv: Immediate value extender
-
flopr.sv: Flip-flop with reset
-
mux_n.sv: Parameterized n-bit multiplexer
-
PeekTop.sv: Interactive debugging interface
- Display modes: PC, Instruction, Register contents, ALU signals, Memory I/O
- Input mode: Manually override I/O port inputs using switches
- Step-through execution with visual feedback
-
debouncer.sv: Key debouncing module
- Provides clean clock/button signals from mechanical switches
-
SevenSegHex.sv: Seven-segment display decoder
- Converts 4-bit hex values to seven-segment patterns
- 0x00000000 - 0x00000FFF: RAM (1024 words)
- 0x00001000: Port 0 Data Register
- 0x00001004: Port 0 Control Register (bit 0: 1=output, 0=input)
- 0x00001008: Port 1 Data Register
- 0x0000100C: Port 1 Control Register (bit 0: 1=output, 0=input)
- KEY0: Step clock (debounced, active-low)
- KEY1: Peek button (display current PC when pressed)
- SW[9:0]: Slide switches for mode selection and data input
- SW9: Display mode selection (see PeekTop modes)
- SW8: Input mode override
- SW[7:0]: Data input for I/O override / display selection
- HEX5-HEX0: Six seven-segment displays showing hexadecimal values
- Open
SLP.qpfin Quartus Prime - Compile the design (Processing → Start Compilation)
- Program the FPGA (Tools → Programmer)
- Create or modify
memfile.datwith ARM machine code (hexadecimal format) - Recompile the design to update instruction memory
- Program the FPGA
- Step Clock (KEY0): Press to execute one instruction
- Peek Button (KEY1): Hold to display current PC value
- Mode Selection (SW9): Choose display mode
- I/O Override (SW8): Set to 1 for manual I/O input mode
The system supports multiple visualization modes for debugging:
- Program Counter (PC)
- Current Instruction
- Register file contents (selected via switches)
- ALU operands and results
- Memory I/O port registers
- Output port values
Based on the single-cycle processor architecture from Digital Design and Computer Architecture by Harris & Harris (Chapter 7).
- Single-cycle execution: Each instruction completes in one clock cycle
- Manual stepping: Debounced button press drives clock for educational purposes
- Memory-mapped I/O: Unified address space for memory and I/O operations
- Peek interface: Non-intrusive debugging without modifying processor state
The project includes:
- expected_peek_with_io.csv: Expected output values for verification
- Test programs in
memfile.datformat
- SLP.sv (Top-level)
- arm.sv, datapath.sv, ControlUnit.sv
- ALU.sv, Register_File.sv
- imem.sv, MemoryWithIO.sv
- PeekTop.sv, debouncer.sv, SevenSegHex.sv
- SLP.qpf, SLP.qsf (Project configuration)
- SLP.sdc (Timing constraints)
db/- Database filesincremental_db/- Incremental compilation dataoutput_files/- Programming files and reports
Backup files (*.bak) are preserved for reference but not used in compilation.
- Harris, S. L., & Harris, D. M. Digital Design and Computer Architecture: ARM Edition
- HDL Example 7.1 (Single Cycle Processor, page 411)
- HDL Example 7.15 (Instruction Memory, page 427)
Educational project for Computer Organization coursework.