日常学习(2)sv、git、uvm复

  1. function返回值不支持的部分如何返回。
    使用结构体,将不支持的内容包括在内。

  2. sv验证环境中agent的作用
    收上层发来的事务(transaction)分解成独立的命令,分别发给驱动(Driver)和计分板(scoreboard)
    作者:994文枫 https://www.bilibili.com/read/cv13681407 出处:bilibili

starting_phase的赋值方法

直接赋值,或1.1的defaultseq自动赋值
image

start_item和finish_item

在seq中,对transaction的随机化,然后发送给drv
https://www.cnblogs.com/bai2022/p/15973391.html
image

uvm_do*相关宏

宏是可以使用seq或者item作为参数的。
uvm_do_pri*和seqr的仲裁相关,其中的ARB宏有变更(uvm1.2)
image

drv的seq_item_port和seqr的seq_item_export连接

二者时间存在一个握手关系,drv发送item_done后,seqr才丢弃要发的item,否则保持。
如:https://gitee.com/bai-mengwei/uvm_practive_first/blob/master/my_agent.sv#L34

uvm1.1使用的default_sequence

如:https://gitee.com/bai-mengwei/sy_uvm_tb/blob/main/inout_agent.sv#L49
其中的参数为uvm_object_wrapper,为seq.get_type()的类型

        uvm_config_db#(uvm_object_wrapper)::set(this, "seqr.main_phase", "default_sequence", seq.get_type());

phase的raise和drop的位置:

  1. scoreborad中,当覆盖率完全,则drop
  2. seq中,使用starting_phase进行raise和drop
  3. 在test_case中,对vseq进行riase和drop

uvm的顶层

uvm_root是component,
uvm_top是一个全局变量,是uvm_root的一个实例,也是uvm_root唯一的实例.
https://www.cnblogs.com/csjt/p/15560173.html

uvm_test_top实例化时的名字是uvm_test_top,这个名字是由UVM在run_test时自动指定的
括号内为类名,括号上面为实例
image

uvm_component_utils_begin与end的方法

方法中不包括clone函数,但是有copy函数

get、put、transport和port、export、imp的关系

二者的关系排列组合,形成tlm的端口。
形成端口后,使用port作为动作的发起者,使用前者的get、put、transport决定数据的流向,或者发送数据,或者获取数据。
如:drv与seqr,drv通过get_next_item方法,获取数据。

uvm_tlm_analysis_fifo是fifo,有特殊的连接关系,作为cache一样使用
P35页最下

phase的jump区域

uvm_pre_reset_phase以及后续的所有phase
使用phase.jump控制
+UVM_PHASE_TRACE可以查看phase的执行顺序

common_domain

为组件的公共phase执行区域,
新增phase的区域后,在connect中设置,可以实现域隔离。

超时退出

uvm_top.set_timeout

m_sequencer的类型

uvm_sequencer_param_base类型

drv到seq的通信

drv:
rsp.set_id_info(req)
seq_item_port.put_response(rsp)
seq:
get_response(rsp);
https://www.cnblogs.com/bai2022/p/15978406.html

寄存器模型

https://www.cnblogs.com/bai2022/p/15986731.html
https://www.cnblogs.com/bai2022/p/15978406.html
RBR::type_id::creaet("RBR", get_full_name())
RBR.configure(this, null, "HDL_PATH")
RBR.build()
RBR.add_hdl_path_slice("FIELD_NAME", base_number, width);

git的reflog

回退分支后,可以找到原来的分支头

posted @ 2022-08-11 23:13  大浪淘沙、  阅读(138)  评论(0)    收藏  举报