Containers
Container类定义了参数化的数据结构,以实现比systemverilog更高效的数据共享:原因在于Container类之间的复制是基于reference的拷贝,而不是基于原始数据。
uvm_queue #(T)和systemverilog中的queue类似;
uvm_pool #(T)和systemverilog中的associative array类似
uvm_pool
class uvm_pool #(type KEY=int, T=uvm_void) extends uvm_object;
预定义
变量
const static string type_name="uvm_pool";
typedef uvm_pool #(KEY,T) this_type;
static protected this_type m_global_pool;
protected T pool[KEY];
function
1. static function this_type get_global_pool;
获取全局唯一的pool(资源池)
m_global_pool非null ,返回m_global_pool
2.static function T get_global(KEY key);
获取全局唯一的资源(T对象,即pool【key】)
3. virtual function T get (KEY key);
如果pool中无key,给pool[key] = default_value;
return ool[key];