# Library utils with "context" in Modelsim with UVVM-Master

**URL:** <https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397>\
**Category:** Utility Library\
**Tags:** uvvm\
**Created:** [October 3, 2023, 10:11am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397 "2023-10-03T10:11:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose9ortiz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/jose9ortiz/32/123_2.png) [@jose9ortiz](https://forum.uvvm.org/u/jose9ortiz)\
**Post date:** [October 3, 2023, 10:11am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397/1 "2023-10-03T10:11:21Z")

</div>

Hello!

I am having problems using UVVM-master in Modelsim, I have a project that I know it works in vivado and I wanted to try simulating it with UVVM-Master in Modelsim.

the version of Modelsim DE-64 is 10.7 and the UVVM-master is the last one.

The issue is that when using the UVVM-Utils libraries we have to use the “context” type variable and modelsim shows me a “syntax error” near context. I attach evidence.

 ![Context Error](https://europe1.discourse-cdn.com/flex017/uploads/uvvm/original/1X/d863d8c313ec2c7961eac0a8d64662d3e1c8fed1.png)

Libraries used:  
–TYPICAL LIBRARIES  
library IEEE;  
use IEEE.Std\_logic\_1164.all;  
use IEEE.Numeric\_Std.all;  
use IEEE.math\_real.all;

– UVVM UTIL LIBRARIES  
library uvvm\_util;  
context uvvm\_util.uvvm\_util\_context; – Here is the error (near context)

– UVVM VVC FRAMEWORK LIBRARIES  
library uvvm\_vvc\_framework;  
use uvvm\_vvc\_framework.ti\_vvc\_framework\_support\_pkg.all;

– AXISTREAM LIBRARIES  
library bitvis\_vip\_axistream;  
use bitvis\_vip\_axistream.axistream\_bfm\_pkg.all;

– FILE READING/WRITING LIBRARIES  
library STD;  
use std.env.all;  
use std.textio.all;  
use ieee.std\_logic\_textio.all;  
use std.env.finish;

This project uses the following versions:  
uvvm\_util, version v2.19.2  
uvvm\_vvc\_framework, version v2.12.4  
bitvis\_irqc, version v1.0.12  
bitvis\_uart, version v1.1.6  
bitvis\_vip\_avalon\_mm, version v2.8.4  
bitvis\_vip\_avalon\_st, version v1.2.4  
bitvis\_vip\_axilite, version v2.9.3  
bitvis\_vip\_axistream, version v4.7.7  
bitvis\_vip\_clock\_generator, version v1.5.2  
bitvis\_vip\_error\_injection, version v1.0.0  
bitvis\_vip\_gmii, version v1.0.1  
bitvis\_vip\_gpio, version v1.8.5  
bitvis\_vip\_i2c, version v2.7.3  
bitvis\_vip\_rgmii, version v1.0.1  
bitvis\_vip\_sbi, version v2.8.3  
bitvis\_vip\_scoreboard, version v2.3.1  
bitvis\_vip\_spi, version v3.9.5  
bitvis\_vip\_uart, version v2.8.6  
bitvis\_vip\_spec\_cov, version v1.0.0  
bitvis\_vip\_hvvc\_to\_vvc\_bridge, version v0.1.1  
bitvis\_vip\_ethernet, version v0.2.2  
bitvis\_vip\_axi, version v1.0.1  
bitvis\_vip\_wishbone, version v0.1.2 BETA

I followed the steps of this URL: [A UVVM EXAMPLE UART TRANSMITTER TESTBENCH SIMULATION on MODELSIM – Mehmet Burak Aykenar](https://www.mehmetburakaykenar.com/a-uvvm-example-uart-transmitter-testbench-simulation-on-modelsim/128/)  
The difference is that I have used UVVM-Master in spite of UVVM-light.  
I have tried with the UVVM-master version of 2017, the same year as my Modelsim, but with the same error.

---

<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:** [October 5, 2023, 4:49am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397/2 "2023-10-05T04:49:39Z")

</div>

Hi.  
This seem to be a simulator bug. If it is a show stopper for you, you can switch that line with the files listed inside the uvvm\_util\_context.vhd file.

Best regards,  
Marius

---

<div class="post-metadata">

**Author:** ![Erick](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@Erick](https://forum.uvvm.org/u/Erick)\
**Post date:** [October 5, 2023, 6:55am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397/3 "2023-10-05T06:55:07Z")

</div>

Hi,

I think you are compiling with VHDL 2002, you need to compile with 2008 for context to work.

---

<div class="post-metadata">

**Author:** ![jose9ortiz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/jose9ortiz/32/123_2.png) [@jose9ortiz](https://forum.uvvm.org/u/jose9ortiz)\
**Post date:** [October 5, 2023, 8:40am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397/4 "2023-10-05T08:40:14Z")

</div>

Hello!

It worked!  
Thank you so much!

---

<div class="post-metadata">

**Author:** ![UVVM\_Team](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/uvvm_team/32/102_2.png) [@UVVM\_Team](https://forum.uvvm.org/u/UVVM_Team)\
**Post date:** [October 18, 2023, 8:30am UTC](https://forum.uvvm.org/t/library-utils-with-context-in-modelsim-with-uvvm-master/397/5 "2023-10-18T08:30:39Z")

</div>


