# UVVM support GHDL open source simulator

**URL:** <https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46>\
**Category:** General questions\
**Created:** [April 11, 2020, 7:44am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46 "2020-04-11T07:44:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![omberge](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/omberge/32/20_2.png) [@omberge](https://forum.uvvm.org/u/omberge)\
**Post date:** [April 11, 2020, 7:44am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/1 "2020-04-11T07:44:00Z")

</div>

Hello, I see that GHDL is a supported simulator for UVVM, but does anyone have a step-by-step tutorial how to compile and simulate using GHDL?

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [April 14, 2020, 7:20am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/2 "2020-04-14T07:20:11Z")

</div>

Hi,  
Yes, UVVM can run with GHDL, but GHDL has to update their compile scripts to support UVVM from release v2019.09.02. From that release most of the VVCs has a Bitvis VIP Scoreboard dependency, i.e. the Scoreboard VIP has to be compiled prior to other VIP src files - see the compile order in VVC quick references, last page. So you can either run GHDL with an earlier release of UVVM or modify the compile order of the UVVM modules in the compile-uvvm.sh/ps1 file.

There have been a while since I used GHDL, but I think the syntax is something like:

# DUT files

ghdl -a -frelaxed-rules --std=08 --work=_lib_ …/src/_src\_file_  
… and other DUT files…

# UVVM Utility, VVC Framework, VIPs

ghdl -a -frelaxed-rules --std=08 --work=uvvm\_util …/UVVM/uvvm\_util/src/types\_pkg.vhd  
ghdl -a -frelaxed-rules --std=08 --work=uvvm\_util …/UVVM/uvvm\_util/src/adaptations\_pkg.vhd  
… and the other files…

# Compile TB

ghdl -a -frelaxed-rules --std=08 --work=_TB lib_ …/tb/_TB\_file_

# Simulate

ghdl -e -frelaxed-rules --std=08 --work=_TB lib__TB\_entity_  
ghdl -r -frelaxed-rules --std=08 --work=_TB lib__TB\_entity_

Br,  
Marius

---

<div class="post-metadata">

**Author:** ![omberge](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/omberge/32/20_2.png) [@omberge](https://forum.uvvm.org/u/omberge)\
**Post date:** [April 24, 2020, 10:09am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/3 "2020-04-24T10:09:37Z")

</div>

Thanks for your reply, Marius. I’ll try it over the weekend👍

---

<div class="post-metadata">

**Author:** ![aykenar](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@aykenar](https://forum.uvvm.org/u/aykenar)\
**Post date:** [November 15, 2021, 1:28pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/4 "2021-11-15T13:28:30Z")

</div>

Hi,

I want to start using GHDL with UVVM. I have problems on compiling uvvm\_util on Windows. I tried to run compile.sh in git bash for UVVM\_Light-master in scripts folder but couldnt succeed.

I tried using ghdl commands by obeying the orders in compile\_order.txt. In windows console, I run these scripts inside src\_util folder:

ghdl -a -frelaxed-rules --std=08 -Wno-hide -Wno-shared --work=uvvm\_util types\_pkg.vhd  
ghdl -a -frelaxed-rules --std=08 -Wno-hide -Wno-shared --work=uvvm\_util adaptations\_pkg.vhd  
…  
ghdl -a -frelaxed-rules --std=08 -Wno-hide -Wno-shared --work=uvvm\_util uvvm\_util\_context.vhd

Then redirect the consolde to the folder where my testbench code is there. I tried running testbench code, in which there are lines:

library uvvm\_util;  
context uvvm\_util.uvvm\_util\_context;

However GHDL gives error such as:

tb\_half\_adder.vhd:5:9: cannot find resource library “uvvm\_util”  
tb\_half\_adder.vhd:6:19: unit “uvvm\_util\_context” not found in library “uvvm\_util”  
tb\_half\_adder.vhd:11:28: entity ‘tb\_half\_adder’ was not analyzed

so I assume uvvm\_util library compilation is not completed successfully. Maybe I miss a simple point. Any help would be appreciated.

Regards,

Burak

---

<div class="post-metadata">

**Author:** ![aykenar](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@aykenar](https://forum.uvvm.org/u/aykenar)\
**Post date:** [November 15, 2021, 1:39pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/5 "2021-11-15T13:39:35Z")

</div>

I also tried source compile.sh, it gives no error in git bash. I tried running my testbench on git bash but still got the same error “cannot find resource library uvvm\_util”

---

<div class="post-metadata">

**Author:** ![aykenar](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@aykenar](https://forum.uvvm.org/u/aykenar)\
**Post date:** [November 15, 2021, 2:17pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/6 "2021-11-15T14:17:58Z")

</div>

well for some reason i forgot to add std.env to testbench

library STD;  
use std.env.all;

maybe it cause the problem, i will try at home if it is the problem

regards

Burak

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [December 20, 2021, 8:31pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/7 "2021-12-20T20:31:44Z")

</div>

Hi,  
Did you solve the problem?

Br,  
Marius

---

<div class="post-metadata">

**Author:** ![aykenar](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@aykenar](https://forum.uvvm.org/u/aykenar)\
**Post date:** [December 20, 2021, 8:45pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/8 "2021-12-20T20:45:56Z")

</div>

i quit using ghdl and download free version of intel’s modelsim 19.1. i had no problem in modelsim, even posted about how to use UVVM in modelsim in my personal webpage:

[https://www.mehmetburakaykenar.com/a-uvvm-example-uart-transmitter-testbench-simulation-on-modelsim/128/](https://www.mehmetburakaykenar.com/a-uvvm-example-uart-transmitter-testbench-simulation-on-modelsim/128/)

Regards,

Burak

20 Ara 2021 Pzt 23:41 tarihinde Marius via UVVM \<[uvvm@discoursemail.com](mailto:uvvm@discoursemail.com)\> şunu yazdı:

---

<div class="post-metadata">

**Author:** ![Gabriel](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.uvvm.org/u/Gabriel)\
**Post date:** [July 18, 2023, 2:57pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/9 "2023-07-18T14:57:18Z")

</div>

Hi mate.  
I’m new on UVVM, I’ve read the its user guide and getting started document but i’m not able to compile the code below using UVVM. I really appreciate your help, I’m on windows and I’ve already installed GHDL 3.0.

library IEEE;  
use IEEE.std\_logic\_1164.all;  
library uvvm\_util;  
context uvvm\_util.uvvm\_util\_context;  
library uvvm\_vvc\_framework;  
use uvvm\_vvc\_framework.ti\_vvc\_framework\_support\_pkg.all;  
library bitvis\_vip\_sbi;  
context bitvis\_vip\_sbi.vvc\_context;  
entity uvvm\_tb is  
end entity uvvm\_tb;  
architecture func of uvvm\_tb is  
begin  
p\_main : process  
begin  
log(“Starting simulations.”);  
std.env.stop;  
wait;  
end process p\_main;  
end func;

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [August 4, 2023, 8:29am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/10 "2023-08-04T08:29:30Z")

</div>

Hi, I have tested your code using HDLRegression with GHDL simulator without any issues

```auto
py test.py -s ghdl 

====================================================================================================================================================================
  HDLRegression version 0.43.3
  See /doc/hdlregression.pdf for documentation.
====================================================================================================================================================================

Scanning files...
Building test suite structure...
Compiling library: uvvm_util - OK - 
Compiling library: uvvm_vvc_framework - OK - 
Compiling library: bitvis_vip_scoreboard - OK - 
Compiling library: bitvis_vip_sbi - OK - 
Compiling library: test_lib - OK - 

Starting simulations...
Running 1 out of 1 test(s) using 1 thread(s).
Running: test_lib.uvvm_tb.func (test_id: 1)
Result: PASS (0h:0m:0s).

--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Simulation run time: 0h:0m:0s.
SIMULATION SUCCESS: 1 passing test(s).

```

I am running GHDL version

```auto
GHDL 3.0.0 (2.0.0.r1417.g7de967c51) [Dunoon edition]
 Compiled with GNAT Version: Community 2019 (20190517-83)
 mcode code generator

```

Can you share the transcript/error message?

Br,  
Marius

---

<div class="post-metadata">

**Author:** ![nigel](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@nigel](https://forum.uvvm.org/u/nigel)\
**Post date:** [March 20, 2026, 2:47pm UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/11 "2026-03-20T14:47:27Z")

</div>

Hi,

I was curious to see if the latest version of UVVM would work with GHDL on an M4 Macbook. I know, utter madness, but GHDL does actually run well on this machine. Unfortunately it seems UVVM doesn’t, when using the ghdl\_compile\_all\_and\_simulate.sh script in the bitvis\_uart demo the compilation runs fine but elaboration fails with a bunch of messages like

Undefined symbols for architecture arm64:  
“\_bitvis\_vip\_sbi\_\_td\_cmd\_queue\_pkg\_\_ELABORATED”, referenced from:  
\_bitvis\_vip\_sbi\_\_sbi\_vvc\_\_PKG\_ELAB in sbi\_vvc.o  
\_bitvis\_vip\_sbi\_\_sbi\_vvc\_\_ARCH\_\_behave\_\_DECL\_ELAB in sbi\_vvc.o  
“\_bitvis\_vip\_sbi\_\_td\_cmd\_queue\_pkg\_\_ELAB\_BODY”, referenced from:  
\_bitvis\_vip\_sbi\_\_sbi\_vvc\_\_PKG\_ELAB in sbi\_vvc.o  
\_bitvis\_vip\_sbi\_\_sbi\_vvc\_\_ARCH\_\_behave\_\_DECL\_ELAB in sbi\_vvc.o

Calling ghdl –version gives me

GHDL 6.0.0 (6.0.0.r0.ge589c698c) [Dunoon edition]  
Compiled with GNAT Version: 14.2.0  
llvm 22.1.0 code generator

and I am using the UVVM-2026.03.20 version of UVVM.

I’m probably completely insane to expect this to work but maybe there is a simple explanation.

Just as a datapoint the bitvis\_irqc example works fine

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [June 22, 2026, 10:15am UTC](https://forum.uvvm.org/t/uvvm-support-ghdl-open-source-simulator/46/12 "2026-06-22T10:15:15Z")

</div>

Hi,

Thanks for the feedback. We will have to investigate.

Have you tried to compile UVVM with HDLRegression ( [GitHub - HDLUtils/hdlregression: HDLRegression: Simple, efficient, Python3-based FPGA regression test runner. Streamline the verification workflow. · GitHub](https://github.com/HDLUtils/hdlregression) ) ?

Br,

Marius
