FPGA Lab 08: Stack Calculator


  • To implement a FILO stack
  • To get more familiar with block RAMs on an FPGA and understand memory interfacing
  • To understand how to model buses in Verilog

Background Information

In this lab, you will write Verilog code to implement a stack calculator using a memory module (block RAM on the FPGA) and the board I/O.

A stack calculator stores its operands in a stack structure and performs operations (e.g. addition, subtraction, etc) on the top two values of the stack. The operands are popped off the stack and the result is pushed back on the top of the stack, so the stack has one less element than before the operation.

You may need to add some wire, regs, or any other logic gates as needed.