uvm_cookbook--DUT-Testbench Connections--Abstract-Concrete Class Connections
抽象和具体class的连接
An alternative to using a virtual interface handle for DUT to UVM testbench connections is to use an abstract concrete class pair. The abstract version of the class defines templates for all the methods that are available in the BFM. The concrete version of the class is declared in the BFM and it extends the abstract version, providing an implementation of the methods. The handle of the concrete class is assigned to the abstract handle in the agent classes via the uvm_config_db. The properties of class object polymorphism allow the abstract class handle to interact with the BFM using the method implementations in the concrete version of the class.
If a class is defined inside an interface or a module, it can reference any of the variables within the interface or module scope. This can be used to simplify the handling of parameters.
The following code snippets show the Abstract and Concrete versions of the sfr_master class:
// The abstract class for the SFR master driver/BFM |
Note that in the above code, the BFM has been changed to a module from an interface, this is another freedom that using the abstract-concrete pattern enables. Modules allow the BFM to have hierarchy.
Inside the SFR agent classes, any reference to the BFM is via handles of the sfr_master_abstract type:在agent中,使用抽象类
class sfr_driver extends uvm_driver #(sfr_seq_item); |
The handle to the sfr_master_abstract object is passed via the agent config object via the uvm_config_db, note that in the following code snippet, the sfr_monitor uses the same connection pattern:
class sfr_test extends uvm_component; |
When the abstract-concrete class connection pattern is used, the agent does not have to be parameterised, since class handles are used to make the connection.
In summary, the abstract concrete class approach works by passing a class object handle from the hdl_top part of the testbench to the UVM testbench.
uvm_cookbook--DUT-Testbench Connections--Abstract-Concrete Class Connections的更多相关文章
- Configure the max limit for concurrent TCP connections(转)
To keep the TCP/IP stack from taking all resources on the computer, there are different parameters t ...
- 一步一步学习SignalR进行实时通信_2_Persistent Connections
原文:一步一步学习SignalR进行实时通信_2_Persistent Connections 一步一步学习SignalR进行实时通信\_2_Persistent Connections Signal ...
- 【转载】Configure the max limit for concurrent TCP connections
转载地址:http://smallvoid.com/article/winnt-tcpip-max-limit.html To keep the TCP/IP stack from taking al ...
- Concurrent HTTP connections in Node.js
原文: https://fullstack-developer.academy/concurrent-http-connections-in-node-js/ -------------------- ...
- 洛谷 P1197 BZOJ 1015 [JSOI2008]星球大战 (ZOJ 3261 Connections in Galaxy War)
这两道题长得差不多,都有分裂集合的操作,都是先将所有操作离线,然后从最后一步开始倒着模拟,这样一来,分裂就变成合并,也就是从打击以后最终的零散状态,一步步合并,回到最开始所有星球都被连为一个整体的状态 ...
- Thinkpad Access Connections实现快速的在各种网络间进行切换
Thinkpad Access Connections快速的在各种网络间进行切换 因为工作的原因要经常在多个无线或有线之间切换,每次要切换到不同的固定IP地址的网络更是一种折磨,换一次就要从新输入一次 ...
- Java性能提示(全)
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...
- httpcomponents-client-4.4.x
Chapter 1. Fundamentals Prev Next Chapter 1. Fundamentals 1.1. Request execution The most essent ...
- httpcomponents-client-ga(4.5)
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/ Chapter 1. Fundamentals Prev Next ...
随机推荐
- go中如果想要实现别人写的接口,如何保证确实实现了那个接口而不是错过了什么?
在类型的实现方法上定义通用代码指令 var _ 要实现的接口 = (receiver类型)(nil) 比如要定义一个web处理程序 type handler_def struct{} var _ ...
- DevExpress Silverlight DXChart特效总结
1. 主题修改 引用 xmlns:core=http://schemas.devexpress.com/winfx/2008/xaml/core 在Grid中添加core:ThemeManager ...
- CodeForce-734C Anton and Making Potions(贪心+二分)
CodeForce-734C Anton and Making Potions C. Anton and Making Potions time limit per test 4 seconds m ...
- Php实现简易购物商城系统
实现功能: 1.系统功能模块包括: 1)登陆注册模块 包括验证码.找回密码.注册模块中要使用Ajax判断用户名是否已经存在,使用正则表达式判断电子邮件.手机号和用户密码的格式是否合法. 2)用户管理模 ...
- 使用metaweblog API实现通用博客发布 之 版本控制
使用metaweblog API实现通用博客发布 之 版本控制 接上一篇本地图片自动上传以及替换路径,继续解决使用API发布博客的版本控制问题. 当本地文档修订更新以后,如何发现版本更新,并自动发布到 ...
- PHP的内置WEB服务器
在很多时候,我们需要简单的运行一个小 demo 来验证一些代码或者轮子是否可用,是否可以运行起来,但是去配 nginx 或者 apache 都很麻烦,其实,PHP CLI 已经提供了一个简单的测试服务 ...
- webpack learn2-vue的jsx写法和postcss 1
首先输入命令安装 npm i postcss-loader autoprefixer babel-loader babel-core 在根目录创建文件 .babelrc和postcss.config. ...
- 探究java的intern方法
本文主要解释java的intern方法的作用和原理,同时会解释一下经常问的String面试题. 首先先说一下结论,后面会实际操作,验证一下结论.intern方法在不同的Java版本中的实现是不一样的. ...
- Nginx系列(3)- 负载均衡
负载均衡 Nginx提供的负载均衡策略有两种: 内置策略为轮询.加权轮询.ip hash 扩展策略,就天马行空了,只有你想不到的没有它做不到的 轮询 加权轮询(根据权重来) iphash对客户端请求 ...
- tornado中通用模版
第一: 1.Pycharm新建python项目(不是django项目),在项目下面直接新建server.py,内容如下: 2.安装tornado, pip install tornado import ...