关于Xcelium的MSIE flow这一篇就够了


前言

Elaboration时间可能是验证大型系统级设计的主要问题。MSIE提供了一种Elaboration的形式,可以大大减少所需的时间,Elaboration的内存空间和存储空间。 取决于用户环境,可能存在各种类型的要求,以减少Elaboration的时间。 例如,最简单的要求可以是减少每次临时构建的整体制作时间和/或减少下一次增量构建时间。 其他要求可以是分别设计的不同稳定/不变和更改部分,并在下一次运行中重新使用它们。 所有这些都要求选择正确的MSIE流程。Xcelium为了应对复杂的SOC设计和减少re-elaborate设计的时间提出了MSIE的流程(Multi-Snapshot Incremental Elaboration)下面就简单介绍下,我们在SOC验证中使用的MSIE流程


一、MSIE是什么?

  • Multi-Snapshot Incremental Elaboration(MSIE) provides a form of
    incremental elaboration that reduces time to re-elaborate a design.
  • MSIE is also known as Incremental Elaboration.
    • Testcase is partitioned mainly in two parts:
      • Primary Snapshot ( contains stable code which does not require any changes)
      • Incremental Snapshot (contains frequent changing code)
      • For maximum gain, the ratio of primary code to incremental code should be maximized.
        • Example : 90% of the code compiled in primary, 10% code compiled in incremental.
  • Based on customer designs there are two flows developed in MSIE:
    • IIP (DUT complete, Verification environment incomplete)
    • PII (DUT complete/incomplete, Verification environment complete/incomplete)
      在这里插入图片描述

二、MSIE有什么好处?

  • Reduce turn-around time by enabling incremental elaboration.
  • Enable parallel elaboration by allowing simultaneous elaboration of multiple primaries.
  • Enable faster SoC and GLS verification by enabling simple replacement of detailed models with more abstract models.
  • Reduce HDD/storage space utilization with cloning feature.
  • Add UVM test classes in incremental without re-elaborating primary.
  • The elaboration performance gain has even crossed to 90% in some of the customer environment.

三、使用步骤

1.MSIE IIP流程

iip时候,DUT准备好了,但是验证环境还没有准备好。
在经典环境中,单独的测试平台会在其下实例化DUT。这种测试用例流程可以通过MSIE IIP流程获得大量的构建时间。
可以将DUT elaborate为主要的快照。
可以将Testench elaborate为增量快照。
下面分别以xrun多步和单步为例,简单说明

多步xrun示例代码如下:

##使用-mkprimsnap构建名为“prim”的主快照。
##建议使用“-top”开关,以免不必要的顶层设计单元进入主快照。

prim:
	xrun -mkprimsnap -name prim -top prim -f ../src/prim_files.f \
	../src/lib1/lib1_mod1.v  ../src/lib2/lib2_mod2.v -message -log irun_prim.log

##建立增量快照,该快照使用“-primsnap”开关重复使用上一步创建的主快照。
incr:
	xrun -primname prim -snapshot top -f ../src/incr_files.f -reflib lib1 -reflib lib2 \
	-message -log irun_incr.log

clean:
	rm -rf xcelium.d *.log *.key *.shm *.history

all: clean prim incr

单步xrun示例代码如下:

##通过使用“-primtop”引用主模块名称“prim”来构建主快照。
##在同一运行中,还传递了增量文件“incr.v”。
1msie:
	xrun ../src/lib1/*.v ../src/lib2/*.v -primtop prim -f ../src/prim_files.f \
	../src/incr/incr.v -message -log single_irun.log -top incr

clean:
	rm -rf xcelium.d *.log *.key *.shm *.history lib1 lib2

all: clean 1msie

2.MSIE PII 流程

pii时候,DUT和验证环境都可以准备好,也可以没准备好。
在某些设计方案中,你可能具有完整的测试平台,并且大多数设计已准备就绪。 因此,将整个测试台和设计的就绪部分作为主快照是有意义的,然后将不完整的(可能经常会更改)设计部分放入增量快照中。
对于设计的这种不完整部分(例如说模块incr_Comp_X),MSIE允许在构建主快照时将其留为hole。 以后,在增量快照构建中,您可以填充该主分区hole。

多步xrun示例代码如下:

#使用-mkprimsnap构建称为“prim”的主快照。所有主要文件都已通过“ -f ../src/prim_files.f -f ../src/incr_files.f”传递。
#开关“-incrbind”用于在主构建时将模块“ incr_comp_X”作为hole。
#以后,可以将其绑定到最终模型中的增量partition。建议使用“-top”开关,以免不必要的顶层设计单元进入主快照。
prim:
	xrun -mkprimsnap -name prim -top prim -incrbind incr_comp_X \
	-f ../src/prim_files.f  ../src/lib1/lib1_mod1.v ../src/lib2/lib2_mod2.v \
	-message -log xrun_prim.log

#建立增量快照,该快照使用“ -primname”开关调用主快照。
#此处,增量文件为incr_Comp_X.v,该文件已通过“ -f ../src/incr_files”传递。
incr:
	xrun -primname prim -snapshot top -f ../src/incr_comp_X.f \
	-message -log xrun_incr.log

#CLEANING
clean:
	rm -rf INCA_libs *.log *.key *.shm *.history

# ALL STEPS
all: clean prim incr

单步xrun示例代码如下:

##通过使用“-primtop”引用主模块名称“prim”来构建主快照。
##在同一运行中,增量文件已传递../src/incr/incr_Comp_X.v。
1msie:
	xrun -primtop prim -incrtop incr_comp_X -f ../src/prim_files.f ../src/incr/incr_comp_X.v \
	../src/lib1/lib1_mod1.v ../src/lib2/lib2_mod2.v -message -log 1msie_xrun.log

#CLEANING 
clean:
	rm -rf INCA_libs *.log *.key *.shm *.history lib1 lib2 

# ALL STEPS
all: clean 1msie

3.关于HREF

The Hierarchical Reference Permission File (href)
href和debug access(-access)不一样,+rwc用于从Tcl或VPI进行外部访问.
href文件是一个文本文件,用于指定对主快照中的对象的引用权限。 当elaborate主快照时,该文件包含在-href选项中。 多个-href选项可用于指定多个href文件。
通常,href文件由elaborator自动生成,或者使用-genhref选项在单独的步骤中显式生成,或者在发生未解决的层次名称错误时自动生成。
在某些设计方案中,你可能想从增量partition访问(读/写/驱动…)主快照中的对象。 默认情况下,当elaborate主快照时,elaborator不了解其余的设计。 因此,默认情况下,如果在没有任何-href选项的情况下创建了主快照对象,则不会为主快照对象提供href权限。 然后,如果增量partition正在尝试对主快照对象进行href访问,则它将报告消息* N,HREFAC和致命错误* F,HREFIF。

你可以使用-href通过将href文件传递给主快照对象来提供对此类主快照中对象(由增量partition进行href的访问)的访问。

权限类型:

  • Verilog
PermissionCharacterApplicable DeclarationsExample Verilog Code
ReadRNets, Variablesx = top.a.b.N;
WriteWVariables, Eventstop.a.b.V = 1;
-> top.a.b.E;
ForceFNets, Variablesforce top.a.b.N = 1;
DriveDNets, Variablesassign top.a.b.V = x;
xor(top.a.b.N, x, y);
Event ControlENets, Variables, Eventsalways @(top.a.b.N) …
@(top.a.b.E) …
assign x = top.a.b.V;
DisableBTasks, Functions, Statement Labelsdisable top.a.b.T;
InvokeITasks, Functionstop.a.b.T();
x = top.a.b.F(1);
  • VHDL
PermissionCharacterApplicable DeclarationsExample Verilog Code
Read DriveR DSignals,Portsmod mod_inst(top.dut.X);
Where X is a VHDL object that connects to Verilog module mod. In a mixed-language hierarchical reference, Read/Drive permission must be given to the target VHDL objects in the primary partition to set input or output mode of the Verilog module port connection.

href文件举例

top.a.b.my_net RDX      # Read and Drive permission to top.a.b.my_net.
                        # Expand this vector net.
top.a.b.my_var DFE      # Drive, Force, and Event Control permission to
                        # top.a.b.my_var
top.a.b.my_task IB      # Invoke and Disable permission to top.a.b.my_task
top.a.d ... X           # Expand all vector nets in and below top.a.d
top.a.c *               # Full permission to all objects in scope top.a.c.
                        # Expand all vector nets in this scope.
top.a.d<WIRE> R         # Read permission to all wire objects in scope top.a.d
top.a.d ...<REG> RW     # Read and Write permission to all reg objects in
                        # scope top.a.d and below
top.a ...2 *            # Full permission to top.a till depth 2

多步auohref示例代码如下:

  1. 执行make error,会在创建增量partition时生成autohref.txt
  2. 执行make no_err,会在创建主快照时,由-href传递生成的autohref.txt,这样在生成增量partition的时候,就拥有访问主快照的权限
使用-mkprimsnap构建称为“prim”的主快照。“-top”开关用于明确提及顶层单元。所有主要文件都已通过“-f ../src/prim_files.f”选项传递。
prim:
	xrun -mkprimsnap -name prim -f ../src/prim_files.f  ../src/lib1/lib1_mod1.v ../src/lib2/lib2_mod2.v \
	-top prim -message -log xrun_prim_without_href.log
	
# MSIE创建“ autohref.txt”,你可以使用“-href”选项简单地传递它并重建主快照。
prim_href:
	xrun -mkprimsnap -name prim -f ../src/prim_files.f ../src/lib1/lib1_mod1.v ../src/lib2/lib2_mod2.v \
	-top prim -message -log xrun_prim_with_href.log -href autohref.txt

#建立增量快照,该快照使用“-primsnap”开关调用主快照。 此处,增量文件已通过“-f ../src/incr_files.f”传递。
#注意irun_incr.log文件中的以下错误。 “ncelab:* F,HREFIF:由于层次结构引用权限问题而终止(同时生成HREF文件:autohref.txt)。”
#注意:默认情况下,为了获得更好的性能,没有对主快照的对象应用href权限。
#以上消息是由于增量快照试图访问主快照的对象(请参见incr.v,第5行“force incr.prim_inst.d1.a = 0;”)而导致的,该对象在创建过程中没有加href(Hierachical Reference)。
incr:
	xrun -primname prim -snapshot top -f ../src/incr_files.f  \
	 -message -log xrun_incr.log

#CLEANING
clean:
	rm -rf xcelium.d/ *.log *.key *.shm *.history *.txt
#ERROR
error: clean prim incr 

#NO ERROR
no_err: prim_href incr

多步genhref示例代码如下:

  1. make gen_href 生成权限文件
  2. make prim 构建主快照
  3. make incr 构建增量快照和仿真
##在单个msie命令中,-genhref用于生成整个设计的分层权限文件。 注意href.txt文件的内容。
gen_href:
	xrun -primtop prim1 -primtop prim2 -genhref href.txt -top incr \
	./src/prim1.sv ./src/prim2.sv ./src/incr.sv
	
##使用-mkprimsnap和href.txt文件构建名为“prim1”和“prim2”的主快照。
prim:
	xrun -mkprimsnap ./src/prim1.sv -name prim1 -log xrun_prim1.log \
	-href href.txt -clean
	xrun -mkprimsnap ./src/prim2.sv -name prim2 -log xrun_prim2.log \
	-href href.txt

##建立增量快照,该快照使用“-primbind”开关重用主快照。incr:
	xrun ./src/incr.sv -primbind -input "@probe -screen incr.x incr.y \
	incr.prim2_inst.x; run; exit" -log xrun_incr.log

#CLEANING 
clean:
	rm -rf xcelium.d/ *.log *.key *.shm *.history *.txt

# ALL STEPS
all: clean gen_href prim incr 

总结

更详细例如UVM-MSIE和MSIE-SDF等可以参考Cadence官网:

One-Stop Knowledge Resource for MSIE

评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值