UVM Top Testbench
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的更多相关文章
- 在VCS仿真器中使用FSDB[转载]
来源:https://www.cnblogs.com/catannie/p/8099331.html FSDB(Fast Signal Database)是Verdi支持的文件格式,用于保存仿真产生的 ...
- 在VCS仿真器中使用FSDB
FSDB(Fast Signal Database)是Verdi支持的文件格式,用于保存仿真产生的信号波形.据Verdi文档说明,FSDB比标准的VCD格式节省磁盘空间,处理速度更快.要用VCS仿真器 ...
- 基于UVM的verilog验证
Abstract 本文介绍UVM框架,并以crc7为例进行UVM的验证,最后指出常见的UVM验证开发有哪些坑,以及怎么避免. Introduction 本例使用环境:ModelSim 10.2c,UV ...
- 基于UVM的verilog验证(转)
reference:https://www.cnblogs.com/bettty/p/5285785.html Abstract 本文介绍UVM框架,并以crc7为例进行UVM的验证,最后指出常见的U ...
- Guidelines for Successful SoC Verification in OVM/UVM
By Moataz El-Metwally, Mentor Graphics Cairo Egypt Abstract : With the increasing adoption of OVM/UV ...
- uvm_env——UVM大环境(UVM Environment )
1 What is uvm_env? uvm_env is used to create and connect the uvm_components like driver, monitors , ...
- UVM基础总结——基于《UVM实战》示例
一.前言 工作一直在做SoC验证,更关注模块间的连接性和匹配性,所以相比于擅长随机约束激励的UVM来说,定向测试的概念更容易debug.当然前提是IP已经被充分验证.因此觉得接触UVM的机会较少.到现 ...
- ( 转)UVM验证方法学之一验证平台
在现代IC设计流程中,当设计人员根据设计规格说明书完成RTL代码之后,验证人员开始验证这些代码(通常称其为DUT,Design Under Test).验证工作主要保证从设计规格说明书到RTL转变的正 ...
- UVM的factory机制
在UVM中使用工厂模式基本上分为三个步骤: 1. 注册 当定义一个类的时候,它的类型必须要注册,UVM已经提供了专用的宏. `uvm_component_utils(class_type_name) ...
随机推荐
- Why one-norm is an agreeable alternative for zero-norm?
[转载请注明出处]http://www.cnblogs.com/mashiqi Today I try to give a brief inspection on why we always choo ...
- centos添加PATH环境变量
1.cd ~ 2.vi .bashrc 3.在代码末尾增加一行: export PATH =/path/to/target-dir/bin:$PATH 4.source .bash_profile立即 ...
- android之下拉刷新(reflush)
package com.example.reflush; import android.app.ListActivity; import android.os.Bundle; import andro ...
- 一些java方法,一些感想
String.valueof(),string,toString; 都是转化为字符串,如果为null的话用tostring会报空指针异常,String的效率最高,string.valuof效果最好. ...
- 5天玩转C#并行和多线程编程
5天玩转C#并行和多线程编程系列文章目录 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq 5天玩转C#并行和多线程编 ...
- Sharepoint CAML 增删改查 List
Lists.UpdateListItems 方法 (websvcLists) Windows SharePoint Services 3 Adds, deletes, or updates the ...
- StackExchange.Redis.Extensions.Core 源码解读之 Configuration用法
前言 之前接触到Redis,然后选用了对StackExchange.Redis又一层封装的StackExchange.Redis.Extensions.Core类库.阅读源代码的过程中发现了他使用Co ...
- grunt集成自动启动
Grunt可以执行像压缩, 编译, 单元测试, 代码检查以及打包发布的任务. 本文介绍使用Grunt实现nodejs程序自启动功能. 目录: Grunt介绍 Grunt安装 Grunt使用 Grunt ...
- linux 下 ntfs移动硬盘挂载
fdisk -l Disk /dev/sdb: 500.0 GB, 500074283008 bytes255 heads, 63 sectors/track, 60797 cylindersUnit ...
- MapReduce编程job概念原理
在Hadoop中,每个MapReduce任务都被初始化为一个job,每个job又可分为两个阶段:map阶段和reduce阶段.这两个阶段分别用两个函数来表示.Map函数接收一个<key,valu ...