uvm_object_string_pool的KEY是string类型。 uvm_event_pool由uvm_object_string_pool #(uvm_event)声明,KEY是string类型,T是uvm_event类型。 uvm_event是sv中event的class warpper,内建了很多方法。 # uvm_pool.svh class uvm_object_string_pool #(type T=uvm_object) extends uvm_pool #(string,T); .....
uvm_pool.svh中实现了两个class,其一是uvm_pool,另一是在uvm_pool基础上派生出可通过字符串对动态关联数组进行索引的通用类uvm_object_string_pool。uvm中用到uvm_object_string_pool的地方有uvm_event_pool、uvm_barrier_pool等。 uvm_pool直接派生自uvm_object,实现了一个动态关联数组的基类,可根据需求对稀疏...
首先寄存器模型将HDL路径以字符串的形式存储在队列中,这个队列又作为uvm_object_string_pool键值对中的值存储在hdl_paths_pool中,默认的键(key)是"RTL"。如图12所示。 图12 src/reg/uvm_reg_block.svh中存储HDL路径的键值对 我们可以通过调用add_hdl_path来添加寄存器模型的HDL路径,如图13所示,添加HDL路径可以指...
event无法携带更多的信息,而uvm_event可以通过trigger(uvm_event data = null)的可选参数,将所要伴随触发的数据信息都写入到该触发事件中,而等待该事件的对象可以通过方法wait_trigger_data(output uvm_object data)来获取事件触发时写入的数据对象。这实际上是一个句柄的传递,句柄的类型是uvm_object,也就是说传递...
以uvm_event#(uvm_object)作为参数,继承自uvm_object_string_pool,该类的继承关系如下图所示: uvm_object_string_pool#(T)包含的常用方法有:get()、delete()等。 get()根据输入字符串返回一个T类型的对象,delete()删除指定字符串的对象。 uvm_event_pool机制可以方便uvm_event在环境搭建过程中的使用, 可以很...
classuvm_object_string_pool#(type T=uvm_object) extends uvm_pool #(string,T); typedefuvm_object_string_pool#(T)this_type; staticprotectedthis_type m_global_pool; // Function: new // Creates a new pool with the given ~name~.
(1)不同的组件可以共享同一个uvm_event,这不需要通过跨层次传递uvm_event对象句柄来实现共享的,因为这并不符合组件环境封闭的原则。这种共享同一个uvm_event对象是通过uvm_event_pool这一全局资源池来实现的。 (2) uvm_event_pool这个资源池类是uvm_object_string_pool #(T)的子类,它可以生成和获取通过字符串...
(1)不同的组件可以共享同一个uvm_event,这不需要通过跨层次传递uvm_event对象句柄来实现共享的,因为这并不符合组件环境封闭的原则。这种共享同一个uvm_event对象是通过uvm_event_pool这一全局资源池来实现的。 (2) uvm_event_pool这个资源池类是uvm_object_string_pool #(T)的子类,它可以生成和获取通过字符串...
不同组件可以共享同一个 uvm_event, 这不需要通过跨层次传递 uvm_event 对象句柄来实现共享, 因为这不符合组件环境封闭的原则, 该共享方式是通过 uvm_event_pool 这一全局资源池来实现的。这个资源池类是 uvm_object_string_pool #(T)的子类, 它可以生成和获取通过字符串来索引的 uvm_event 对象。通过全局资源...
uvm_config_db传入的参数类型是uvm_object_wrapper, 通过 ”::" 调用静态方法 set() 。 静态类 static也可以声明class, 表示静态类。静态类和静态变量类似,只不过静态类可以封装更多内容。声明静态类的class, 该class的所有实例都可以共享这一个静态类。更多内容UVM设计模式 (三) 静态类、资源管理、uvm_*_pool...