- 博客(75)
- 收藏
- 关注
原创 VCS 三步仿真
优势:可以将不同的库独立analysis, 后面只对有修改过的库做单独的analysis,没有修改的可以不用重新analysis.
2025-03-27 11:20:46
208
原创 Systemc example based on VCS
SYSTEMC_HOME: module load systemc(or 自己download systemc)gcc需要是7.3.0版本,module load gcc/7.3.0。
2024-08-29 09:00:33
277
原创 Linux Gui 窗口对话和窗口操作
可以实现窗口对话eg: zenity --error --width 300 --text "Permission denied. Cannot write to the file."ChosenDate=$(zenity --calendar --text "Choose a date" --title "How-To Geek Rota" --day 1 --month 9 --year 2019);echo $ChosenDateResponse=$(zenity --entry --
2024-07-23 15:56:09
344
原创 define to string in systemverilog
有时候我们需要打印macro,这就需要把define的值转成string类型。方法二:“``HIER_TB_TOP``”
2024-03-25 11:55:12
343
原创 Verdi tcl apps
path: tools -> VC Apps Toolbox -> 各个appsource path可以右键app查看,原理是tcl命令用户可自行添加。
2024-02-27 14:50:22
944
原创 VCS partition compile
1. fast compile, 多个server跑-lca -partcomp=autopart_low -fastpartcomp=j82. 手动的方式去指定分块编译1. 准备config文件: pcpl.cfgpartition instance top.dut;partition package uvm_pkg;partition cell module_name;2. 加入编译optionvcs -cla -parcomp +optconfigfile+pcpl.c
2022-04-25 13:56:33
1925
原创 systemverilog functional coverage with argument
covergroup cg_multi_layer(ref int layer0_index, int layer1_index, input int size); cp_layer0: coverpoint layer0_index { bins id[]={[0:size]}; } cp_layer1: coverpoint layer1_index { bins id[]={[0:size]}; } ...
2021-08-17 17:34:30
170
原创 gvim 跨行搜索
0x9a\(\n.*\)\{31\}\n.*0x000x9a是要匹配得\n.* 是跨行贪婪匹配{31}是跨多少行0x00是结束字符
2021-07-13 18:26:55
510
原创 SystemVerilog file operations
一. open,close, writefwrite(fd, data);int fd;fd = $fopen("file", "w”);$fdisplay(fd,"%x", data);$fclose(fd);二. 判断文件是否存在如果文件open 为0,代表打开失败,否则成功三. 读取文件fd = fopen("file", "r");if (fd) begin // read successfule while($feof(fd)) begin $fg
2021-05-26 16:24:32
1620
原创 git 使用总结
git 将某一个文件回退到某个版本查看该文件的log, 会打印出commit id, message等信息git log $file回退git checkout $commit $filegit&gerrit, 已经git push后再次递增修改git add $filegit commit --amend -m "message" // 建议加上messagegit push origin HEAD:refs/for/master...
2021-04-02 14:53:11
104
原创 UVM tips and tricks
1.Use of Macros to Overcome Errors Faced in Packagepackage pkg1; `include "adder_design.sv" `include "tb.sv"endpackagepackage pkg2; `include "adder_design.sv" `include "adder_tb.sv"endpackagemodule top(); `ifndef ADDER_DESIGN `defin...
2021-02-27 19:19:06
381
原创 Add delay for Verilog
在verilog中添加delay推荐assign #5 y=~x; always @(a) y <= #5 ~a;Continuous assignment delayassign #5 y = ~x; OKBlocking assignment delayalways @(a) #5 y = ~a; LHSalways @(a) y = #5 ~a; RHSplacing delays on the LHS of blocking assignments...
2021-02-23 14:25:54
2484
原创 Systemverilog Interface Classes
interfac class 可以定义一系列pure functioninterface class resolve_listener; pure virtual function void new_resolve(arm_txn_resolve resolve);endclassclass 可以implement interface classclass 可以implement 多个interface classclass ordering_checker extends ar.
2021-02-20 15:14:35
646
原创 UVM – Stop Hitting Your Brother Coding Guidelines
Configuration Tipsdon't config_db the individual values, group values tnto config object calling set()/get() group a component's configuration: env and agent config_db 明确路径, 减少wildcard;config_db::get如果失败,打印提示 config 跟TB 匹配Transaction Tipswrite .
2021-02-09 15:45:19
150
原创 UVM::uvm_do function about sub-sequence
关注点1:在sequence中执行uvm_do(sub_sequence,...) 时,sub sequence的pre_body(), post_body() 不会执行, 原因:如果user把objection 的raise/drop放在pre_body/post_body中,而在一个环境中objection不希望出现在很多地方,所以在parent sequence中加入objection机制,sub sequence中pre/post body函数不执行,sub sequence中也不会有objecti
2021-01-28 11:45:51
343
原创 ARM C file to binary(hex file)
对于CoreVerification, 会使用C产生激励,需要C -> binary(hex file)的步骤对于自家core,会有对于的compiler对于arm core,应该买ip的时候会有$> arm-elf-gcc -c test.c -o test.o$> arm-elf-objcopy -O ihex test.o test.hex对于linux:gcc main.cpp -o output.oobjcopy -O ihex output.o..
2021-01-08 17:36:08
220
原创 Cache 原理
cache 基本概念cache line: 一条cache的大小cache size: 整个cache的大小offset: 对应cache line中的那个byte, eg:8byte cache line size, 需要3bit的offsetindex: 对应哪条cache line, eg: 64byte cache 大小,每条cache line是8byte,所以一共有8条cache line,需要3bittag: 对应地址位宽,比如48bit位宽, cache size是64.
2020-12-25 17:35:31
746
原创 SystemC Study
简介 SystemC的意义,网上能查到,这里只记录使用的过程一 按照去官网下载tar包,https://www.accellera.org/downloads/standards/systemc我下载的是SystemC 2.3.3 (Includes TLM),Core SystemC Language and Examples(tar.gz)在linux上安装1.放到linux 任意路径,tar -zxvf 解包2.在systemc-2.3.3中有一个INSTALL的文...
2020-12-15 18:05:50
3641
7
原创 What is the PSS(Portable stimulus standard)
The PSS is a verification model or it's a methodology.it canusea higher level of abstraction [Like graphical representation in terms of states] like Cadence'sPerspec
2020-11-17 15:38:00
790
原创 IC Verification Record
记录IC验证有关的杂谈spec是主要来源 大体方向上,尽量跟DE分开解读spec,摘取测试点;但是对于比较internal的case,还是需要DE帮设想 工作应该有主次,有些是必须的,有些是非必须,有些是首先要覆盖的 verification plan需要验证者,尽量写得细,verifylist做得好,工作就完成一半了 没有spec,拒绝验证!没有spec,拒绝验证! 设计工程师也需要根据rtl来提出一些具有风险或者复杂场景的功能点 designer完全按照自己的理解写spec和code,然
2020-11-11 19:58:46
281
原创 Shell Command Record
bjobs -w | grep RERUN | awk '{print $1}' | xargs bkill
2020-10-16 13:57:42
153
原创 Formal Experience Record
JasperGold1. 痛点 有太多的property 不能被prove 解决方法:1.Register 一个cycle配置完,直接把config 接到DUT上2.Abstract DUT internal counter, DUT内部每次加1的counter看看是否可以每次+2或者更大的指3.Decrease delay of interface handshake(valid and ready)4.block-box 不必须的module5.增加cycle cou..
2020-10-14 16:49:04
373
原创 verilog X value 操作
三目运算符out = sel ? a: b;当sel = x,使用xcelium的情况如下case1: 当a != b时, out = x;case2: 当a==b时,out = a/b;位操作
2020-09-10 10:26:36
1588
原创 UVM TLM2: SystemC和SV 通信
SystemC 介绍SystemC不是一门新的语言,而是基于C++开发的libraryTLM2 介绍如果都是SV code的话,结构上类型TLM1TLM2 提供了下面2中传输接口Blocking (b_transport) completes the entire transaction within a single method call Non-blocking (nb_transport) describes the progress of a trans
2020-09-08 14:47:42
2243
2
原创 UVM callback
UVM callback examplestep1实现callback classclass driver_cb extends uvm_callback; extern virtual task <callback task/function>;endclassstep 2实现functional classclass my_driver extends uvm_driver; typedef driver_cb cb_type; typedef m_
2020-09-07 15:13:16
279
原创 Bus 类型记录
Bus 类型记录NoC: network on ChipNiC: Network Interconnect, 主要产品是ARMBus MatixCrossBusGALS:Globally Asynchronous Locally Synchronous传统的bus fabricref:https://blog.youkuaiyun.com/cy413026/article/details/102959868https://www.design-reuse...
2020-09-04 17:56:48
2156
1
原创 vcs simulator profile
VCS simulation profile 工具有助于分析子模块仿真时间或是内存消耗状况, 对仿真时间特别长或者消耗内存特别大的案例, 借助于工具可以清楚地看到整个TB下面模块,instance或者DPI/PLI消耗的资源百分比。1: 编译选项在VCS编译设计和TB的时候加入下列选项-lca -simprofile编译结束后仔细检查编译的Log, 确认选项已经参与编译过程。2:仿真选项-sim...
2020-09-02 10:37:03
6566
原创 systemverilog string split
module test; function automatic void parse ( output string out [$], input string in, input string separator = ",", input bit drop_blank = 1 ); string val, min, max; bit fl...
2018-11-14 20:08:54
4493
原创 uvm pre_abort when fatal exit
// UVM pre_abort() : Called prior to UVM_EXIT, e.g. when a fatal occurs // virtual function void pre_abort(); // Call extract and report so that the state of the scoreboard is printed...
2018-11-07 11:48:10
619
原创 systemverilog dpi usage
How to Embed Systemverilog Interpreter using DPI-C?:https://stackoverflow.com/questions/29781428/how-to-embed-systemverilog-interpreter-using-dpi-c/46441794#46441794https://verificationacademy.com...
2018-10-10 22:05:10
592
转载 linux ps
http://wangchujiang.com/linux-command/c/ps.html实例ps axo pid,comm,pcpu # 查看进程的PID、名称以及CPU 占用率ps aux | sort -rnk 4 # 按内存资源的使用量对进程进行排序ps aux | sort -nk 3 # 按 CPU 资源的使用量对进程进行排序ps -A # 显示所有进程信息ps -u r...
2018-07-03 19:03:40
1360
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人