---
# System prepended metadata

title: Simulation Environment for SoC Laboratory
tags: [SoC Laboratory, Lab]

---

# Simulation Environment on MacOS for SoC Laboratory

## System Information
* MacBook Air M3
* macOS Tahoe 26.1

## Prerequisite
* Homebrew (upgrade to the latest version)
```
$ brew upgrade
```

## Icarus Verilog
```
$ brew install icarus-verilog
```

## GTKWave
```
$ brew install --HEAD randomplum/gtkwave/gtkwave
```
To open GTKWave
```
$ gtkwave
```

## RISC-V Tool Chain
Clang version:
```
$ brew tap riscv-software-src/riscv
$ brew install riscv-tools
```
Verify installation
```
$ brew test riscv-tools
```
It will show the riscv compiler path: `/opt/homebrew/opt/riscv-gnu-toolchain/bin/riscv64-unknown-elf-gcc` (for reference)

## Reference
1. [iverilog](https://blog.csdn.net/qq_62561876/article/details/133901907)
2. [gtkwave](https://blog.csdn.net/q753698/article/details/136459965)
3. [riscv-tool-chain](https://github.com/riscv-software-src/homebrew-riscv)
