• 正文
  • 相关推荐
申请入驻 产业图谱

Xcelium和Questasim的信息调试工具

07/25 09:45
827
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

1. 前言

使用Xcelium和Questasim工具在进行编译(compilation)、细化(elaboration)和仿真(simulation)时,通常会报一些简短信息,一来方便用户查看并调试,另一方面加快了仿真速度,因为打印的信息越多,仿真速度就越慢。

有时候这些信息过于简短,会使得用户调试起来有点困难,不知道问题出在哪里,因此,Xcelium和Questasim各自都提供了对应的信息调试工具,可以将这些简短信息扩展成更详细的信息。Xcelium中是xmhelp信息调试工具,Questasim中是verror信息调试工具。下面分别来介绍下。

2. xmhelp信息调试工具

在终端中输入命令:xmhelp -help,然后按回车,会出现以下类似信息:

xmhelp: 23.09-s001: (c) Copyright 1995-2023 Cadence Design Systems, Inc.
  Usage:
	xmhelp [options] tool error
	xmhelp [-cdslib | -hdlvar]
	xmhelp tool -dumpwarn
	xmhelp tool -dumpwarn -outfile <filename>
  Options:
	-ALL <arg>                  -- Prints out the help for all tools with the given mnemonic 
	-CDS_IMPLICIT_TMPDIR <arg>  -- implicit tmpdir for reading
	-CDS_IMPLICIT_TMPONLY       -- only use implicit for reading
	-CDSLIB <arg>               -- Prints the contents of the cds.lib file(s)
	-DUMPWARN                   -- Prints out the complete list of the mnemonics for all warning messages
	-HDLVAR <arg>               -- Prints the contents of the hdl.var file(s)
	-HELP                       -- Prints this message
	-LOCKCHECK <arg>            -- Tests a file system to determine for file locking capabilities
	-NEVERWARN                  -- Disables printing of all warning messages
	-NOCOPYRIGHT                -- Suppresses printing of copyright banner
	-NOWARN <arg>               -- Disables printing of the specified warning message
	-OUTFILE <arg>              -- Dumps the mnemonics  of all the warning messages in the file 
	-TOOLS                      -- Prints out the tools for which help is available
	-VERSION                    -- Prints the version number
	-XMERROR <arg> [Deprecates: NCERROR] -- Increases the severity of a warning to an error
	-XMFATAL <arg> [Deprecates: NCFATAL] -- Increases the severity of a warn/error to a fatal
  Examples:
	-- To find help on the error CUVWSP from xmelab
	   % xmhelp xmelab CUVWSP
	-- To find help on the error BADCLP from xmvlog
	   % xmhelp xmvlog BADCLP
	-- To list the currently defined libraries
	   % xmhelp -cdslib
	-- To list the currently supported tools
	   % xmhelp -tools
	-- To list the help for all supported tools with the BADCLP mnemonic
	   % xmhelp -all BADCLP
	-- To print out the complete list of the mnemonics for all warning messages
	   %xmhelp xmelab -dumpwarn
	-- To dump the list of the mnemonics for all the warning messages generated by all the supported tools in the file
	   %xmhelp -all -dumpwarn -outfile <filename>

在help信息里描述了如何使用xmhelp和一些例子。

我们以如下一条信息为例:

xmvlog: *W,LBLMAT (/common/test/seqs/axi_mst_seqs/axi_mst_base_seq.sv,113|31): Label/name mismatch: update_slv - update_mst_slv

从这条信息,可以提取出是xmvlog报的warning,助记符是LBLMAT,因此我们在terminal中输入:xmhelp xmvlog LBLMAT,会输出以下更详细的信息:

xmhelp: 23.09-s001: (c) Copyright 1995-2023 Cadence Design Systems, Inc.
xmvlog/LBLMAT =
              A label for a named statement block must be the same for both the begin
              and end keywords. Likewise, a label for the end of a module, primitive,
              function, task, or class must match the name.

其它用法类似,可以动手试试。

3. verror信息调试工具

在终端中输入命令:verror -h,然后按回车,会出现以下类似信息:

其中参数:

Usage: verror [-fmt|-full] [<tool>-<msgNum>|<msgNum>] ...
       verror [-fmt|-full] [[<tool>-<msgNum>|<msgNum>],[<tool>-<msgNum>|<msgNum>],...]
       verror [-fmt|-full] [-kind <tool>] [-severity <note|warning|error|fatal>] -all
       verror [-kind <tool>] -permissive
       verror [-kind <tool>] -pedanticerrors
       verror [-kind <tool>] -suppressibleerrors
       verror -help
       verror -version

其中参数:

-fmt | -full
  (optional) Specifies the type and amount of information to return.
-fmt
  Returns the format string used in the message.
-full
  Returns the format string and complete text associated with the message.
[-kind <tool>] -all
  (required when not specifying <msgNum>) Returns information about all messages associated with a specified tool, where <tool> can be one of the following:
  aid, hm_entity, mc2com, qverilog, sccom, scgenmod, sdfcomp, sm_entity, vcd2wlf, vcom, vcovkill, vdel, vdir, vencrypt, vgencomp, vish, vlib, vlog, vmake, vmap, vopt, vsim, wlf, wlf2log, wlfman, wlfrecover, xml2ucdb
[-kind <tool>] {-pedanticerrors | -permissive | -suppressibleerrors}
  (optional) Specifies filtering for messages according to the message type.
  <tool>
    Any of the values allowed for the -kind argument.
  -pedanticerrors
    Display messages that are reported as errors due to adhering to a more strict interpretation of the LRM.
  -permissive
    Display messages reported as warnings that would be displayed as errors if you use vsim -pedanticerrors.
  -suppressibleerrors
    Display messages that you can suppress from the command line or modelsim.ini file.
<msgNum>
  (required when not specifying -all) Specifies the message number(s) you would like more information about. You can find the message number in messages of the format:
** <Level>: ([<Tool>-[<Group>-]]<MsgNum>) <FormattedMsg>
  You can use either a comma-separated or a space-separated list to specify <msgNum> any number of times for one verror command.
  Optionally, you can specify the toolname prior to the message number, in the same way it appears in an error message. For example:
  verror vsim-5003

我们以如下一条信息为例:

** Error (vsim-3061) foo.v(22): Too many Verilog port connections.

从这条信息,可以提取出是vsim报的error,因此我们在terminal中输入:verror 3061或verror vsim-3061,会输出以下更详细的信息:

vsim Message # 3061:
Too many Verilog ports were specified in a mixed VHDL/Verilog
instantiation. Verify that the correct VHDL/Verilog connection is
being made and that the number of ports matches.
[DOC: QuestaSim User's Manual - Mixed VHDL and Verilog Designs Chapter]

其它用法类似,可以自行探索实践。

相关推荐

登录即可解锁
  • 海量技术文章
  • 设计资源下载
  • 产业链客户资源
  • 写文章/发需求
立即登录