文件:

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事务级建模方法(三)的更多相关文章

  1. uvm_tlm——TLM1事务级建模方法(一)

    TLM(事务级建模方法,Transaction-level modeling)是一种高级的数字系统模型化方法,它将模型间的通信细节与函数单元或通信架构的细节分离开来.通信机制(如总线或者FIFO)被建 ...

  2. uvm_port_base——TLM1事务级建模方法(五)

    文件: src/tlm1/uvm_port_base.svh 类: uvm_port_base uvm_port_component_base派生自uvm_component,因此具有其所有特性.提供 ...

  3. uvm_analysis_port——TLM1事务级建模方法(二)

    UVM中的TLM1端口,第一类是用于uvm_driver 和uvm_sequencer连接端口,第二类是用于其他component之间连接的端口,如uvm_monitor和uvm_scoreboard ...

  4. uvm_sqr_ifs——TLM1事务级建模方法(四)

    与uvm_tlm_if_base 一样,这个类也没有派生自任何类,定义了如下几个接口:get_next_item, try_next_item, item_done, get, peek, put, ...

  5. RDIFramework.NET V2.7 Web版本升手风琴+树型目录(2级+)方法

    RDIFramework.NET V2.7 Web版本升手风琴+树型目录(2级+)方法 手风琴风格在Web应用非常的普遍,越来越多的Web应用都是采用这种方式来体现各个功能模块,传统的手风琴风格只支持 ...

  6. spring事务详解(三)源码详解

    系列目录 spring事务详解(一)初探事务 spring事务详解(二)简单样例 spring事务详解(三)源码详解 spring事务详解(四)测试验证 spring事务详解(五)总结提高 一.引子 ...

  7. RDIFramework.NET V2.7 Web版本号升手风琴+树型文件夹(2级+)方法

    级+)"界面风格,以展示多级功能菜单,满足用户的要求.Web展示效果例如以下: 要以"手风琴+树型文件夹(2级+)"的风格来展示功能模块,我们须要在"系统配置& ...

  8. 基于点云的3ds Max快速精细三维建模方法及系统的制作方法 插件开发

                                 基于点云的3ds Max快速精细三维建模方法及系统的制作方法[技术领域][0001]本发明涉及数字城市三维建模领域,尤其涉及一种基于点云的3d ...

  9. hive建模方法

    转自:https://www.jianshu.com/p/8378b80e4b21 概述数据仓库这个概念是由 Bill Inmon 所提出的,其功能是将组织通过联机事务处理(OLTP)所积累的大量的资 ...

随机推荐

  1. 35.windows提权总结

    本文参考自冷逸大佬的博客,源地址在这里:https://lengjibo.github.io/windows%E6%8F%90%E6%9D%83%E6%80%BB%E7%BB%93/ windows提 ...

  2. 7.25实习培训日志-Oracle SQL(一)

    Oracle SQL(一) 重点 尽量避免select *,影响性能,不直观. 慎用Distinct,会排序,影响性能,用exists 排序尽量利用索引,索引有序 索引列不要加函数,会使索引失效 外连 ...

  3. 基于FormsAuthentication的用户、角色身份认证(转)

    一般情况下,在我们做访问权限管理的时候,会把用户的正确登录后的基本信息保存在Session中,以后用户每次请求页面或接口数据的时候,拿到 Session中存储的用户基本信息,查看比较他有没有登录和能否 ...

  4. CodeForces 104C【树特性】

    题意: 判断这副图是否满足根是一个环的缩点,然后其余点都是一个点,满足树特性. 思路: 一开始就像无向图缩点乱搞,然后实在太烦搞不下去.... 一副图是满足结点和边数量相等,且连通,则一定有一个环. ...

  5. Android代码笔记

    1. 如何监听Android的短信收发,自动填充验证码? getContentResolver().registerContentObserver(Uri.parse(SMS_URI_ALL), tr ...

  6. 转载 jQuery 整理的很详细,基本都在里面

    jQuery 函数     CSS 函数 $(a).css(name)     获取name属性值 $(a). css(name,value)      设置name的属性值 $(a).css({}) ...

  7. HDU1729 Stone Game

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1729 思路:理解错题目了,以为SG模板直接套就行了.后来队友说了那个ci是不断变化的.那么每次可以放的石头 ...

  8. ch8 -- directMethod

    稀疏直接法 主要用的g2o的方法.自己定义了一个新的一元边.边的误差项是测量值和由估计得来的x,y对应的灰度值之间的误差.导数为灰度对像素坐标的导数乘以像素坐标对yi*李代数的导数的负数.灰度对于像素 ...

  9. nagios部署配置流程

    nagios部署配置流程 nagios服务端:1.部署nagios服务端(参考nagios官方部署文档).nagios-plugin.php.apache2 2.需要在服务端添/etc/hosts中添 ...

  10. linux开机出现Give root password for maintenance (or type Control-D to continue):解决办法

    修改rc.local后导致 linux开机出现Give root password for maintenance,而且很多系统文件无法修改,之前的rc.local也不能修改了,单用户模式也无法进入 ...