A collection of VHDL digital design building blocks implemented as part of a learning project in digital systems and hardware description. This repository includes 12 exercises covering a wide range of digital design concepts: from basic combinational logic to sequential circuits, filters, and the integration of IP cores.
This project re-structures coursework exercises into a professional-grade repository. Each exercise is modular and self-contained, with a source file under src/ and a corresponding testbench under tb/.
- Direct signal assignment — simple combinational assignment.
- Half Adder (if-then-else) — single-bit sum and carry.
- Combinational logic with internal variable —
(A or B) and C. - 2-to-4 Decoder (case) — one-hot output logic.
- 1-to-4 Demultiplexer — signal routing with
when ... else. - 9-bit Counter with reset — sequential process.
- 9-bit Counter + Comparator — modular design with two entities.
- Integration of Counter + Comparator — hierarchical VHDL design.
- 8-bit Serializer FSM — finite state machine for serial transmission.
- 128×16 Shift Register — storage and data delay.
- 4-tap FIR Filter — digital filtering with fixed coefficients.
- DDS/NCO (Vivado IP) — sine/cosine generator using Xilinx DDS Compiler.
- Vivado Design Suite: development, synthesis, and IP integration.
- GHDL: open-source simulator for compiling and running testbenches.
- GTKWave: waveform viewer for
.vcdoutputs. - MATLAB: used in some exercises for data visualization (e.g., DDS outputs).
vhdl-dsp-building-blocks/
├─ src/ # Source code for each exercise
│ ├─ ex01_signal_assignment/
│ ├─ ex02_half_adder/
│ ├─ ex03_comb_logic/
│ ├─ ex04_decoder_2to4/
│ ├─ ex05_demux_1to4/
│ ├─ ex06_counter_9bit/
│ ├─ ex07_counter_comparator/
│ ├─ ex08_counter_integration/
│ ├─ ex09_serializer_fsm/
│ ├─ ex10_shift_register/
│ ├─ ex11_fir_filter/
│ └─ ex12_dds_nco/ # IP-based, documented only
├─ tb/ # Testbenches (VHDL)
├─ docs/ # Documentation (PDFs, diagrams)
├─ sim/ # Simulation outputs (VCD, logs)
└─ README.md
Example (Windows PowerShell, using GHDL):
# Exercise 2: Half Adder
ghdl -a src\ex02_half_adder\ex02_half_adder.vhd tb\tb_ex02_half_adder.vhd
ghdl -e tb_ex02_half_adder
ghdl -r tb_ex02_half_adder --vcd=sim\ex02.vcd
# View the waveform
gtkwave sim\ex02.vcddocs/exercices_report.pdf— original report describing all 12 exercises.src/ex12_dds_nco/README.md— notes about the Vivado DDS Compiler IP.
Working on these exercises provided practical experience with:
- Fundamental VHDL constructs (entities, architectures, processes, signals).
- Combinational and sequential logic design.
- Finite State Machines (FSMs) for control logic.
- Hierarchical design with modular entities and component instantiation.
- Building counters, decoders, multiplexers/demux, serializers.
- Implementing and testing a FIR filter.
- Integrating IP cores (DDS Compiler) in Vivado and combining them with handwritten VHDL.
- Documenting and refactoring coursework into a professional open-source repository.
MIT License — see LICENSE.
This repository collects a series of VHDL exercises from the course Software Radio 2024–2025, restructured for clarity, modularity, and public sharing. It demonstrates a progression from simple logic gates to more complex DSP building blocks and integration of IP cores.