在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 10602|回复: 13

[求助] UVM的环境变量应该怎么设定?

[复制链接]
发表于 2018-11-16 16:19:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 空白MAX 于 2018-11-17 18:26 编辑

我用的是http://bbs.eetop.cn/thread-839463-1-1.html的虚拟机然后加了UVM变量,准备试一下张强书里的源码能不能跑
TIM截图20181116162807.png

出现错误
刚开始接触linux很多都不懂,是我环境变量设定的不对还是别的问题?我改用以下命令后出现了新的问题,请问这是什么情况呢?
[IC@IC 2.5.2]$ vcs -sverilog +incdir+$UVM_HOME/src top_tb.sv
                         Chronologic VCS (TM)
            Version I-2014.03 -- Sat Nov 17 17:34:13 2018
               Copyright (c) 1991-2014 by Synopsys Inc.
                         ALL RIGHTS RESERVED

This program is proprietary and confidential information of Synopsys Inc.
and may be used and disclosed only as authorized in a license agreement
controlling such use and disclosure.

Parsing design file 'top_tb.sv'
Parsing included file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_version_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_message_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_phase_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_object_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_printer_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_tlm_defines.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/tlm1/uvm_tlm_imps.svh'.
Back to file '/home/IC/uvm-1.1d/src/macros/uvm_tlm_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_sequence_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_callback_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_reg_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Parsing included file '/home/IC/uvm-1.1d/src/macros/uvm_deprecated_defines.svh'.
Back to file '/home/IC/uvm-1.1d/src/uvm_macros.svh'.
Back to file 'top_tb.sv'.

Error-[SV-LCM-PND] Package not defined
top_tb.sv, 4
$unit, "uvm_pkg::"
  Package scope resolution failed. Token 'uvm_pkg' is not a package.
  Originating module '_vcs_unit__1'.
  Move package definition before the use of the package.

Parsing included file 'my_if.sv'.
Back to file 'top_tb.sv'.
Parsing included file 'my_transaction.sv'.

Error-[SE] Syntax error
  Following verilog source has syntax error :
  "my_transaction.sv", 4: token is 'uvm_sequence_item'
  class my_transaction extends uvm_sequence_item;
                                                ^

2 errors
CPU time: 2.698 seconds to compile



知道咋回事了,还是要写makefile定义编译顺序
发表于 2018-11-16 16:48:56 | 显示全部楼层
在.bash或者.cshrc设置环境变量,然后source一下
 楼主| 发表于 2018-11-17 11:16:40 | 显示全部楼层
回复 2# wenhuajianyuan


   我在/home/IC下的.bashrc最后一行添加了一句,然后[IC@IC ~]$ source .bashrc ,结果还是不行,是哪里有问题? TIM截图20181117112342.png
发表于 2018-11-28 12:35:05 | 显示全部楼层
Makefile中加入 $(UVM_HOME)/src/uvm.sv 或者 `include "uvm.sv"
发表于 2020-4-6 15:18:03 | 显示全部楼层
楼主怎么解决的这个问题呢?
发表于 2020-4-15 17:09:26 | 显示全部楼层
最简单的方法是在编译命令中添加ntb_opts uvm-1.1 ,然后import uvm::*;即可
发表于 2021-1-7 11:35:22 | 显示全部楼层
来了
发表于 2021-9-18 19:32:39 | 显示全部楼层
在filelist中加入$UVM_HOME/src/uvm_pkg.sv  
发表于 2021-9-19 15:22:45 来自手机 | 显示全部楼层
-ntb_opts uvm
发表于 2021-9-21 08:29:02 | 显示全部楼层
1.命令行 export $UVM_HOME=xxx/uvm(你的UVM路径) 2.在vcs 命令里加 +incdir+$UVM_HOME 3.注意UVM的文件要先编译
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-11-15 22:59 , Processed in 0.024516 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表