top testbench在top_tb中包含进所有的文件,将DUT放在top_tb中(例化DUT),连接好各个端口,提供clk时钟和rst_n复位信号。最主要的是要给组件中的虚接口设置接口,一般是给driver和monitor的虚接口例化接口。初始化run_test()使其自动启动UVM仿真。用config机制配置内部变量。如例:

 `timescale 1ns/1ps
`include "uvm_macros.svh" import uvm_pkg::*;
`include "my_if.sv"
`include "my_transaction.sv"
`include "my_sequencer.sv"
`include "my_driver.sv"
`include "my_monitor.sv"
`include "my_agent.sv"
`include "my_model.sv"
`include "my_scoreboard.sv"
`include "my_sequence.sv"
`include "my_env.sv"
`include "base_test.sv" module top_tb; reg clk;
reg rst_n;
reg[:] rxd;
reg rx_dv;
wire[:] txd;
wire tx_en; my_if input_if(clk, rst_n);
my_if output_if(clk, rst_n); dut my_dut(.clk(clk),
.rst_n(rst_n),
.rxd(input_if.data),
.rx_dv(input_if.valid),
.txd(output_if.data),
.tx_en(output_if.valid)); initial begin
clk = ;
forever begin
# clk = ~clk;
end
end initial begin
rst_n = 'b0;
#;
rst_n = 'b1;
end initial begin
run_test("base_test");
end initial begin
uvm_config_db#(virtual my_if)::set(null, "uvm_test_top.env.i_agt.drv", "vif", input_if);
uvm_config_db#(virtual my_if)::set(null, "uvm_test_top.env.i_agt.mon", "vif", input_if);
uvm_config_db#(virtual my_if)::set(null, "uvm_test_top.env.o_agt.mon", "vif", output_if);
end endmodule

参考文献:

[1] 测试平台说明. http://www.asicdv.com/uvm_scan.asp?id=39.

[2] 张强. UVM实战. 机械工业出版社. 2014.07.

UVM Top Testbench的更多相关文章

  1. 在VCS仿真器中使用FSDB[转载]

    来源:https://www.cnblogs.com/catannie/p/8099331.html FSDB(Fast Signal Database)是Verdi支持的文件格式,用于保存仿真产生的 ...

  2. 在VCS仿真器中使用FSDB

    FSDB(Fast Signal Database)是Verdi支持的文件格式,用于保存仿真产生的信号波形.据Verdi文档说明,FSDB比标准的VCD格式节省磁盘空间,处理速度更快.要用VCS仿真器 ...

  3. 基于UVM的verilog验证

    Abstract 本文介绍UVM框架,并以crc7为例进行UVM的验证,最后指出常见的UVM验证开发有哪些坑,以及怎么避免. Introduction 本例使用环境:ModelSim 10.2c,UV ...

  4. 基于UVM的verilog验证(转)

    reference:https://www.cnblogs.com/bettty/p/5285785.html Abstract 本文介绍UVM框架,并以crc7为例进行UVM的验证,最后指出常见的U ...

  5. Guidelines for Successful SoC Verification in OVM/UVM

    By Moataz El-Metwally, Mentor Graphics Cairo Egypt Abstract : With the increasing adoption of OVM/UV ...

  6. uvm_env——UVM大环境(UVM Environment )

    1 What is uvm_env? uvm_env is used to create and connect the uvm_components like driver, monitors , ...

  7. UVM基础总结——基于《UVM实战》示例

    一.前言 工作一直在做SoC验证,更关注模块间的连接性和匹配性,所以相比于擅长随机约束激励的UVM来说,定向测试的概念更容易debug.当然前提是IP已经被充分验证.因此觉得接触UVM的机会较少.到现 ...

  8. ( 转)UVM验证方法学之一验证平台

    在现代IC设计流程中,当设计人员根据设计规格说明书完成RTL代码之后,验证人员开始验证这些代码(通常称其为DUT,Design Under Test).验证工作主要保证从设计规格说明书到RTL转变的正 ...

  9. UVM的factory机制

    在UVM中使用工厂模式基本上分为三个步骤: 1. 注册 当定义一个类的时候,它的类型必须要注册,UVM已经提供了专用的宏. `uvm_component_utils(class_type_name) ...

随机推荐

  1. Welcome to LED Control Wiki

    About this project This project was developed after I had to find out that controlling my RGB ambien ...

  2. 计算纯文本情况下RichTextBox实际高度的正确方法(.NET)

    2016-07-17重大更新           其实有更好.更系统的方法,也是最近才发现的,分享给大家!! /// <summary> /// /// </summary> ...

  3. 论文笔记之:Speed Up Tracking by Ignoring Features

    Speed Up Tracking by Ignoring Features CVPR 2014 Abstract:本文提出一种特征选择的算法,来实现用最"精简"的特征以进行目标跟 ...

  4. 盯盯拍Android App 3.0指导

    http://www.ddpai.com/bbs/thread-233-1-1.html 视频介绍:http://v.17173.com/v_102_604/MzA0OTAwMDg.html

  5. android数据存储之Sqlite(二)

    SQLite学习笔记 前言:上一章我们介绍了sqlite的一些基本知识以及在dos命令下对sqlite进行的增删改查的操作,这一章我们将在android项目中实际来操作sqlite. 1. SQLit ...

  6. winform基本控件----按钮

    这次来引用一个我们上课时候老师给的一个实验内容,来说一下winform程序设计中的按钮控件的使用.下面是我们老师给的实验内容. 实验目的: 掌握Winform的开发环境. 掌握窗体的创建和基本方法. ...

  7. python---sys

    简介 sys模块用于提供对python解释器的相关操作 sys.argv 命令行参数List,第一个元素是程序本身路径 sys.modules 返回系统导入的模块字段,key是模块名,value是模块 ...

  8. NODEJS - express

    1.express组织结构 app demo    |---node_modules------用于安装本地模块.     |---public------------用于存放用户可以下载到的文件,比 ...

  9. oracle数据库如何创建角色并对角色授予权限

    目标: 1.创建角色test1_role, 授予create session 权限 2.创建角色test2_role,授予create procedure, create sequence, crea ...

  10. Bugtags 介绍视频 - App 测试 · 从未如此简单

    Bugtags 是什么? Bugtags 是移动时代首选 Bug 管理系统,针对不同的使用场景,Bugtags 具有以下强大特性: 移动应用 Bug 管理 Bugtags 可以直接在应用中所见即所得提 ...