If you are taking an FPGA or Digital Logic course, you will inevitably be asked to build an ALU (Arithmetic Logic Unit). It is the classic rite of passage for electrical engineering students.
In our 1-on-1 tutoring sessions, we've helped students debug everything from 8-bit signed adders to VGA display controllers. Here are the most common reasons your VHDL code isn't compiling or working on the board.
1. Combinational vs. Sequential Logic
The biggest mistake beginners make is mixing combinational logic (like adders and multiplexers) with sequential logic (like flip-flops) in the same process block. Use process(all) for combinational circuits and process(clk) for sequential circuits. Never try to do both in one block.
2. The Sensitivity List
If your simulation runs but the output never changes, your sensitivity list is probably wrong.
-- Wrong (Synthesis might fail or simulate incorrectly) process(a, b) begin y <= a and b; end process; -- Correct (VHDL-2008) process(all) begin y <= a and b; end process;
3. Missing Testbenches
Professors love testbenches because they prove you actually simulated your design. A testbench is a separate VHDL file that generates input signals (stimulus) and checks if the output matches what you expect.
If your assignment says "verify in ModelSim," it means you must write a testbench. You cannot just compile the main file.
4. Board Pin Assignments
Your code works perfectly in ModelSim, but when you load it onto the DE1-SoC or Basys 3 board, nothing happens. This is almost always because you forgot to assign the pins in Quartus/Vivado. You have to map your VHDL inputs and outputs to the physical switches and LEDs on the board.
Still Stuck on Your FPGA Assignment?
VHDL is unforgiving. One missing semicolon or a tiny typo can break the entire synthesis. If you have spent hours staring at ModelSim waveforms and still can't find the bug, you don't have to do it alone.
We offer live 1-on-1 debugging sessions. You share your screen, we look at your code together, and we teach you how to fix the error. We've tutored students through ALUs, RISC-V processors, and VGA controllers.
💬 Get FPGA Tutoring on WhatsApp