Issue with enabling UVM support

378 views
Skip to first unread message

Stephen Lam

unread,
May 10, 2017, 6:03:31 PM5/10/17
to EDA Playground
Hi,

I'm attempting to enable UVM use with Aldec Riviera: https://www.edaplayground.com/x/24Yk

As a test, I inserted the command to import uvm_pkg at my top level tb:

module top;
  import uvm_pkg::*;

And got this error:
# ALOG: Error: VCP5294 /home/runner/top.sv : (4, 22): Undefined package uvm_pkg.

I then looked up an example UVM project on EDA Playground and compared to my playground. The only difference I can tell is that I am using my own .do file to compile my code, whereas the example does not.

This works (from the example)
[2017-05-10 17:53:30 EDT] vlib work && 
vlog '-timescale' '1ns/1ns' '-sv2k9' +incdir+$UVM_HOME/src -l uvm_1_2 -err VCP2947 W9 -err VCP2974 W9 -err VCP3003 W9 
-err VCP5417 W9 -err VCP6120 W9 -err VCP7862 W9 -err VCP9201 W9 -err VCP2129 W9 design.sv testbench.sv  && 
vsim -c -do "vsim +access+r; run -all; exit"


This is my run command line, doesn't work
[2017-05-10 17:53:00 EDT] vlib work && 
vlog '-timescale' '1ns/1ns' '-sv2k9' +incdir+$UVM_HOME/src -l uvm_1_2 -err VCP2947 W9 -err VCP2974 W9 -err VCP3003 W9 
-err VCP5417 W9 -err VCP6120 W9 -err VCP7862 W9 -err VCP9201 W9 -err VCP2129 W9 design.sv testbench.sv  && 
vsim -c -do run.do



My only guess is that because I have my own .do file, some things EDA playground would normally do automatically to enable UVM support did not happen. Does anybody have a suggestion, such as what I could add to my .do file enable UVM?

Thanks!

EDA Playground

unread,
May 11, 2017, 5:44:38 AM5/11/17
to EDA Playground

The problem is that the command line arguments necessary for running UVM are given in the EDA-Playground-generated command, but not the commands in your run.do file. I have changed your run.do file to make it work. See:

https://www.edaplayground.com/x/5dbJ

However, this required some proprietary knowledge, as you can see. I think you would be better removing the compile (vlog) commands from your run.do file and using `include to include all your files into testbench.sv and design.sv. This is the EDA Playground way.

So, your simulation runs, but as it takes more than 1 minute to compile and run, it times out.

Matthew 

Stephen Lam

unread,
May 12, 2017, 6:16:21 PM5/12/17
to EDA Playground
Ok that's what I had guessed. I will try to compile the source code as you recommend and move forward from there.

And by the way thank you so much for your timely response and expertise. Greatly appreciated!
Reply all
Reply to author
Forward
0 new messages