文件:

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. redis学习总结2

    redis配置文件说明:以下这篇文章已经说明的很明白了.感谢~ http://blog.sina.com.cn/s/blog_636415010101970j.html

  2. hdu1074

    #include <iostream> #include <string> #include <cstring> #include <stack> #i ...

  3. WPF的TextBox产生内存泄露的情况

    前段时间参与了一个WPF编写的项目,在该项目中有这样一个场景:在程序运行过程中需要动态地产生大量文本信息,并追加WPF界面上的一个TextBox的Text中进行显示.编写完之后,运行该项目的程序,发现 ...

  4. jquery对象访问

    jquery对象访问 方法名 说明 语法 (callback 执行的函数,object指定元素的对象.) each() 用于以当前jQuery对象匹配到的每个元素作为上下文来遍历执行指定的函数 jQu ...

  5. python接口自动化(三十五)-封装与调用--流程类接口关联(详解)

    简介 流程相关的接口,主要用 session 关联,如果写成函数(如上篇),s 参数每个函数都要带,每个函数多个参数,这时候封装成类会更方便.在这里我们还是以博客园为例,带着小伙伴们实践一下. 接口封 ...

  6. Boost Python官方样例(三)

    导出C++类(纯虚函数和虚函数) 大致做法就是为class写一个warp,通过get_override方法检测虚函数是否被重载了,如果被重载了调用重载函数,否则调用自身实现,最后导出的时候直接导出wa ...

  7. uva12545 比特变换器(贪心)

    uva12545 比特变换器(贪心) 输入两个等长的串S,T(长度小于100),其中S包含字符0,1,?,T中包含0和1.有三种操作:将S中的0变为1,?变为0或1,交换S中的任意两个字符.求将S变成 ...

  8. 使用poi导出Excel表格,jar包冲突

    HTTP Status 500 – Internal Server Error Type Exception Report Message Handler processing failed; nes ...

  9. thinkphp5.1composer引入第三方类库使用注意

    下面以引入phpspider为例子: composer引入: composer require owner888/phpspider 这时在vender目录下会多出一个owner888目录,里面就有我 ...

  10. C# Thread类 线程优先级

    1.C#对线程进行操作时,通过Thread类,可以对线程进行创建.挂起.恢复.休眠.终止及设置优先级. Thread类位于System.Threading命名空间下,该命名空间还包含一个ThreadP ...