2)用is_active决定是否创建driver。is_acitve是uvm_agent的成员变量。uvm_agent.svh源代码如下: 3)uvm_active_passive_enum是枚举类型:原型为:(注释说通常用在agent) 4)uvm_agent中,is_active默认是UVM_ACTIVE,例化driver的。其实可以在is_active 中做别的,只是这个例子例化了driver。 5)UVM_PASSIVE的情况,agen...
因此,需要一个变量来控制agent的例化过程。 为了实现这一功能,UVM的agent自带一个成员变量is_active,该成员变量的类型是uvm_active_passive_enum。通过对这个变量进行判断,就能够改变agent例化时的行为。 当然,为了测试的灵活性,这个变量肯定需要想办法从更高层次的组件甚至是tb文件中获取。获取方式一般是直接使用config...
_env 7.uvm_test 这些组件源码,除了uvm_driver、uvm_agent、uvm_subscriber中增补定义了部分变量,以提高代码的可重用性之外,其余组件源码的内容..._agent uvm_agent中定义了is_active变量,默认值为UVM_ACTIVE; 4.uvm_scoreboard 5.uvm_subscriber(coverage) ...
// Name string argument is the same as the handle name // The parent argument is 'this' - i.e. the spi_env // // The spi_env has a hierarchical path string "uvm_test_top.m_env" // is concatenated with the name string to arrive at // "uvm_test_top.m_env.m_apb_agent" as...
is_active 是 agent 的一个成员,默认值是UVM_ACTIVE, 这表示处在 active 模式的 agent 需要例化 driver、 monitor 和 sequencer; 而如果 is_active 的值是UVM_PASSIVE 则表示 agent 是 passive 模式, 只可以例化 monitor。 active 模式的 agent 既有激励功能也有监测功能, passive 模式的 agent 只具有监测功能...
uvm_agent 里多了一个is_active的成员。一般根据这个active来决定是否实例化driv 7、er和sequencer. is_active变量的数值需要在 env的build_phase里设置完成(可以直接设 置,也可以用 uvm_config_db#(int):set )。env 要派生自 uvm_env. uvm_env 没有对 uvm_component 扩展。src/comps/所有的test都要派生自...
团伙agent。同时为了复用,有的时候uvm_agent中只需要包含一个monitor,而不需要driver和sequencer,这就需要通过一个变量来进行有条件的例化...is_active变量,agent需要在build_phase()和connect_phase()等函数中通过选择语句来对driver和sequencer进行有条件的例化和连接。下面这段例码是个如何对agent智能...
if(is_active == UVM_ACTIVE)begin driver = my_driver::type_id::create("driver", this); sequencer = my_sequencer#(my_trans)::type_id::create("sequencer", this); end endfunction // build_phase // UVM Connect phase function void connect_phase(uvm_phase phase); super.connect_phase(ph...
参数agent_is_active可以设置为UVM_ACTIVE或UVM_PASSIVE。默认值为 UVM_ACTIVE。将 agent_is_active 标志设置为 UVM_PASSIVE 就是通过配置顶层验证环境来实现的。 Filename clkndata.tpl ... agent_is_active = UVM_PASSIVE ... Filename top_tb.sv ...
参数agent_is_active可以设置为UVM_ACTIVE或UVM_PASSIVE。默认值为 UVM_ACTIVE。将 agent_is_active 标志设置为 UVM_PASSIVE 就是通过配置顶层验证环境来实现的。 Filename clkndata.tpl ... agent_is_active = UVM_PASSIVE ... Filename top_tb.sv ...