EDA Playground错误VCP5294 “未定义包uvm_pkg”

huangapple go评论87阅读模式
英文:

EDA playground ERROR VCP5294 "Undefined package uvm_pkg"

问题

我正在尝试在EDA playground中编译一个小的UVM验证环境。

我遇到了这个错误:

EDA playground ERROR VCP5294 "Undefined package uvm_pkg.

以下是附加的代码:

  1. import uvm_pkg::*;
  2. `include "reg_pkg.sv"
  3. module testbench;
  4. reg rst;
  5. reg clk;
  6. always #50 clk = ~clk;
  7. initial begin
  8. rst=0;
  9. clk=0;
  10. #100;
  11. rst = 1;
  12. `uvm_info("TESTBENCH",$sformatf("rst raised"),UVM_NONE);
  13. end
  14. reg_if reg_if_i();
  15. assign reg_if_i.clk = clk;
  16. assign reg_if_i.rst = rst;
  17. WriteRegisters WriteRegisters_i(
  18. .clk(reg_if_i.clk),
  19. .rst(reg_if_i.rst),
  20. .bus_en(reg_if_i.bus_en),
  21. .bus_wr_rd(reg_if_i.bus_wr_rd),
  22. .bus_data(reg_if_i.bus_data),
  23. .bus_addr(reg_if_i.bus_addr)
  24. );
  25. initial begin
  26. uvm_config_db#(virtual mux_if)::set(null,"*","reg_if_i",reg_if_i);
  27. $dumpvars(0, testbench);
  28. end
  29. initial begin
  30. run_test("reg_test1");
  31. end
  32. endmodule

你知道我为什么会得到这个错误吗?

英文:

I'm trying to compile a small UVM verification environment in EDA playground.

I'm getting this error:

> EDA playground ERROR VCP5294 "Undefined package uvm_pkg.

The code attached below:

  1. import uvm_pkg::*;
  2. `include "reg_pkg.sv"
  3. module testbench;
  4. reg rst;
  5. reg clk;
  6. always #50 clk = ~clk;
  7. initial begin
  8. rst=0;
  9. clk=0;
  10. #100;
  11. rst = 1;
  12. `uvm_info("TESTBENCH",$sformatf("rst raised"),UVM_NONE);
  13. end
  14. reg_if reg_if_i();
  15. assign reg_if_i.clk = clk;
  16. assign reg_if_i.rst = rst;
  17. WriteRegisters WriteRegisters_i(
  18. .clk(reg_if_i.clk),
  19. .rst(reg_if_i.rst),
  20. .bus_en(reg_if_i.bus_en),
  21. .bus_wr_rd(reg_if_i.bus_wr_rd),
  22. .bus_data(reg_if_i.bus_data),
  23. .bus_addr(reg_if_i.bus_addr)
  24. );
  25. initial begin
  26. uvm_config_db#(virtual mux_if)::set(null,"*","reg_if_i",reg_if_i);
  27. $dumpvars(0, testbench);
  28. end
  29. initial begin
  30. run_test("reg_test1");
  31. end
  32. endmodule

Do you know why I get this error?

答案1

得分: 1

在使用EDA Playground上的UVM时,您需要在左侧面板中明确选择一个UMV库版本。当前的"UVM/OVM"设置为None

当我将其设置为UVM 1.2时,错误消失了,如下所示:

  1. [2023-01-08 09:29:19 EST] vlib work && vlog '-timescale' '1ns/1ns' +incdir+$RIVIERA_HOME/vlib/uvm-1.2/src -l uvm_1_2 -err VCP2947 W9 -err VCP2974 W9 -err VCP3003 W9 -err VCP5417 W9 -err VCP6120 W9 -err VCP7862 W9 -err VCP2129 W9 design.sv testbench.sv && vsim -c -do "vsim +access+r; run -all; exit"
  2. VSIMSA: 配置文件已更改:`/home/runner/library.cfg'
  3. ALIB: 已连接库"work"。
  4. work = /home/runner/work/work.lib
  5. MESSAGE "Pass 1. Scanning modules hierarchy."
  6. MESSAGE_SP VCP2124 "在库uvm_1_2中找到包uvm_pkg。"

这是修改后的EDA Playground链接

在左侧面板的示例中也有帮助:Examples -> UVM -> UVM Hello World

英文:

When using UVM on EDA Playground, you need to explicitly select a UMV library version in the left side panel. Currently "UVM/OVM" is set to None.

When I set it to UVM 1.2, the error goes away, as you can see below:

  1. [2023-01-08 09:29:19 EST] vlib work && vlog '-timescale' '1ns/1ns' +incdir+$RIVIERA_HOME/vlib/uvm-1.2/src -l uvm_1_2 -err VCP2947 W9 -err VCP2974 W9 -err VCP3003 W9 -err VCP5417 W9 -err VCP6120 W9 -err VCP7862 W9 -err VCP2129 W9 design.sv testbench.sv && vsim -c -do "vsim +access+r; run -all; exit"
  2. VSIMSA: Configuration file changed: `/home/runner/library.cfg'
  3. ALIB: Library "work" attached.
  4. work = /home/runner/work/work.lib
  5. MESSAGE "Pass 1. Scanning modules hierarchy."
  6. MESSAGE_SP VCP2124 "Package uvm_pkg found in library uvm_1_2."

Here is the modified EDA Playgound link.

It is also helpful to look at the examples in the left side panel: Examples -> UVM -> UVM Hello World

huangapple
  • 本文由 发表于 2023年1月8日 22:17:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75048452.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定