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 ...
随机推荐
- 基于Jquery的实现回车键Enter切换焦点
系统默认情况下,使用Tab按键切换页面元素的焦点,有没有想过回车键Enter也可以实现这种功能,并且具有良好的用户体验. 接下来我们使用Jquery实现回车键Enter切换焦点,此代码在常用浏览器IE ...
- Windows应用程序运行权限设置
在Vista以后的windows版本中,有些时候需要提升编译后生成程序的权限,即希望让生成的程序以管理员身份运行.虽然在一般情况下,可以使用鼠标右键选择的方式来强行以管理员身份运行,但它并没有屏蔽普通 ...
- js判断css动画效果是否结束
<!-- css样式 --> <style> .test{ width: 100px; height: 100px; transition: all 5s; backgroun ...
- HibernateSessionFactory演示样例
package common; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hi ...
- devmapper: Thin Pool has 162394 free data blocks which is less than minimum required 163840 free data blocks
问题: 制作镜像的时候报错 devmapper: Thin Pool has 162394 free data blocks which is less than minimum required 1 ...
- When an HTTP server receives a request for a CGI script
cgicc: Overview of the Common Gateway Interface https://www.gnu.org/software/cgicc/doc/cgi_overview. ...
- pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.
Getting Started – Pug https://pugjs.org/api/getting-started.html GitHub - Tencent/wepy: 小程序组件化开发框架 h ...
- 模块化之SeaJS(二)
Seajs 此文来自 予舍驿站 提供简单.极致的模块化开发体验 非官方文档,整理来自己官方文档的文字与实例,方便速查. seajs.configObject aliasObject 别名配置,配置之后 ...
- screenX clientX pageX区别
screenX:鼠标位置相对于用户屏幕水平偏移量,而screenY也就是垂直方向的,此时的参照点也就是原点是屏幕的左上角. clientX:跟screenX相比就是将参照点改成了浏览器内容区域的左上角 ...
- C#HTML与UBB(纯文本)之间的转换
private string HtmlToUBB(string _Html) { _Html = Regex.Replace(_Html,"<br ...