UVVM support GHDL open source simulator

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?

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

Thanks for your reply, Marius. Iā€™ll try it over the weekendšŸ‘

1 Like

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

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ā€

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

Hi,
Did you solve the problem?

Br,
Marius

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/

Regards,

Burak

20 Ara 2021 Pzt 23:41 tarihinde Marius via UVVM <uvvm@discoursemail.com> şunu yazdı:

1 Like

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;

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

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

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