寄存器模型

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. 3.17-3.18 HDFS2.x中高级特性讲解

    一.hdfs federation hdfs federation即hdfs的联邦:可以理解为有多个namenode节点的hdfs集群: HA方案解决的是单点故障问题,而Fdederation解决的是 ...

  2. appium版本之谜

    关于appium网上提到的版本是一头雾水,现解释如下: 首先,官网下载的 appium-desktop-Setup-1.3.1.exe是appium桌面版,将appium服务器配置可视化. 而网上提到 ...

  3. 反射invoke()方法

    invoke()方法: 主要是为了类反射,可以在不知道具体类的情况下,根据配置字符串去调用一个类的方法.最简单的方法是可以把方法参数化.    main.invoke():     比如Test类里有 ...

  4. TypeScript完全解读(26课时)_1.TypeScript完全解读-开发环境搭建

    1.TypeScript完全解读-开发环境搭建 初始化项目 手动创建文件夹 D:\MyDemos\tsDemo\client-demo 用VSCode打开 npm init:初始化项目 然后我们的项目 ...

  5. JQuery onload、ready 加载顺序

    // ready 这个方法只是在页面所有的DOM加载完毕后就会触发 // 方式1 $(function(){ // do something }); // 方式2 $(document).ready( ...

  6. 在win下启动memcached

    memcached -m 64 -p 11211 -vvv 设置默认内存64,默认端口11211 ,输出功能及警告错误等信息

  7. unity3d easytouch教程

    http://www.taikr.com/group/6/thread/1987 说一说easytouch的简单使用方法,和移动平台上的rpg游戏一样,我们肯定也不陌生,我们经常玩游戏的时候用的都是虚 ...

  8. vant搜索框问题

    最近使用vant搜索框时发现,当输入内容点击一次搜索有数据,点击错号把内容去掉再点击搜索,都没进入点击搜索方法. 解决方法:把bindtop改成bindtouchstart <van-searc ...

  9. [NOIP2014]无线网站发射器选址

    Description 随着智能手机的日益普及,人们对无线网的需求日益增大.某城市决定对城市内的公共场所覆盖无线网.假设该城市的布局为由严格平行的129条东西向街道和129条南北向街道所形成的网格状, ...

  10. java快速排序代码

    public class test1 { public static int partition(int[] array,int lo,int hi){ int key=array[lo]; whil ...