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 ...
随机推荐
- PHP的OpenSSL加密扩展学习(二):非对称加密
上篇文章,我们了解了关于对称和非对称加密的一些相关的理论知识,也学习了使用 OpenSSL 来进行对称加密的操作.今天,我们就更进一步,学习 OpenSSL 中的非对称加密是如何实现的. 生成私钥 通 ...
- php curl下载文件由于空格导致下载文件失败
<?php //$result=httpcopy('http://www.phpernote.com/image/logo.gif'); echo '<pre>';print_r($ ...
- 美团分布式定时调度框架XXL-Job基本使用
一:XXL JOB 基本使用 1.官方中文文档:https://www.xuxueli.com/xxl-job/ 2.基本环境: 2.1:git下载项目, 执行xxl-job数据库初始化脚本 2.2: ...
- javascript 标签切换
* index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=&q ...
- selenium+python处理Alert弹窗
from selenium import webdriver import win32api import win32con from time import sleep driver = webdr ...
- Python日常Bug集
1.TypeError: 'int' object is not iterable: 场景示例: data = 7 for i in data: print(i) # 原因:直接对int数据进行迭代造 ...
- Windows 11 正式版 Build 22000.194 官方简体中文版、英文版(消费者版、商业版)下载
昨天阿三正式发布了 Windows 11,版本号竟然是 22000.194,也就是 9 月 16 日的 测试版 22000.194,仅仅是文件改了个名,特别是消费者版本 hash 校验都是一致的. W ...
- FastAPI(64)- Settings and Environment Variables 配置项和环境变量
背景 在许多情况下,应用程序可能需要一些外部设置或配置,例如密钥.数据库凭据.电子邮件服务凭据等. 大多数这些设置都是可变的(可以更改),例如数据库 URL,很多可能是敏感数据,比如密码 出于这个原因 ...
- Java-多态(下)
多态 一种类型的多种状态 还有一个小汽车的例子再理解下 汽车接口(相当于父类) package com.oop.demo10; public interface Car { String getNam ...
- 手机淘宝轻店业务 Serverless 研发模式升级实践
一.前言 随着 Serverless 在业界各云平台落地,阿里内部 Serverless 研发平台.各种研发模式也在业务中逐步落地,如火如荼.在此契机下,淘系团队启动了轻店 Serverless 研发 ...