Introduction: Why Assertions and Non-Intrusive Verification?

SystemVerilog Assertions (SVA) are not just another test language; they are a declarative, temporal powerhouse. Instead of writing hundreds of lines of procedural code to check a protocol’s timing, you define the rule once. This significantly reduces verification effort.

In professional flows, it’s crucial to keep verification separate from design. I want to check the golden RTL without modifying it. This post is the first step: setting up the environment using the open-source workhorse Verilator on MacOS system.

🛠️ Part 1: Prerequisites – The Toolchain

I need the right tools to compile the SystemVerilog into a simulation model.

Xcode Command Line Tools
These are essential for the native C/C++ compiler suite (clang or gcc) that Verilator will rely on to build the final simulator executable.

Action: Open your Terminal and run:

xcode-select --install

Note: If you get a message saying the tools are already installed, you’re good to go!

Homebrew (The macOS Package Manager)
Homebrew makes installing open-source tools like Verilator incredibly simple.

Action: If you don’t have it, install Homebrew by following the instructions on its official site, typically by running:

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)

🚀 Part 2: Installing Verilator – The SVA Compiler

Verilator is a unique tool. It doesn’t just simulate; it compiles your SystemVerilog RTL and SVA code into a high-performance C++ model. This is the key that unlocks integration with C++ and, subsequently, Python/Cocotb.

Install Verilator
Use Homebrew to fetch and install the latest stable version.

Action: Run the following in your Terminal:

brew install verilator

Verification: Check your installation to ensure Verilator is recognized globally.

Action: Run:

verilator --version

Expected Output: You should see the version number (e.g., Verilator 5.042 2025-11-02 rev…).

In the following posts, I will share my SVA learning journey.