寄存器模型

uvm_reg_sequence是UVM自带所有register sequence 的基类。 该类包含model, adapter, reg_seqr(uvm_sequencer). 感觉寄存器模型是个小的UVM系统。有自己uvm_reg_item, uvm_reg_sequence,reg_seqr, uvm_reg_adapter 是用来将寄存器的transaction 和 physical bus transaction之间的转化

//------------------------------------------------------------------------------
// TITLE: Register Sequence Classes
//------------------------------------------------------------------------------
//
// This section defines the base classes used for register stimulus generation.
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
//
// CLASS: uvm_reg_sequence
//
// This class provides base functionality for both user-defined RegModel test
// sequences and "register translation sequences".
//
// - When used as a base for user-defined RegModel test sequences, this class
// provides convenience methods for reading and writing registers and
// memories. Users implement the body() method to interact directly with
// the RegModel model (held in the <model> property) or indirectly via the
// delegation methods in this class.
//
// - When used as a translation sequence, objects of this class are
// executed directly on a bus sequencer which are used in support of a layered sequencer
// use model, a pre-defined convert-and-execute algorithm is provided.
//
// Register operations do not require extending this class if none of the above
// services are needed. Register test sequences can be extend from the base
// <uvm_sequence #(REQ,RSP)> base class or even from outside a sequence.
//
// Note- The convenience API not yet implemented.
//------------------------------------------------------------------------------ class uvm_reg_sequence #(type BASE=uvm_sequence #(uvm_reg_item)) extends BASE; `uvm_object_param_utils(uvm_reg_sequence #(BASE)) // Parameter: BASE
//
// Specifies the sequence type to extend from.
//
// When used as a translation sequence running on a bus sequencer, ~BASE~ must
// be compatible with the sequence type expected by the bus sequencer.
//
// When used as a test sequence running on a particular sequencer, ~BASE~
// must be compatible with the sequence type expected by that sequencer.
//
// When used as a virtual test sequence without a sequencer, ~BASE~ does
// not need to be specified, i.e. the default specialization is adequate.
//
// To maximize opportunities for reuse, user-defined RegModel sequences should
// "promote" the BASE parameter.
//
// | class my_reg_sequence #(type BASE=uvm_sequence #(uvm_reg_item))
// | extends uvm_reg_sequence #(BASE);
//
// This way, the RegModel sequence can be extended from
// user-defined base sequences. // Variable: model
//
// Block abstraction this sequence executes on, defined only when this
// sequence is a user-defined test sequence.
//
uvm_reg_block model; // Variable: adapter
//
// Adapter to use for translating between abstract register transactions
// and physical bus transactions, defined only when this sequence is a
// translation sequence.
//
uvm_reg_adapter adapter; // Variable: reg_seqr
//
// Layered upstream "register" sequencer.
//
// Specifies the upstream sequencer between abstract register transactions
// and physical bus transactions. Defined only when this sequence is a
// translation sequence, and we want to "pull" from an upstream sequencer.
//
uvm_sequencer #(uvm_reg_item) reg_seqr;

寄存器模型的前门访问方式:

//------------------------------------------------------------------------------
// Class: uvm_reg_frontdoor
//
// Facade class for register and memory frontdoor access.
//------------------------------------------------------------------------------
//
// User-defined frontdoor access sequence
//
// Base class for user-defined access to register and memory reads and writes
// through a physical interface.
//
// By default, different registers and memories are mapped to different
// addresses in the address space and are accessed via those exclusively
// through physical addresses.
//
// The frontdoor allows access using a non-linear and/or non-mapped mechanism.
// Users can extend this class to provide the physical access to these registers.
//
virtual class uvm_reg_frontdoor extends uvm_reg_sequence #(uvm_sequence #(uvm_sequence_item)); // Variable: rw_info
//
// Holds information about the register being read or written
//
uvm_reg_item rw_info; // Variable: sequencer
//
// Sequencer executing the operation
//
uvm_sequencer_base sequencer; // Function: new
//
// Constructor, new object given optional ~name~.
//
function new(string name="");
super.new(name);
endfunction string fname;
int lineno; endclass: uvm_reg_frontdoor

最新文章

  1. everything + autohotkey的配合使用
  2. React学习笔记-3-非dom属性介绍
  3. MXNet官网案例分析--Train MLP on MNIST
  4. IOS 模仿TableView封装
  5. POJ 3259 Wormholes 虫洞(负权最短路,负环)
  6. 纯CSS制作冒泡提示框
  7. JavaScript高级程序设计(第三版)学习笔记13、14章
  8. SQL Server 字段状态判断语句
  9. vijos1514天才的记忆
  10. [Delphi]检查URL是否有效的函数
  11. 配置主机路由表(route)(两)
  12. Windows 产品激活状态、密钥等信息查看
  13. React Native &amp; react-native-web-player &amp; React Native for Web
  14. 知识扩展——Git和GitHub的区别
  15. Windbg断点调试
  16. linux系统管理 基本指令
  17. OpenCV 学习笔记 01 安装OpenCV及相关依赖库
  18. [转]oracle制定定时任务(dbms_jobs)
  19. C#,ArcGIS Engine开发入门教程
  20. c++11——lambda表达式

热门文章

  1. APACHE2 服务器配置 (一)
  2. calico在docker上的部署及验证
  3. C# HTML解析工具HtmlAgilityPack使用实例(一)
  4. Oracle中CASE WHEN的用法实例
  5. Eclipse -- 自动补齐设置和其他用法
  6. [poj2186]Popular Cows(targin缩点)
  7. 挨踢职场求生法则-----我在IT职场打滚超过15年了,从小小的程序员做到常务副总
  8. Swift 4.0 中的 open,public,internal,fileprivate,private
  9. opensns入门
  10. CSA Round #53 (Div. 2 only) Histogram Partition(模拟)