uvm开关全局的info+DC综合的引导语句synopsys+取消覆盖率el文件的checksum检查+PCIe的ATS和PRI的关系+覆盖率中的allvectors和allops+verdi的跨层次merge功能+SR-IOV和VFIO+before rounding和after rounding+bash字符串包含判断+vim 查看文件路径
uvm开关全局的info
uvm_root是顶层,有两种方法获取到uvm_root,在源码中有注释。
https://github.com/edaplayground/eda-playground/blob/master/docs/_static/uvm-1.2/src/base/uvm_root.svh
// The ~uvm_top~ instance of ~uvm_root~ plays several key roles in the UVM.
//
// Implicit top-level - The ~uvm_top~ serves as an implicit top-level component.
// Any component whose parent is specified as ~null~ becomes a child of ~uvm_top~.
// Thus, all UVM components in simulation are descendants of ~uvm_top~.
//
// Phase control - ~uvm_top~ manages the phasing for all components.
//
// Search - Use ~uvm_top~ to search for components based on their
// hierarchical name. See <find> and <find_all>.
//
// Report configuration - Use ~uvm_top~ to globally configure
// report verbosity, log files, and actions. For example,
// ~uvm_top.set_report_verbosity_level_hier(UVM_FULL)~ would set
// full verbosity for all components in simulation.
//
// Global reporter - Because ~uvm_top~ is globally accessible (in uvm_pkg
// scope), UVM's reporting mechanism is accessible from anywhere
// outside ~uvm_component~, such as in modules and sequences.
// See <uvm_report_error>, <uvm_report_warning>, and other global
// methods.
// The static accessor is provided as a convenience wrapper
// around retrieving the root via the <uvm_coreservice_t::get_root>
// method.
//
// | // Using the uvm_coreservice_t:
// | uvm_coreservice_t cs;
// | uvm_root r;
// | cs = uvm_coreservice_t::get();
// | r = cs.get_root();
// |
// | // Not using the uvm_coreservice_t:
// | uvm_root r;
// | r = uvm_root::get();
uvm_root是顶层,有两种方法获取到uvm_root,在源码中有注释。
set_report_severity_action_hier等函数本身存在于uvm_root等component之下的一些方法。对于env、drv等等的组件,在之下,但是如果是独立的组件,则所有组件都在uvm_root之下。
uvm_root top;
top = uvm_root::get();
top.set_report_severity_action_hier(UVM_INFO, UVM_NO_ACTION)
DC综合的引导语句----synopsys translate off/synopsys translate on/parallel case/full case
synopsys translation接口synopsys translation之间的代码被DC忽略。
// synopsys translate on
`include "/home/soc"
// synopsys translate off
synopsys parallel_case
对于一个case语句来说,DC既可以把他综合成优先权译码电路,又可以把他综合成选择器电路,
很多时候是没有必要综合成优先权译码电路,使用parallel_case告诉工具这里综合的是选择器电路。
always @(cs_state)
begin
case(cs state)//synopsys parallel case
2'b00: next state=2'b01;
2'b01:next state=2'b00;
2'b10:next state = 2'b10;
default:next state =2'b00;
endcase
end
synopsys full_case
所有条件并未列全,会综合出latch,这是前端工程师所不愿意看到的。如果芯片并不会又case未列出的状态,可以使用full_case避免综合出latch。
always @(cs_state)
begin
case(cs_state) // synopsys full_case
2'b00: next_state = 2'b01;
2'b01: next_state = 2'b00;
2'bl0: next_state = 2'b10;
endcase
end
取消覆盖率el文件的checksum检查
打开el文件时候添加额外命令-excl_bypass_checks
即可,
该方法可能是针对行覆盖率有效,对于分支覆盖率,条件覆盖率等的覆盖率el格式,本身估计是依赖checksum的,
手册也明确指出checksum变了,建议重新收集覆盖率,因为其rtl的变化导致了一些覆盖效果本身受到了影响。
一个比较好的方法是项目的前期可以简单收集覆盖率,等到后期开始收网以后,再着重去更新el文件,减少el文件的迭代频率。
至于用force强行将不可覆盖的点位覆盖到,也是一个方案,不过似乎必要性不大。
PCIe的ATS和PRI的关系
PCIe 建议先发送ATS,ATS成功获取权限后,不再发起PRI。
当ATS翻译完成成功但无法获取到PRI请求所需要的权限,则发起PRI请求。
PRI请求用于构建页表数据结构,完成数据从硬盘到内存的搬运过程。ATS主要是完成地址转换结果的翻译过程。
覆盖率中的allvectors和allops
allvectors用来收集条件覆盖率的排列组合关系
allops用来收集条件表达式的一些条件细节
verdi的跨层次merge功能
https://blog.csdn.net/cy413026/article/details/113879302
相同的merge
merge:
@echo ${db_file}
urg -full64 -dir a.vdb merged.vdb -dbname merged.vdb
跨层次merge
跨层次merge需要一个mapfile
格式为:
MODULE top_now
INSTANCE:
SRC: other_top.other_inst.other_top_now
DST: top.top_now
rtl更动后的merge
rtl更动会导致一些rtl的路径不存在,此时仍然可以merge,但是会报告大量警告。
因此,重新设定merge的base,以新的rtl作为base,合并旧有的代码,将只会在第一次出现警告,后续的merge过程将不受影响,
-flex_merge reference选项,并将新的simv.db文件放在最前,则将以新的rtl作为base进行merge
https://blog.csdn.net/gsjthxy/article/details/88429983
SR-IOV和VFIO
两种虚拟化的实现方案,前者是针对PCIe设备的虚拟化,其中的PF可以拓展出多个VF,但是VF需要在设备枚举的时候创建,且需要有配置空间等,灵活性和功能受限,在高密度的IO场景下,存在局限。
VFIO是LInux虚拟化软件的结构,可能更适合于IOMMU,在实际性能上,已经接近物理设备。
DPDK 可以通过 vfio 模块,让使用 DPDK 的程序掠过内核直接控制网卡,进而避免了流量过大导致的内核软中断过高的问题。
https://luohao-brian.gitbooks.io/interrupt-virtualization/content/vfio-she-bei-zhi-tong-jian-jie.html
https://cloud.tencent.com/developer/article/1942108
https://blog.csdn.net/qq_37041791/article/details/129548579
before rounding和after rounding
after rounding:在四舍五入之后检测是否出现溢出,至于中间计算过程中的指数等信息,转换为非溢出处理
before round:在四舍五入之前检测是否出现溢出,,至于中间计算过程中的指数等信息,保留溢出情况
两种情况只能二选一
bash字符串包含判断
https://blog.csdn.net/iamlihongwei/article/details/59484029
使用 =~符号
strA="helloworld"
strB="low"
if [[ $strA =~ $strB ]]
then
echo "包含"
else
echo "不包含"
fi
vim 查看文件路径
1,Esc模式下先按1
2,ctrl + G
Le vent se lève! . . . il faut tenter de vivre!
Le vent se lève! . . . il faut tenter de vivre!