A comprehensive, modular learning path for mastering RTL (Register Transfer Level) design using Verilog and SystemVerilog with progressive complexity levels. This project provides a complete educational resource with examples, testbenches, and documentation covering all aspects of digital circuit design from fundamentals to advanced techniques.
- Overview
- Features
- Prerequisites
- Quick Start
- Project Structure
- Documentation
- Modules
- Installation
- Usage
- Contributing
- License
- Acknowledgments
This project is a complete educational resource for learning RTL design using Verilog and SystemVerilog. It provides:
- 10 Progressive Modules: From installation and digital logic fundamentals to advanced design techniques
- Comprehensive Examples: Working code examples with detailed explanations
- Complete Testbenches: Both iverilog and Verilator testbenches for each module
- Automated Scripts: Installation and orchestration scripts for easy setup
- Full Documentation: Detailed guides covering all concepts and usage
- CORE Repository Integration: References to professional RTL designs for comparison and learning
- Dual Simulator Support: Examples work with both iverilog and Verilator
- Industry Standard: RTL design is the foundation of digital circuit design
- IEEE Standards: Based on IEEE 1364-2005 (Verilog) and IEEE 1800-2017 (SystemVerilog)
- Career Relevance: Essential skill for digital design engineers
- Open Source Tools: Works with free, open-source simulators (iverilog, Verilator)
- Practical Application: Directly applicable to FPGA and ASIC design
This course bridges theory and practice:
- Theory: Digital logic fundamentals, Boolean algebra, circuit concepts
- Practice: Hands-on Verilog/SystemVerilog coding with real examples
- Reference: Comparison with professional designs from the CORE repository
- Progressive: Builds from simple gates to complex system integration
- β Complete RTL Coverage: From digital logic fundamentals to system integration
- β Progressive Learning: 10 modules from beginner to advanced
- β Practical Examples: Real-world RTL design scenarios
- β Automated Setup: One-command installation scripts
- β Dual Simulator Support: Examples for both iverilog and Verilator
- β CORE Repository Integration: References to professional designs
- β Comprehensive Documentation: Detailed guides for every concept
- β Production Quality: Best practices and industry patterns
- β Exercises: Hands-on practice for each module
- β Waveform Analysis: GTKWave integration for debugging
- Basic Computer Science: Understanding of programming concepts
- No Prior Digital Logic Required: Course starts from fundamentals
- Basic Math: Understanding of binary numbers (covered in Module 1)
- Operating System: Linux, macOS, or Windows (WSL2 recommended)
- Simulators: Icarus Verilog (iverilog) and/or Verilator
- Waveform Viewer: GTKWave (optional but recommended)
- Memory: Minimum 4GB RAM (8GB+ recommended)
- Disk Space: ~2GB for tools and dependencies
- Build Tools: C++ compiler (GCC, Clang) for Verilator, Make
git clone <repository-url>
cd learn_digital_verilog# Make scripts executable (Linux/Mac/WSL)
chmod +x scripts/*.sh
# Install all tools with default settings
./scripts/module0.sh# Run Module 0 examples
./scripts/module0.sh
# Or run specific examples
./scripts/module0.sh --iverilog-basics
./scripts/module0.sh --verilator-basicsBegin with Module 0: Installation and Setup and follow the modules sequentially. See SYLLABUS1.md for the complete course structure.
learn_digital_verilog/
βββ docs/ # Comprehensive documentation
β βββ SYLLABUS1.md # Complete course syllabus
β βββ MODULE0.md # Installation and setup guide
β βββ MODULE1.md # Digital logic fundamentals
β βββ MODULE2.md # Verilog/SystemVerilog fundamentals
β βββ MODULE3.md # Combinational logic design
β βββ MODULE4.md # Sequential logic and registers
β βββ MODULE5.md # State machines and control logic
β βββ MODULE6.md # Arithmetic circuits and data paths
β βββ MODULE7.md # Memory and storage elements
β βββ MODULE8.md # Advanced design techniques
β βββ MODULE9.md # Design integration and best practices
β
βββ module0/ # Installation and setup
β βββ examples/ # Basic examples (iverilog, Verilator)
β βββ dut/ # Design Under Test (simple gates, counters)
β βββ tests/ # Testbenches
βββ module1/ # Digital logic fundamentals
β βββ examples/ # Number systems, Boolean algebra examples
β βββ dut/ # Basic gates, combinational circuits
β βββ tests/ # Testbenches
βββ module2/ # Verilog/SystemVerilog fundamentals
βββ module3/ # Combinational logic design
βββ module4/ # Sequential logic and registers
βββ module5/ # State machines and control logic
βββ module6/ # Arithmetic circuits and data paths
βββ module7/ # Memory and storage elements
βββ module8/ # Advanced design techniques
βββ module9/ # Design integration and best practices
β
βββ scripts/ # Automation scripts
β βββ module0.sh # Install all tools
β βββ module1.sh # Run Module 1 examples
β βββ ... # Module orchestrators
β βββ install_*.sh # Individual tool installers
β βββ uninstall_*.sh # Tool uninstallers
β
βββ README.md # This file
The docs/ directory contains comprehensive documentation for the entire learning path:
- SYLLABUS1.md: Complete course syllabus with learning path, duration, and topics for all modules
Each module has a dedicated guide with examples, exercises, and detailed explanations:
-
MODULE0.md: Installation and Setup
- System requirements, tool installation, environment setup
- Automated installation scripts usage
- First examples with iverilog and Verilator
- CORE repository reference
-
MODULE1.md: Digital Logic Fundamentals
- Number systems (binary, hex, decimal)
- Boolean algebra and logic gates
- Truth tables and logic analysis
- Combinational vs. sequential logic concepts
- Mapping logic concepts to Verilog
-
MODULE2.md: Verilog/SystemVerilog Fundamentals
- Language basics and syntax
- Data types and operators
- Module structure and instantiation
- Continuous assignments
-
MODULE3.md: Combinational Logic Design
- Design styles (continuous assignment, always_comb, case statements)
- Common combinational circuits (MUX, decoder, encoder, comparator)
- Arithmetic combinational circuits (adders, multipliers)
- Parameterized designs and generate blocks
-
MODULE4.md: Sequential Logic and Registers
- Flip-flops and latches
- Procedural blocks (always_ff, always_comb)
- Register design and counters
- Clock domain management
- Reset strategies
-
MODULE5.md: State Machines and Control Logic
- FSM fundamentals (Mealy vs. Moore)
- FSM implementation styles
- Complex state machines
- Control logic design
-
MODULE6.md: Arithmetic Circuits and Data Paths
- Adder architectures (ripple carry, carry lookahead)
- Multipliers (array, Booth, Wallace tree)
- ALU design
- Data path implementation
-
MODULE7.md: Memory and Storage Elements
- ROM and RAM design
- FIFO implementation
- Cache memory basics
- Memory controllers
-
MODULE8.md: Advanced Design Techniques
- SystemVerilog interfaces and modports
- Packages and namespaces
- Advanced generate constructs
- Design patterns
-
MODULE9.md: Design Integration and Best Practices
- Design hierarchy and integration
- Coding standards and style
- Synthesis considerations
- Performance optimization
Set up your RTL design environment with all required tools:
- Icarus Verilog (iverilog) installation
- Verilator installation
- GTKWave for waveform viewing
- First "Hello World" examples
- CORE repository reference
Quick Start: ./scripts/module0.sh
Learn the essential foundation in digital logic:
- Number systems (binary, hex, decimal)
- Boolean algebra and logic gates
- Truth tables and logic analysis
- Combinational vs. sequential logic
- Mapping logic concepts to Verilog
Quick Start: ./scripts/module1.sh
Master the fundamental syntax and constructs:
- Language basics and module structure
- Data types and operators
- Continuous assignments
- Module instantiation
Quick Start: ./scripts/module2.sh
Master combinational circuit design:
- Design styles (continuous assignment, always_comb, case)
- Common circuits (MUX, decoder, encoder, comparator)
- Arithmetic circuits (adders, multipliers)
- Parameterized designs
Quick Start: ./scripts/module3.sh
Master sequential circuit design:
- Flip-flops and registers
- Procedural blocks
- Counters and shift registers
- Clock and reset strategies
Quick Start: ./scripts/module4.sh
Master finite state machine design:
- FSM fundamentals (Mealy vs. Moore)
- Implementation styles
- Complex state machines
- Control logic design
Quick Start: ./scripts/module5.sh
Master arithmetic circuit design:
- Adder architectures
- Multipliers
- ALU design
- Data path implementation
Quick Start: ./scripts/module6.sh
Master memory design:
- ROM and RAM design
- FIFO implementation
- Cache memory basics
- Memory controllers
Quick Start: ./scripts/module7.sh
Master advanced RTL design techniques:
- SystemVerilog interfaces and modports
- Packages and namespaces
- Advanced generate constructs
- Design patterns
Quick Start: ./scripts/module8.sh
Master design integration and best practices:
- Design hierarchy and integration
- Coding standards and style
- Synthesis considerations
- Performance optimization
- Design reuse
Quick Start: ./scripts/module9.sh
# Install all tools
./scripts/module0.sh
# Or install individual tools
./scripts/install_iverilog.sh
./scripts/install_verilator.sh
./scripts/install_gtkwave.sh# Icarus Verilog
./scripts/install_iverilog.sh
# Verilator
./scripts/install_verilator.sh --source
# Or install specific version
./scripts/install_verilator.sh --version 5.044 --source
# Or install locally (no sudo required)
./scripts/install_verilator.sh --source --local
# GTKWave
./scripts/install_gtkwave.shSee MODULE0.md for detailed manual installation instructions.
Each module has an orchestrator script to run examples and tests:
# Run all examples for a module
./scripts/module0.sh
./scripts/module1.sh
# ... etc
# Run specific examples
./scripts/module0.sh --iverilog-basics
./scripts/module0.sh --verilator-basics
./scripts/module1.sh --number-systems# iverilog example
cd module0/examples/iverilog_basics
make hello_world
# Verilator example
cd module0/examples/verilator_basics
make hello_world
# View waveforms
cd module0/examples/iverilog_basics
make gtkwave_example
gtkwave gtkwave_example.vcdThis project supports both simulators:
- Icarus Verilog (iverilog): Great for learning, simple testbenches, waveform generation
- Verilator: Fast simulation, C++ testbenches, production-quality verification
Examples are provided for both, allowing you to choose based on your needs.
Contributions are welcome! This project follows best practices for educational resources:
- Code Quality: All code follows Verilog/SystemVerilog best practices with comprehensive comments
- Documentation: Comprehensive docstrings and comments
- Testing: Examples are tested and verified
- Consistency: Follow existing patterns and structure
- Follow the existing code style and structure
- Add comprehensive comments to all code
- Update relevant documentation
- Test your changes thoroughly
- Follow the module structure for new examples
- Reference CORE repository for professional patterns
This work is licensed under a Creative Commons Attribution 4.0 International License.
-
β You are free to:
- Share β copy and redistribute the material in any medium or format
- Adapt β remix, transform, and build upon the material for any purpose, even commercially
-
π Under the following terms:
- Attribution β You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
When using this material, please include:
Based on "Learn Digital Verilog: RTL Design with Verilog and SystemVerilog" by Yongfu Li
Licensed under CC BY 4.0
https://creativecommons.org/licenses/by/4.0/
This project is built on the excellent work of:
-
CORE Repository: Corpus Of RTL designs for EDA Research
- Repository: https://github.com/universal-verification-methodology/core
- 137 verified Verilog modules across 24 categories
- Professional RTL design patterns and testbenches
- Used as reference for best practices throughout this course
-
Verilator: Fast Verilog/SystemVerilog simulator
- Website: https://www.veripool.org/verilator/
- GitHub: https://github.com/verilator/verilator
- Open-source, high-performance simulation
-
Icarus Verilog: Open-source Verilog simulator
- Website: http://iverilog.wikia.com/
- Simple, educational-friendly simulator
-
GTKWave: Waveform viewer
- Website: http://gtkwave.sourceforge.net/
- Essential tool for debugging and analysis
-
SystemVerilog: IEEE 1800-2017 Standard
- Standard: IEEE 1800-2017
- Language Reference Manual
-
Verilog: IEEE 1364-2005 Standard
- Standard: IEEE 1364-2005
- Hardware Description Language
- "Digital Design and Computer Architecture" by Harris & Harris
- "Verilog HDL" by Samir Palnitkar
- "SystemVerilog for Design" by Sutherland, Davidmann, and Flake
- IEEE Design & Test publications
For questions, issues, or contributions:
- Check the documentation first
- Review the SYLLABUS1.md for course structure
- Check individual module documentation for specific topics
- Reference CORE repository for professional examples
- Open an issue for bugs or feature requests
- 10 Modules: Complete learning path from fundamentals to advanced
- 50+ Examples: Working code examples with detailed explanations
- 20+ Testbenches: Both iverilog and Verilator testbenches
- 15+ Scripts: Automation and orchestration
- 10+ Documentation Files: Comprehensive guides
- CORE Integration: References to 137 professional RTL designs
Happy Learning! π
Start your RTL design journey today with Module 0: Installation and Setup
