uvm_tlm_if_base——TLM1事务级建模方法(三)
文件:
src/tlm1/uvm_tlm_ifs.svh
类:
uvm_tlm_if_base
这个类没有派生自任何类,在类的中,定义了三类接口:第一类是阻塞性质的普通方法(task),put, get, peek, transport(T1, T2). 第二类是非阻塞性质的普通方法(function),try_put, try_get, try_peek, nb_transport(T1, T2). 还有can_put, can_get, can_peek. 第三类是用于广播的write, 是属于analysis的,向所有连接的port写。这是一个function. 这三类接口都必须要在派生类中重新定义,直接使用会报错误。
`define UVM_TASK_ERROR "TLM interface task not implemented"
`define UVM_FUNCTION_ERROR "TLM interface function not implemented" //-----------------------------------------------------------------------------
//
// CLASS: uvm_tlm_if_base #(T1,T2)
//
// This class declares all of the methods of the TLM API.
//
// Various subsets of these methods are combined to form primitive TLM
// interfaces, which are then paired in various ways to form more abstract
// "combination" TLM interfaces. Components that require a particular interface
// use ports to convey that requirement. Components that provide a particular
// interface use exports to convey its availability.
//
// Communication between components is established by connecting ports to
// compatible exports, much like connecting module signal-level output ports to
// compatible input ports. The difference is that UVM ports and exports bind
// interfaces (groups of methods), not signals and wires. The methods of the
// interfaces so bound pass data as whole transactions (e.g. objects).
// The set of primitive and combination TLM interfaces afford many choices for
// designing components that communicate at the transaction level.
//
//----------------------------------------------------------------------------- virtual class uvm_tlm_if_base #(type T1=int, type T2=int); // Group: Blocking put // Task: put
//
// Sends a user-defined transaction of type T.
//
// Components implementing the put method will block the calling thread if
// it cannot immediately accept delivery of the transaction. virtual task put( input T1 t );
uvm_report_error("put", `UVM_TASK_ERROR, UVM_NONE);
endtask // Group: Blocking get // Task: get
//
// Provides a new transaction of type T.
//
// The calling thread is blocked if the requested transaction cannot be
// provided immediately. The new transaction is returned in the provided
// output argument.
//
// The implementation of get must regard the transaction as consumed.
// Subsequent calls to get must return a different transaction instance. virtual task get( output T2 t );
uvm_report_error("get", `UVM_TASK_ERROR, UVM_NONE);
endtask // Group: Blocking peek // Task: peek
//
// Obtain a new transaction without consuming it.
//
// If a transaction is available, then it is written to the provided output
// argument. If a transaction is not available, then the calling thread is
// blocked until one is available.
//
// The returned transaction is not consumed. A subsequent peek or get will
// return the same transaction. virtual task peek( output T2 t );
uvm_report_error("peek", `UVM_TASK_ERROR, UVM_NONE);
endtask // Group: Non-blocking put // Function: try_put
//
// Sends a transaction of type T, if possible.
//
// If the component is ready to accept the transaction argument, then it does
// so and returns 1, otherwise it returns 0. virtual function bit try_put( input T1 t );
uvm_report_error("try_put", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Function: can_put
//
// Returns 1 if the component is ready to accept the transaction; 0 otherwise. virtual function bit can_put();
uvm_report_error("can_put", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Group: Non-blocking get // Function: try_get
//
// Provides a new transaction of type T.
//
// If a transaction is immediately available, then it is written to the output
// argument and 1 is returned. Otherwise, the output argument is not modified
// and 0 is returned. virtual function bit try_get( output T2 t );
uvm_report_error("try_get", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Function: can_get
//
// Returns 1 if a new transaction can be provided immediately upon request,
// 0 otherwise. virtual function bit can_get();
uvm_report_error("can_get", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Group: Non-blocking peek // Function: try_peek
//
// Provides a new transaction without consuming it.
//
// If available, a transaction is written to the output argument and 1 is
// returned. A subsequent peek or get will return the same transaction. If a
// transaction is not available, then the argument is unmodified and 0 is
// returned. virtual function bit try_peek( output T2 t );
uvm_report_error("try_peek", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Function: can_peek
//
// Returns 1 if a new transaction is available; 0 otherwise. virtual function bit can_peek();
uvm_report_error("can_ppeek", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Group: Blocking transport // Task: transport
//
// Executes the given request and returns the response in the given output
// argument. The calling thread may block until the operation is complete. virtual task transport( input T1 req , output T2 rsp );
uvm_report_error("transport", `UVM_TASK_ERROR, UVM_NONE);
endtask // Group: Non-blocking transport // Task: nb_transport
//
// Executes the given request and returns the response in the given output
// argument. Completion of this operation must occur without blocking.
//
// If for any reason the operation could not be executed immediately, then
// a 0 must be returned; otherwise 1. virtual function bit nb_transport(input T1 req, output T2 rsp);
uvm_report_error("nb_transport", `UVM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction // Group: Analysis // Function: write
//
// Broadcasts a user-defined transaction of type T to any number of listeners.
// The operation must complete without blocking. virtual function void write( input T1 t );
uvm_report_error("write", `UVM_FUNCTION_ERROR, UVM_NONE);
endfunction endclass
uvm_tlm_if_base——TLM1事务级建模方法(三)的更多相关文章
- uvm_tlm——TLM1事务级建模方法(一)
TLM(事务级建模方法,Transaction-level modeling)是一种高级的数字系统模型化方法,它将模型间的通信细节与函数单元或通信架构的细节分离开来.通信机制(如总线或者FIFO)被建 ...
- uvm_port_base——TLM1事务级建模方法(五)
文件: src/tlm1/uvm_port_base.svh 类: uvm_port_base uvm_port_component_base派生自uvm_component,因此具有其所有特性.提供 ...
- uvm_analysis_port——TLM1事务级建模方法(二)
UVM中的TLM1端口,第一类是用于uvm_driver 和uvm_sequencer连接端口,第二类是用于其他component之间连接的端口,如uvm_monitor和uvm_scoreboard ...
- uvm_sqr_ifs——TLM1事务级建模方法(四)
与uvm_tlm_if_base 一样,这个类也没有派生自任何类,定义了如下几个接口:get_next_item, try_next_item, item_done, get, peek, put, ...
- RDIFramework.NET V2.7 Web版本升手风琴+树型目录(2级+)方法
RDIFramework.NET V2.7 Web版本升手风琴+树型目录(2级+)方法 手风琴风格在Web应用非常的普遍,越来越多的Web应用都是采用这种方式来体现各个功能模块,传统的手风琴风格只支持 ...
- spring事务详解(三)源码详解
系列目录 spring事务详解(一)初探事务 spring事务详解(二)简单样例 spring事务详解(三)源码详解 spring事务详解(四)测试验证 spring事务详解(五)总结提高 一.引子 ...
- RDIFramework.NET V2.7 Web版本号升手风琴+树型文件夹(2级+)方法
级+)"界面风格,以展示多级功能菜单,满足用户的要求.Web展示效果例如以下: 要以"手风琴+树型文件夹(2级+)"的风格来展示功能模块,我们须要在"系统配置& ...
- 基于点云的3ds Max快速精细三维建模方法及系统的制作方法 插件开发
基于点云的3ds Max快速精细三维建模方法及系统的制作方法[技术领域][0001]本发明涉及数字城市三维建模领域,尤其涉及一种基于点云的3d ...
- hive建模方法
转自:https://www.jianshu.com/p/8378b80e4b21 概述数据仓库这个概念是由 Bill Inmon 所提出的,其功能是将组织通过联机事务处理(OLTP)所积累的大量的资 ...
随机推荐
- p2371&bzoj2118 墨墨的等式
传送门(bzoj) 题目 墨墨突然对等式很感兴趣,他正在研究a1x1+a2y2+…+anxn=B存在非负整数解的条件,他要求你编写一个程序,给定N.{an}.以及B的取值范围,求出有多少B可以使等式存 ...
- hdu1068
#include<stdio.h>#include<string.h>const int MAXN=1000;int map[MAXN][MAXN];int n;int lin ...
- HTML5 & CSS3编程入门经典 ((美)Rob Larsen) pdf扫描版
HTML和CSS是构建网页所需要了解的两种核心编程语言,拉尔森编著的这本<HTML5&CSS3编程入门经典>详细介绍了这两种语言. <HTML5&CSS3编程入门经典 ...
- OpenStack 负载均衡底层命令创建流程
1.创建负载均衡器pool-------------不支持高可用的负载均衡器 neutron lb-pool-create --lb-method ROUND_ROBIN --name mypool- ...
- 飘逸的python - @staticmethod和@classmethod的作用与区别
一般来说,要使用某个类的方法,需要先实例化一个对象再调用方法. 而使用@staticmethod或@classmethod,就可以不需要实例化,直接类名.方法名()来调用. 这有利于组织代码,把某些应 ...
- 2017乌鲁木齐区域赛K(容斥原理【求指定区间内与n互素的数的个数】)
#include<bits/stdc++.h>using namespace std;const long long mod = 998244353;typedef const long ...
- 初识Scrapy之再续火影情缘
前言Scrapy框架之初窥门径1 Scrapy简介2 Scrapy安装3 Scrapy基础31 创建项目32 Shell分析4 Scrapy程序编写41 Spiders程序测试42 Items编写43 ...
- UVa 10652(旋转、凸包、多边形面积)
要点 凸包显然 长方形旋转较好的处理方式就是用中点的Vector加上旋转的Vector,然后每个点都扔到凸包里 多边形面积板子求凸包面积即可 #include <cstdio> #incl ...
- django--权限(1)初识
一.权限表结构设计 1.认识权限 生活中处处有权限,比如,腾讯视频开会员才有观看某个最新电影的权限,你有房间钥匙就有了进入这个房间的权限,等等.同样,程序开发过程中也有权限,我们今天说的权限指的是we ...
- SocLib能耗评估
相关论文链接: https://ac.els-cdn.com/S0167926015000231/1-s2.0-S0167926015000231-main.pdf?_tid=4a67f1a4-b21 ...