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

`define UVM_SEQ_ITEM_TASK_ERROR "Sequencer interface task not implemented"
`define UVM_SEQ_ITEM_FUNCTION_ERROR "Sequencer interface function not implemented" //------------------------------------------------------------------------------
//
// CLASS: uvm_sqr_if_base #(REQ,RSP)
//
// This class defines an interface for sequence drivers to communicate with
// sequencers. The driver requires the interface via a port, and the sequencer
// implements it and provides it via an export.
//
//------------------------------------------------------------------------------ virtual class uvm_sqr_if_base #(type T1=uvm_object, T2=T1); // Task: get_next_item
//
// Retrieves the next available item from a sequence. The call will block
// until an item is available. The following steps occur on this call:
//
// 1 - Arbitrate among requesting, unlocked, relevant sequences - choose the
// highest priority sequence based on the current sequencer arbitration
// mode. If no sequence is available, wait for a requesting unlocked
// relevant sequence, then re-arbitrate.
// 2 - The chosen sequence will return from wait_for_grant
// 3 - The chosen sequence <uvm_sequence_base::pre_do> is called
// 4 - The chosen sequence item is randomized
// 5 - The chosen sequence <uvm_sequence_base::post_do> is called
// 6 - Return with a reference to the item
//
// Once <get_next_item> is called, <item_done> must be called to indicate the
// completion of the request to the sequencer. This will remove the request
// item from the sequencer FIFO. virtual task get_next_item(output T1 t);
uvm_report_error("get_next_item", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Task: try_next_item
//
// Retrieves the next available item from a sequence if one is available.
// Otherwise, the function returns immediately with request set to ~null~.
// The following steps occur on this call:
//
// 1 - Arbitrate among requesting, unlocked, relevant sequences - choose the
// highest priority sequence based on the current sequencer arbitration
// mode. If no sequence is available, return ~null~.
// 2 - The chosen sequence will return from wait_for_grant
// 3 - The chosen sequence <uvm_sequence_base::pre_do> is called
// 4 - The chosen sequence item is randomized
// 5 - The chosen sequence <uvm_sequence_base::post_do> is called
// 6 - Return with a reference to the item
//
// Once <try_next_item> is called, <item_done> must be called to indicate the
// completion of the request to the sequencer. This will remove the request
// item from the sequencer FIFO. virtual task try_next_item(output T1 t);
uvm_report_error("try_next_item", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Function: item_done
//
// Indicates that the request is completed to the sequencer. Any
// <uvm_sequence_base::wait_for_item_done>
// calls made by a sequence for this item will return.
//
// The current item is removed from the sequencer FIFO.
//
// If a response item is provided, then it will be sent back to the requesting
// sequence. The response item must have its sequence ID and transaction ID
// set correctly, using the <uvm_sequence_item::set_id_info> method:
//
//| rsp.set_id_info(req);
//
// Before <item_done> is called, any calls to peek will retrieve the current
// item that was obtained by <get_next_item>. After <item_done> is called, peek
// will cause the sequencer to arbitrate for a new item. virtual function void item_done(input T2 t = null);
uvm_report_error("item_done", `UVM_SEQ_ITEM_FUNCTION_ERROR, UVM_NONE);
endfunction // Task: wait_for_sequences
//
// Waits for a sequence to have a new item available. The default
// implementation in the sequencer calls
// <uvm_wait_for_nba_region>.
// User-derived sequencers
// may override its <wait_for_sequences> implementation to perform some other
// application-specific implementation. virtual task wait_for_sequences();
uvm_report_error("wait_for_sequences", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Function: has_do_available
//
// Indicates whether a sequence item is available for immediate processing.
// Implementations should return 1 if an item is available, 0 otherwise. virtual function bit has_do_available();
uvm_report_error("has_do_available", `UVM_SEQ_ITEM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction //-----------------------
// uvm_tlm_blocking_slave_if
//----------------------- // Task: get
//
// Retrieves the next available item from a sequence. The call blocks until
// an item is available. The following steps occur on this call:
//
// 1 - Arbitrate among requesting, unlocked, relevant sequences - choose the
// highest priority sequence based on the current sequencer arbitration
// mode. If no sequence is available, wait for a requesting unlocked
// relevant sequence, then re-arbitrate.
// 2 - The chosen sequence will return from <uvm_sequence_base::wait_for_grant>
// 3 - The chosen sequence <uvm_sequence_base::pre_do> is called
// 4 - The chosen sequence item is randomized
// 5 - The chosen sequence <uvm_sequence_base::post_do> is called
// 6 - Indicate <item_done> to the sequencer
// 7 - Return with a reference to the item
//
// When get is called, <item_done> may not be called. A new item can be
// obtained by calling get again, or a response may be sent using either
// <put>, or uvm_driver::rsp_port.write(). virtual task get(output T1 t);
uvm_report_error("get", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Task: peek
//
// Returns the current request item if one is in the sequencer FIFO. If no
// item is in the FIFO, then the call will block until the sequencer has a new
// request. The following steps will occur if the sequencer FIFO is empty:
//
// 1 - Arbitrate among requesting, unlocked, relevant sequences - choose the
// highest priority sequence based on the current sequencer arbitration mode.
// If no sequence is available, wait for a requesting unlocked relevant
// sequence, then re-arbitrate.
//
// 2 - The chosen sequence will return from <uvm_sequence_base::wait_for_grant>
// 3 - The chosen sequence <uvm_sequence_base::pre_do> is called
// 4 - The chosen sequence item is randomized
// 5 - The chosen sequence <uvm_sequence_base::post_do> is called
//
// Once a request item has been retrieved and is in the sequencer FIFO,
// subsequent calls to peek will return the same item. The item will stay in
// the FIFO until either get or <item_done> is called. virtual task peek(output T1 t);
uvm_report_error("peek", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Task: put
//
// Sends a response back to the sequence that issued the request. Before the
// response is put, it must have its sequence ID and transaction ID set to
// match the request. This can be done using the
// <uvm_sequence_item::set_id_info> call:
//
// rsp.set_id_info(req);
//
// While this is a task, it will not consume time (including delta cycles).
// The response will be put into the
// sequence response queue or it will be sent to the
// sequence response handler.
// virtual task put(input T2 t);
uvm_report_error("put", `UVM_SEQ_ITEM_TASK_ERROR, UVM_NONE);
endtask // Function: put_response
//
// Sends a response back to the sequence that issued the request. Before the
// response is put, it must have its sequence ID and transaction ID set to
// match the request. This can be done using the
// <uvm_sequence_item::set_id_info> call:
//
// rsp.set_id_info(req);
// virtual function void put_response(input T2 t);
uvm_report_error("put_response", `UVM_SEQ_ITEM_FUNCTION_ERROR, UVM_NONE);
endfunction // Function: disable_auto_item_recording
//
// By default, item recording is performed automatically when
// get_next_item() and item_done() are called.
// However, this works only for simple, in-order, blocking transaction
// execution. For pipelined and out-of-order transaction execution, the
// driver must turn off this automatic recording and call
// <uvm_transaction::accept_tr>, <uvm_transaction::begin_tr>
// and <uvm_transaction::end_tr> explicitly at appropriate points in time.
//
// This methods be called at the beginning of the driver's ~run_phase()~ method.
// Once disabled, automatic recording cannot be re-enabled.
//
// For backward-compatibility, automatic item recording can be globally
// turned off at compile time by defining UVM_DISABLE_AUTO_ITEM_RECORDING virtual function void disable_auto_item_recording();
uvm_report_error("disable_auto_item_recording", `UVM_SEQ_ITEM_FUNCTION_ERROR, UVM_NONE);
endfunction // Function: is_auto_item_recording_enabled
//
// Return TRUE if automatic item recording is enabled for this port instance. virtual function bit is_auto_item_recording_enabled();
uvm_report_error("is_auto_item_recording_enabled", `UVM_SEQ_ITEM_FUNCTION_ERROR, UVM_NONE);
return ;
endfunction
endclass

uvm_sqr_ifs——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_tlm_if_base——TLM1事务级建模方法(三)

    文件: src/tlm1/uvm_tlm_ifs.svh 类: uvm_tlm_if_base 这个类没有派生自任何类,在类的中,定义了三类接口:第一类是阻塞性质的普通方法(task),put, ge ...

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

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

  5. spring事务详解(四)测试验证

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

  6. 事务的ACID和四个隔离级别

    在实际的业务场景中,并发读写引出了和事务控制的需求.优秀的事务处理能力是关系型数据库(特别是oracle等商用RDBMS)相对于正当风口的NoSQL数据库的一大亮点.但这也从另一方面说明了事务控制的复 ...

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

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

  8. 实用,小物体检测的有监督特征级超分辨方法 | ICCV 2019

    论文提出新的特征级超分辨方法用于提升检测网络的小物体检测性能,该方法适用于带ROI池化的目标检测算法.在VOC和COCO上的小物体检测最大有5~6%mAP提升,在Tsinghua-Tencent 10 ...

  9. [Fundamental of Power Electronics]-PART II-7. 交流等效电路建模-7.2 基本交流建模方法

    7.2 基本交流建模方法 在本节中,PWM变换器的交流小信号模型导出步骤将被推导和解释.关键步骤是:(a)利用小纹波近似的动态版本,建立了与电感和电容波形的低频平均值相关的方程式,(b)平均方程的扰动 ...

随机推荐

  1. 24.command-executor

    这里先给出题目链接: https://command-executor.hackme.inndy.tw/ 这是一道不错的ctf题,首先说一下考察点: 文件包含读源码 代码分析结合CVE CVE导致的命 ...

  2. easyui学习笔记1-(datagrid+dialog)

    jQuery EasyUI是一组基于jQuery的UI插件集合体.我的理解:jquery是js的插件,easyui是基于jquery的插件.用easyui可以很轻松的打造出功能丰富并且美观的UI界面. ...

  3. SDUT2140图结构练习——判断给定图是否存在合法拓扑序列

    拓扑序列的判断方法为不存在有向环,代码实现的话有两种,一种是直接去判断是否存在环,较为难理解一些,另一种的话去判断结点入度,如果存在的入度为0的点大于一个,则该有向图肯定不存在一个确定的拓扑序列 #i ...

  4. SQL Server事务回滚对自增键的影响

    SQL Server事务回滚时是删除原先插入导致的自增值,也就是回滚之前你你插入一条数据导致自增键加1,回滚之后还是加1的状态 --如果获取当前操作最后插入的identity列的值:select @@ ...

  5. superset 错误解决

    访问superset localhost:8088   securety->list Role 报错 xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx ...

  6. PPT2010学习笔记(共20讲)

    第1讲  商务PPT中的必备元素 # 设计需打破规范 第2讲  封面页设计(一) 大图型封面页 # 基础知识点: 插入矩形和圆形 设置半透明色 设置字体变形效果 图片增强工具 利用过渡色虚化图片边缘 ...

  7. PAT L2-014【二分】

    思路: 最后发现对当前列车比我大的编号的栈有没有就好了,所以开个vector存一下,然后二分一下vector找一下第一个比我大的数就好了 #include <bits/stdc++.h> ...

  8. 常见错误及处理-jsp及Servlet

    1.servlet输入出页面时,中文字符乱码 解决方法: 在Writer之前设置请求头: response.setHeader("Content-type", "text ...

  9. 洛谷P2484 [SDOI2011]打地鼠

    P2484 [SDOI2011]打地鼠 题目描述 打地鼠是这样的一个游戏:地面上有一些地鼠洞,地鼠们会不时从洞里探出头来很短时间后又缩回洞中.玩家的目标是在地鼠伸出头时,用锤子砸其头部,砸到的地鼠越多 ...

  10. 如何使用JDBC Request跨数据库查询后引用查询的结果作为下一个JDBC Request的入参

    [前言] 今天来给大家介绍下如何使用JDBC Request跨数据库查询后引用查询的结果作为下一个JDBC Request的入参! 因为我现在所测的系统模块中部分表在不同的数据库中,所以在用JDBC ...