寄存器模型

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. Azure AD (5) 在单一目录下,使用Azure AD单点登录

    <Windows Azure Platform 系列文章目录> 本文介绍的是,在单一目录下,使用Azure AD Connect,打通本地Domain Controller 我们需要准备的 ...

  2. HDU1711(KMP入门题)

    Number Sequence Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  3. 必须知道的八大种排序算法【java实现】

    一.冒泡排序 冒泡排序是一种简单的排序算法.它重复地走访过要排序的数列,一次比较两个元素,如果他们的顺序错误就把他们交换过来.走访数列的工作是重复地进行直到没有再需要交换,也就是说该数列已经排序完成. ...

  4. project工期出现小数问题

    进入“选项”,点击“日程”,将默认“开始”.“结束”时间调整为“9点~18点.原为PREJECT 日历 (注意是日历~!!)默认的“8点~17点”,与preject系统默认时间“9点~18点”有差别~ ...

  5. monkey基本命令及脚本编写

    Monkey 是Android自带的黑盒测试工具,一般通过随机触发界面事件,来确定应用是否会发生异常,多用于android应用的稳定性.压力测试  基本命令: adb shell monkey [op ...

  6. Flutter实战视频-移动电商-26.列表页_使用Provide控制子类-2

    26.列表页_使用Provide控制子类-2 主要实现功能,点击一级分类,二级分类跟着变.这里主要用哦我们的provide 新建provide provide文件夹下创建:child_category ...

  7. 微信小程序 设置宽度是100%,然后图片能成为正方形的方法。小程序按屏幕比例的正方形

    1.在全局app.js中获取设备的宽度 globalData: { userInfo: null, sysWidth:wx.getSystemInfoSync().windowWidth, //图片宽 ...

  8. 在linux上部署tomcat服务

    在linux上部署tomcat 1.安装JDK 2.下载tomcat http://tomcat.apache.org/download-70.cgi 3.上传到服务器,并解压 4.上传war包或者已 ...

  9. 利用ant 和 Junit 生成测试报告

    我们除了使用java来直接运行junit之外,我们还可以使用junit提供的junit task与ant结合来运行. 涉及的几个主要的ant task如下: <junit>,定义一个jun ...

  10. Lightoj1002 【搜索】

    题意: 两两之间的点的花费就是:从A点到B的一条路上某段的最大权值:给一个起点,求到各起点的最小花费. 思路: 一开始的思路: n不是才500,我先建个图,然后DFS一下,不对,是2500: 如果直接 ...