This repository contains VHDL source code and projects from my school's Digital Systems Laboratory coursework. The labs focus on digital logic design concepts and FPGA implementation using like Xilinx Vivao.
VHDL_Labs/
├── Lab1/
│ ├── lab1.vhd # Boolean logic implementation (SOP/POS forms)
│ └── XDC.xdc # Nexys4 DDR pin constraints
├── Lab2/
│ ├── lab2.vhd # Logic gates using NAND/NOR, MUX, and decoder
│ └── XDC.xdc # Nexys4 DDR pin constraints
└── README.md # This file
File: Lab1/lab1.vhd
Implements Boolean function representations:
- Inputs: x, y, z (3-bit logic inputs)
- Outputs:
CSOP: Canonical Sum of Products formCPOS: Canonical Product of Sums formRSOP: Reduced Sum of Products formRPOS: Reduced Product of Sums form
Target: Nexys4 DDR board (switches SW[0-2] → inputs z,y,x; LEDs for outputs)
File: Lab2/lab2.vhd
Demonstrates different logic implementation approaches:
- Inputs: x, y, z (3-bit logic inputs)
- Outputs:
f_nand: Function using only NAND gatesf_nor: Function using only NOR gatesf_mux: Function using multiplexerf_dec: Function using decoder
VS Code (recommended for editing only):
- Install VHDL Language Support extension for syntax highlighting
- Install Tcl extension for
.xdcconstraint file highlighting - VS Code provides excellent text editing but VHDL simulation and synthesis require professional tools
Required Professional Tools:
- Xilinx Vivado - Primary tool for FPGA synthesis, implementation, and programming
- ModelSim - Industry-standard VHDL/Verilog simulator for behavioral verification
- Quartus Prime (Intel/Altera alternative)
Note: VHDL code must be simulated and synthesized using professional EDA tools. VS Code serves only as a text editor.
- Boards:
- Nexys4 DDR (Artix-7 FPGA)
- NEXYS A7 100T by Digilent (Artix-7 FPGA)
- Tools: Xilinx Vivado, ModelSim
Both labs use the same input mapping (defined in XDC.xdc):
z← SW[0] (switch 0)y← SW[1] (switch 1)x← SW[2] (switch 2)
Output pins vary by lab - see individual .xdc files for LED assignments.
- Create new project in Vivado
- Add the
.vhdfile as design source - Add the
.xdcfile as constraints - Run synthesis and implementation
- Generate bitstream and program the FPGA
.vhd: VHDL source files (hardware description).xdc: Xilinx Design Constraints (pin assignments, timing, I/O standards)
- Code Editing: Use VS Code with VHDL extensions for syntax-highlighted editing
- Simulation: Import VHDL files into ModelSim or Vivado for behavioral simulation
- FPGA Implementation: Use Xilinx Vivado for synthesis, implementation, and programming
- Hardware Testing: Deploy to Nexys4 DDR or NEXYS A7 100T development boards
- Constraint files are compatible with both Nexys4 DDR and NEXYS A7 100T boards
- Both labs demonstrate different implementation approaches for Boolean functions
- Always simulate thoroughly in ModelSim/Vivado before hardware deployment
- This repository represents coursework from Digital Systems Laboratory class