systemverilog interface杂记
随着IC设计复杂度的提高,模块间互联变得复杂,SV引入接口,代表一捆连线的结构。
Systemverilog语法标准,新引入一个重要的数据类型:interface。
interface主要作用有两个:一是简化模块之间的连接;二是实现类和模块之间的通信;
总的来说,interface指明了TB和DUT之间的连接信号,clocking规定了信号之间的时序关系,而modport则明确了站在不同的角度对应信号的输入输出方向。通过虚拟接口的定义将以上内容封装起来。
接口interface与module,program一样,都是层次化结构,主要用来完成设计module和验证program之间的连接。interface中有两个重要的功能块clocking block和modport。
clocking block,用来对同步信号进行采样和驱动,可以避免设计和验证的竞争。clocking block需要指定一个时间,通常是posedge或negedge,同时还可以为块中信号设置建立保持时间,在默认建立保持时间均为1ns。
如下面的例子所示:
...
clocking msclk_cb @(posedge clk); //clocking block块定义
default intput #setup output #holdtime; //输入建立时间,输出保持时间设定
intput xxxxx;
output xxxx;
...
endclocking
...
modport block,对于同一个接口,不同的事物处理器可能会有不同的视角,比如对driver而言是输出的信号,在driver_monitor看来则是输入信号,所以可以引入modport来声明端口模块。
默认情况下interface的所有信号都是异步的
可以通过clocking block定义一组信号与时钟同步
modport定义与test的连接。
关于interface的实例化:
1,在moule中,可以直接实例化,
即my_if input_if;
2,在class中,需要使用virtual interface来实例化。
即 class my_driver extends uvm_driver
virtual my_if vif;
XXXXX;
endclass
systemverilog interface杂记的更多相关文章
- systemverilog interface
普通的模块使用法:注意我们这里只实现了部分功能....不是完全的读写模块.... module mem_core( input logic wen, input logic ren, ...
- systemverilog 之interface/timing region/program
1.connecting the testbench and the design 2.verilog connection review 3.systemverilog interfaces 4.s ...
- SystemVerilog语言简介(一)
1. 接口(Interface) Verilog模块之间的连接是通过模块端口进行的.为了给组成设计的各个模块定义端口,我们必须对期望的硬件设计有一个详细的认识.不幸的是,在设计的早期,我们很难把握设计 ...
- FPGA验证之SystemVerilog+UVM
[转载]https://blog.csdn.net/lijiuyangzilsc/article/details/50879545 数字芯片和FPGA的验证.主要是其中的功能仿真和时序仿真. ...
- systemverilog.vim
" Vim syntax file " Language: SystemVerilog " Maintainer: Stephen Hobbs <stephenh@ ...
- systemverilog的高亮显示
1. 在_vimrc文件末尾添加: syntax on "确定vim打开语法高亮 filetype on "打开文件类型检测 filetype plugin on "为特 ...
- *2.2.4 加入virtual interface
在前几节的例子中,driver中等待时钟事件(@posedge top.clk).给DUT中输入端口赋值(top.rx_dv <= 1' b1)都是使用绝对路径,绝对路径的使用大大减弱了验证平台 ...
- C# DateTime的11种构造函数 [Abp 源码分析]十五、自动审计记录 .Net 登陆的时候添加验证码 使用Topshelf开发Windows服务、记录日志 日常杂记——C#验证码 c#_生成图片式验证码 C# 利用SharpZipLib生成压缩包 Sql2012如何将远程服务器数据库及表、表结构、表数据导入本地数据库
C# DateTime的11种构造函数 别的也不多说没直接贴代码 using System; using System.Collections.Generic; using System.Glob ...
- systemverilog FAQ(zz)
1. What is clocking block? Ans: Clocking block can be declared using the keywords clocking and endcl ...
随机推荐
- mysql分表技术
一般来说,当我们的数据库的数据超过了100w记录的时候就应该考虑分表或者分区了,这次我来详细说说分表的一些方法. 目前我所知道的方法都是MYISAM的,INNODB如何做分表并且保留事务和外键,我还不 ...
- (转)SQL执行顺序
SQL语句理解:http://blog.jobbole.com/55086/ 窗口函数/分析函数:http://blog.csdn.net/mfkpie/article/details/1636451 ...
- socket文件权限变更引起crs无法启动故障
Crs无法正常启动,也无法关闭.[root@rac101 ~]# crsctl stop crsStopping resources. This could take several minutes. ...
- C# Expression 树转化为SQL语句(一)
sql有有四中基本语句,分别是增删改查,在建立model后如何生成这四中sql语句,降低开发时间. 我们先模拟出一张学生表: public class Student { public int id ...
- Chem 3D中怎么创建立体模型
ChemDraw作为一款很受大家欢迎的化学绘图软件,其在绘制平面化学方面的功能已经非常的强大了,其实它也可以绘制3D图形.Chem 3D就是绘制3D图形的重要组件.而且为了满足不同的用户绘图的需求,可 ...
- 复合文档(Compound Document)读写栗子
复合文件是把磁盘文件系统的管理方式移植到文件中---复合文件. 复合文档是由 Windows 系统通过 COM 提供的, 它能完成像 Windows 目录结构一样复杂的文件结构的存取:提示一下 Win ...
- flask-第三方组件
flask-script 离线脚本 from flask_demo import create_app from flask_script import Manager app = create_a ...
- 对IOS设备中UDID的一些思考
本文转载至 http://blog.csdn.net/happyrabbit456/article/details/11565209 http://blog.csdn.net/xiaoguan2008 ...
- [Go语言]从Docker源码学习Go——function和method
function和method关系 method是针对某一类型定义的function, function可以单独调用,method必须针对某一类型的实例进行调用 //function 调用方式 pac ...
- 延迟任务和循环任务ScheduledExecutorService
public class ScheduledThreadPool { public static ScheduledExecutorService scheduledThreadPool = Exec ...