Intel® FPGA Academic Program Teaching Materials
Digital Logic
Summary
Gain an understanding of the design of digital logic circuits using Intel® FPGA devices. Topics covered include:
- Describing hardware using Verilog or VHDL
- Designing circuits to perform arithmetic calculations
- Building complex designs from multiple functions and Intel® FPGA IP
By the end of this course, students will have practical knowledge of:
- Combinational and sequential logic
- Key logic elements such as storage, clocks, and memory
- How to implement finite state machines in circuitry
- How to write, compile, synthesize, and download hardware designs for FPGAs
Professors: To request solutions, source material, software licenses, and teaching hardware, enroll in the Intel® FPGA Academic Program.
Instructor Notes
- Prerequisite topics can be taught in the lecture sessions leading up to each lab session.
- Any Terasic DE-Series FPGA development kit can be used with these exercises.
Prerequisites
- Fundamentals of electronics
- Boolean logic
- Any programming language
Recommended Tools & Tutorials
- Intel® Quartus® Prime Design Software (Lite edition)
- ModelSim*-Intel FPGA Edition Software (Starter edition)
- Hardware design tutorials
- Timing, simulation, and debugging tutorials
This .zip file contains all the Verilog and VHDL files for all the labs listed.
Lab 1: Switches, Lights, and Multiplexers
Get an introduction to circuit design using a hardware description language.
- Set up and configure a project.
- Connect simple input and output devices.
- Learn about select circuits and how to build different size multiplexers.
- Apply skills to write words to seven-segment displays.
- Implement and test circuits on an FPGA device.
Lab 2: Numbers and Displays
Build on the previous exercises by learning about simple encoding, arithmetic, and combinational logic.
- Convert binary inputs to decimal outputs.
- Add two 4-bit numbers using a full adder.
- Learn how if-else statements can be used to simplify the description of your hardware design.
Lab 3: Latches, Flip-Flops, and Registers
This exercise introduces storage elements and sequential logical.
- Use logic gates, Boolean expressions, or behavioral-style code to implement the same designs.
- Build and simulate gated RS latch, gated D latch, and D flip-flop circuits.
- Analyze how the compiler maps your designs to the FPGA hardware.
Lab 6: Adders, Subtractors, and Multipliers
Examine arithmetic circuits that perform calculations.
- Implement an accumulator circuit with carry-out and overflow signals.
- Modify the accumulator to also add and subtract numbers.
- Compare multiplier architectures using a sequence of additions versus an adder tree.
Lab 7: Finite State Machines
Get an introduction to finite state machines (FSMs) and their design in digital logic.
- Manually derive the logic expressions needed for each state flip-flop in an FSM.
- Use a case statement to describe the state table for the same FSM.
- Implement a morse-code encoder using an FSM.
Lab 8: Memory Blocks
Practice using memory resources that exist within the FPGA device.
- Use IP libraries to instantiate 1-port and 2-port RAM.
- Learn different methods to define memory in a hardware description language.
- Develop a memory initialization file (MIF) to test your designs.
- Use switches and hex displays to demonstrate read and write functionality.
Lab 9: A Simple Processor
Use concepts from earlier labs to implement a simple processor.
- Build a simple processor using registers, a multiplexer, an adder and subtractor unit, and a control unit.
- Study how instructions are encoded and used to control the processor.
- Add a memory module and counter to your processor.
Lab 10: An Enhanced Processor
Implement an enhanced processor using the skills learned from Lab 9.
- Add functionality so that your processor can perform read and write operations using memory or other devices.
- Create an output module for your processor to drive seven-segment displays.
- Connect an input module for your processor to read and store the state of switches on the board.
Lab 11: Implement Algorithms in Hardware
Use algorithmic state machine (ASM) charts to implement algorithms as hardware circuits.
- Build a bit-counting circuit consisting of finite state machine (FSM) and datapath circuits.
- Create an ASM chart for a binary search algorithm.
- Implement the FSM and datapath for the binary search algorithm in hardware.
Lab 12: Basic Digital Signal Processing
Learn the basics of signal processing in hardware using an audio codec.
- Connect an audio input (microphone) and output (speakers or headphones) to your FPGA development kit.
- Modify a provided starter kit circuit design to pass audio from the input to output.
- Implement an averaging finite impulse response (FIR) filter to remove noise from the input audio.
- Experiment with the filter parameters to further remove background noise.