寄存器模型

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

uvm_reg_sequence——寄存器模型(六)的更多相关文章

  1. uvm_reg_cbs——寄存器模型(十六)

    当你完成寄存器模型的时候,你就会想到给后来的人一个接口,给他更多的扩展,让他做更多的事,一般而言,只有做VIP时,会想到做callbacks. typedef class uvm_reg; typed ...

  2. uvm_reg_model——寄存器模型(一)

    对于一个复杂设计,寄存器模型要能够模拟任意数量的寄存器域操作.UVM提供标准的基类库,UVM的寄存器模型来自于继承自VMM的RAL(Register Abstract Layer),现在可以先将寄存器 ...

  3. [Beego模型] 六、事务处理

    [Beego模型] 一.ORM 使用方法 [Beego模型] 二.CRUD 操作 [Beego模型] 三.高级查询 [Beego模型] 四.使用SQL语句进行查询 [Beego模型] 五.构造查询 [ ...

  4. uvm_reg_predictor——寄存器模型(十七)

    这是寄存器模型类中唯一派生自uvm_component的类,我们的寄存器模式需要实时,以最接近的方式知道DUT中寄存器的变化,uvm_reg_predictor就是为这个而生的. // TITLE: ...

  5. uvm_reg_block——寄存器模型(七)

    这是寄存器模型的顶层 //------------------------------------------------------------------------ // Class: uvm_ ...

  6. uvm_reg_item——寄存器模型(五)

    uvm_reg_item 扩展自uvm_sequence_item,也就说寄存器模型定义了transaction item. adapter 的作用是把这uvm_reg_item转换成uvm_sequ ...

  7. uvm_reg_defines——寄存器模型(四)

    文件: src/marcos/uvm_reg_defines 类: 无 该文件是寄存器模型src/reg/* 文件对于的宏文件,主要定义了寄存器地址位宽,寄存器数据位宽,字节的大小.计算机从最初的8, ...

  8. UVM——寄存器模型相关的一些函数

    0. 引言 在UVM支持的寄存器操作中,有get.update.mirror.write等等一些方法,在这里整理一下他们的用法. 寄存器模型中的寄存器值应该与DUT保持同步,但是由于DUT的值是实时更 ...

  9. uvm_reg_fifo——寄存器模型(十五)

    当我们对寄存器register, 存储器memory, 都进行了建模,是时候对FIFO进行建模了 uvm_reg_fifo毫无旁贷底承担起了这个责任,包括:set, get, update, read ...

随机推荐

  1. hihoCoder2月29日(字符串模拟)

    时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期). 只有闰年有2月29日,满足以下一个条件的年份为闰年: ...

  2. 使用escape、encodeURI 和 encodeURIComponent 解决url中文乱码问题

    escape(), encodeURI()和encodeURIComponent()是在Javascript中用于编码字符串的三个常用的方法,而他们之间的异同却困扰了很多的Javascript初学者, ...

  3. Matrix Recurrence

    给定矩阵$A,B$,且有 $$f(0) = A ,f(i) =B * \prod_{i=w(i)}^{i-1}f(i)$$ 求f(n) 其中,当w(i)单增时,可以做到$O(n*m^3)$,注意要优化 ...

  4. CNN相关资料

    转子http://blog.csdn.net/qianqing13579/article/details/71076261 前言 入职之后,逐渐转到深度学习方向.很早就打算写深度学习相关博客了,但是由 ...

  5. Eclipse补全功能

    默认当输入 . 时会弹出提示补全, 如何设置 eclipse 代码自动补全,参考 http://jingyan.baidu.com/article/d45ad148b214a969552b8001.h ...

  6. 清理win10系统c盘

    本人C盘是128G SSD硬盘,Win10系统盘和一些常用的程序都装在这个盘(特大程序除外),目的是为了使用这些程序时提高响应速度.但是本人电脑使用1年,突然发现C盘以占用近70G的空间,实在是吓蒙撒 ...

  7. PHP文件操作功能函数大全

    PHP文件操作功能函数大全 <?php /* 转换字节大小 */ function transByte($size){ $arr=array("B","KB&quo ...

  8. java 中判断字符串相等

    今天写Java代码时遇到一个问题,就是关于判断两个字符串是否相等的问题.(刚尝试用SSH框架) 在大多编程中,通常比较两个字符串是否相同的表达式是“==”,但在java中不能这么写.在java中,用的 ...

  9. bootstrap的tab中,echarts 图表宽度设为100%之后,会出现图表宽带变为100px的情况。只有第一个正常

    1.原因 echarts官方解释是 Tip: 有时候图表会放在多个标签页里,那些初始隐藏的标签在初始化图表的时候因为获取不到容器的实际高宽,可能会绘制失败,因此在切换到该标签页时需要手动调用resiz ...

  10. SPOJ130 【DP·背包选取特性】

    题意: 给你n个任务,每个任务有一个起始时间,持续时间,一个权值: 问你怎么分配得到最大值 思路: 数据好大..百度了一发意识到自己好菜啊!背包的特性. dp[i]代表前 i 个能构成的最大值. 对于 ...