文件:
src/base/uvm_transaction.svh
类: 
uvm_transaction
 
  uvm_transaction继承自uvm_object,添加了timing和recording接口,该类是uvm_sequence_item的基类。这个类提供了时间戳属性(timestamp properties),通知事件(notification events),和交易记录(transaction recording)支持。其子类uvm_sequence_item应当作为基类为所有用户定义的事务类型。

  1. //------------------------------------------------------------------------------
  2. //
  3. // CLASS: uvm_transaction
  4. //
  5. // The uvm_transaction class is the root base class for UVM transactions.
  6. // Inheriting all the methods of <uvm_object>, uvm_transaction adds a timing and
  7. // recording interface.
  8. //
  9. // This class provides timestamp properties, notification events, and transaction
  10. // recording support.
  11. //
  12. // Use of this class as a base for user-defined transactions
  13. // is deprecated. Its subtype, <uvm_sequence_item>, shall be used as the
  14. // base class for all user-defined transaction types.
  15. //
  16. // The intended use of this API is via a <uvm_driver #(REQ,RSP)> to call <uvm_component::accept_tr>,
  17. // <uvm_component::begin_tr>, and <uvm_component::end_tr> during the course of
  18. // sequence item execution. These methods in the component base class will
  19. // call into the corresponding methods in this class to set the corresponding
  20. // timestamps (~accept_time~, ~begin_time~, and ~end_time~), trigger the
  21. // corresponding event (<begin_event> and <end_event>, and, if enabled,
  22. // record the transaction contents to a vendor-specific transaction database.
  23. //
  24. // Note that get_next_item/item_done when called on a uvm_seq_item_pull_port
  25. // will automatically trigger the begin_event and end_events via calls to begin_tr and end_tr.
  26. // While convenient, it is generally the responsibility of drivers to mark a
  27. // transaction's progress during execution. To allow the driver or layering sequence
  28. // to control sequence item timestamps, events, and recording, you must call
  29. // <uvm_sqr_if_base#(REQ,RSP)::disable_auto_item_recording> at the beginning
  30. // of the driver's ~run_phase~ task.
  31. //
  32. // Users may also use the transaction's event pool, <events>,
  33. // to define custom events for the driver to trigger and the sequences to wait on. Any
  34. // in-between events such as marking the beginning of the address and data
  35. // phases of transaction execution could be implemented via the
  36. // <events> pool.
  37. //
  38. // In pipelined protocols, the driver may release a sequence (return from
  39. // finish_item() or it's `uvm_do macro) before the item has been completed.
  40. // If the driver uses the begin_tr/end_tr API in uvm_component, the sequence can
  41. // wait on the item's <end_event> to block until the item was fully executed,
  42. // as in the following example.
  43. //
  44. //| task uvm_execute(item, ...);
  45. //| // can use the `uvm_do macros as well
  46. //| start_item(item);
  47. //| item.randomize();
  48. //| finish_item(item);
  49. //| item.end_event.wait_on();
  50. //| // get_response(rsp, item.get_transaction_id()); //if needed
  51. //| endtask
  52. //|
  53. //
  54. // A simple two-stage pipeline driver that can execute address and
  55. // data phases concurrently might be implemented as follows:
  56. //
  57. //| task run();
  58. //| // this driver supports a two-deep pipeline
  59. //| fork
  60. //| do_item();
  61. //| do_item();
  62. //| join
  63. //| endtask
  64. //|
  65. //|
  66. //| task do_item();
  67. //|
  68. //| forever begin
  69. //| mbus_item req;
  70. //|
  71. //| lock.get();
  72. //|
  73. //| seq_item_port.get(req); // Completes the sequencer-driver handshake
  74. //|
  75. //| accept_tr(req);
  76. //|
  77. //| // request bus, wait for grant, etc.
  78. //|
  79. //| begin_tr(req);
  80. //|
  81. //| // execute address phase
  82. //|
  83. //| // allows next transaction to begin address phase
  84. //| lock.put();
  85. //|
  86. //| // execute data phase
  87. //| // (may trigger custom "data_phase" event here)
  88. //|
  89. //| end_tr(req);
  90. //|
  91. //| end
  92. //|
  93. //| endtask: do_item
  94. //
  95. //------------------------------------------------------------------------------
  96. virtual class uvm_transaction extends uvm_object;
  97.  
  98. // Function: new
  99. //
  100. // Creates a new transaction object. The name is the instance name of the
  101. // transaction. If not supplied, then the object is unnamed.
  102.  
  103. extern function new (string name="", uvm_component initiator=null);
  104.  
  105. ......
  106.  
  107. endclass

参考文献:

2 UVM基础之———uvm_transaction. http://www.cnblogs.com/bob62/p/3871858.html

uvm_transaction——事物的更多相关文章

  1. Dapper逆天入门~强类型,动态类型,多映射,多返回值,增删改查+存储过程+事物案例演示

    Dapper的牛逼就不扯蛋了,答应群友做个入门Demo的,现有园友需要,那么公开分享一下: 完整Demo:http://pan.baidu.com/s/1i3TcEzj 注 意 事 项:http:// ...

  2. MyBatis6:MyBatis集成Spring事物管理(下篇)

    前言 前一篇文章<MyBatis5:MyBatis集成Spring事物管理(上篇)>复习了MyBatis的基本使用以及使用Spring管理MyBatis的事物的做法,本文的目的是在这个的基 ...

  3. Atomikos实现多数据源的事物管理

    之前试过使用Spring动态切换数据库,通过继承AbstractRoutingDataSource重写determineCurrentLookupKey()方法,来决定使用那个数据库.在开启事务之前, ...

  4. 浅谈spring 声明式事物

    此处主要讲讲事物的属性. 事物属性包含了五个方面: 1.传播行为 2.隔离规则 3.回滚规则 4.事物超时 5.是否只读 一.传播行为 事务的第一个方面是传播行为(propagation behavi ...

  5. 第6章 Spring的事物处理

    一.简述事物处理 1.事物处理的基本概念 1)提交:所有操作步骤都被完整执行后,称该事物被提交 2)回滚:某步操作执行失败,所有操作都没被提交,则事物必须被回滚 2.事物处理的特性(ACID) 1)原 ...

  6. 解惑spring嵌套事物

    工作中一直对spring中的事物管理都是最简单的配置 但是spring中的事物传播性配置 还有很多种,有时候经常疑惑service调用service的问题,今天的论坛上看到一篇写的非常详细的文字.记录 ...

  7. SQL Server中的事物

    1.事务的四个属性 原子性Atomicity,一致性Consistency,隔离性Isolation,持久性Durability ,即ACID特性. 原子性:事务必须是一个完整工作的单元,要么全部执行 ...

  8. zookeeper清除事物日志

    dataDir=/data/zookeeper/data dataLogDir=/data/zookeeper/log       zk事物日志(快照)存放目录,高负荷工作的时候,会产生大量的日志,需 ...

  9. [原创]java WEB学习笔记109:Spring学习---spring中事物管理

    博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流,探讨,可以留言,也可以通过以下方式联系. 本人互联网技术爱好 ...

随机推荐

  1. bzoj 1014 [JSOI2008]火星人prefix——splay+哈希

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1014 用splay维护字符串,每个点记录子树的哈希值,然后二分查询. 二分不是把两个点的哈希 ...

  2. hdu 2899 Strange fuction —— 模拟退火

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=2899 模拟退火: 怎么也过不了,竟然是忘了写 lst = tmp ... 还是挺容易A的. 代码如下: # ...

  3. python逼格提升

    1.合并可以匹配的条件 s1 = 7 if s1 > 5 and s1 < 10: print(s1) s1 = 7 if 5 < s1 < 10: print(s1) 2.i ...

  4. PHPstorm相同变量标识

    setting-> plugins-> Browse Repositories 输入BrowseWordAtCaret 搜索,安装,然后重启

  5. ZipHelper

    using ICSharpCode.SharpZipLib.Zip; using System.Collections.Generic; using System.IO; namespace WLYD ...

  6. B - School Marks

    Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description Little ...

  7. Console Event Handling

    http://www.codeproject.com/Articles/2357/Console-Event-Handling Console Event Handling Kumar Gaurav ...

  8. 菜鸟-@responsebody 理解-用法

    @responsebody表示该方法的返回结果直接写入HTTP response body中一般在异步获取数据时使用,在使用@RequestMapping后,返回值通常解析为跳转路径,加上@respo ...

  9. java集合框架之比较器Comparator、Comparable

    参考http://how2j.cn/k/collection/collection-comparator-comparable/693.html Comparator 假设Hero有三个属性 name ...

  10. ubuntu16.04安装php5

    系统源自带是7.0的, 如果要安装安装5.5+或者有5.5+的源可以执行这些命令 sudo apt-get install python-software-propertiessudo apt-get ...