systemverilog 之interface/timing region/program
1.connecting the testbench and the design
2.verilog connection review
3.systemverilog interfaces
4.stimulus timing
5.clocking blocks
6.timing regions
7.program block
Connecting Testbench and Design
1.use the conventional verilog module ports
implicit .* port connections
2.use interface and then instance
interface arb_if(input bit clk);
logic [1:0] grant,request;
logic reset;
endinterface
module top;
bit clk;
always #5 clk =~clk;
arb_if arbif (clk);
arb a1(arbif);
test t1(arbif);
endmodule:top
module tb(arb_if arbif);
…
initial begin
@(posedge arbif.clk);
arbif.request <= 2’b01;
$display(“@%0t:Drove req =01”,$time);
repeat(2) @(posedge arbif.clk)
if(arbif.grant != 2’b01)
$display(“@0d:a1:grant !=2’b01”,$time);
$finish;
end
endmodule:test
HOW connecting interfaces and ports
<port_name>.<internal_interface_signal_name>
interface modport
1.modport provide a means to define different views of the interface signal
2.modport is an abbreviation for module port
3.an interface can have any number of modport definitions
4.the modport declaration only defines whether the connecting module sees a signal as an input output or bidirectional

STIMULUS TIMING
The timing between the testbench and the design
should be maintained to avoid race contiditions
clocking blocks ===> synchronous signals
default input #1step output #0
1.synchronize to active clock edge specified in clocking block
@arbif.cb;
repeat(3)@arbif.cb;
2.synchronize to any edge of signal
@arbif.cb.grant;
@(posedge arbif.cb.grant);
wait(arbif.cb.grant ==1);
3.wait for N clock cycles with ##n –blocking statment
##2 arbif.cb.request <=0; //wait 2 cycles then assign
3.clocking block signals are referenced by pre-pending the clocking block name to the signal:
all dirves must use non-blocking assigment
arbif.cb.request <= 1; //dirve
value = arbif.cb.grant ; // sample
4.clocking blocks overview
(1) use in the interface just for testbench
(2)benefits:
synchronous timing domains
race-free if input skew > 0
drive signals always at right time
(3)functionality:
can contain multiple clocking blocks
default input #1step output #0
systemverilog 之interface/timing region/program的更多相关文章
- systemverilog interface杂记
随着IC设计复杂度的提高,模块间互联变得复杂,SV引入接口,代表一捆连线的结构. Systemverilog语法标准,新引入一个重要的数据类型:interface. interface主要作用有两个: ...
- Application binary interface and method of interfacing binary application program to digital computer
An application binary interface includes linkage structures for interfacing a binary application pro ...
- [转载]转一篇Systemverilog的一个牛人总结
原文地址:转一篇Systemverilog的一个牛人总结作者:dreamylife Systemverilog 数据类型 l 合并数组和非合并数组 1)合并数组: 存储方式是连续的,中间没 ...
- SystemVerilog基本语法总结(上)
SystemVerilog基本语法总结(上) 在总结SV的语法之前,先分享一些关于SV的笔试题目,这样更显得具有针对性的总结. a. 验证中,代码覆盖率是指(衡量哪些设计代码在激活触发,而哪一些则一直 ...
- Purchase Document Open Interface(PDOI)
PO模块也有自己的接口表,多用于把其他业务系统在Oracle EBS系统生成采购订单记录. Table Name Description Type PO_HEADERS_INTERFACE This ...
- program与module
program,各方面与module都类似,其中声明的变量在program中都可见, 生命周期也是static类型的, program的结束,也是需要等待其中的所有initial块都执行结束. 与mo ...
- JTAG – A technical overview and Timing
This document provides you with interesting background information about the technology that underpi ...
- C#在线更新程序[下载程序、解压缩程序、控制台程序]
[1]下载文件 using System;using System.Collections.Generic;using System.Linq;using System.Text;using Syst ...
- C# rmi例子
接口定义 实体定义,注意需要序列化 using System; namespace Interface { [Serializable] public class DataEntity { publi ...
随机推荐
- Centos7安装与配置domain模式wildfly(默认配置)
(1)安装与配置JDK8 1)使用wget下载JDK8: wget --no-check-certificate --no-cookies --header "Cookie: oraclel ...
- JTextArea设置滚动条
应将JTextArea置于JScrollPanel中 若要使只有垂直滚动条而没有水平滚动条,使用JTextArea.setLineWrap(true),自动换行. 以下摘自[url]http:// ...
- [软件工程基础]2017.11.03 第七次 Scrum 会议
具体事项 项目交接燃尽图 每人工作内容 成员 已完成的工作 计划完成的工作 工作中遇到的困难 游心 #10 搭建可用的开发测试环境:#9 阅读分析 PhyLab 后端代码与文档:#8 掌握 Larav ...
- 【Codeforces1111D_CF1111D】Destroy the Colony(退背包_组合数学)
题目: Codeforces1111D 翻译: [已提交至洛谷CF1111D] 有一个恶棍的聚居地由几个排成一排的洞穴组成,每一个洞穴恰好住着一个恶棍. 每种聚居地的分配方案可以记作一个长为偶数的字符 ...
- bryce1010专题训练——LCA
1.Targan算法(离线) http://poj.org/problem?id=1470 /*伪代码 Tarjan(u)//marge和find为并查集合并函数和查找函数 { for each(u, ...
- Technocup 2017 - Elimination Round 1 (Unofficially Open for Everyone, Rated for Div. 2) A
Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types ...
- [译]Understanding ECMAScript6 基本知识
基本知识 ECMAScript 6在ECMAScript 5之上做了大量的改变.一些改变很大,比如添加新的类型或者语法,而其它的非常小,提供了语言之上的渐进改进.这个章节包含了那些渐进改进,它们可能不 ...
- Parenthesis UVALive - 4882 删除不必要的括号序列,模拟题 + 数据
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_probl ...
- mouseover等闪烁问题
在使用mouseover等鼠标事件时如移动上去灰色的遮罩层高度从0到100% 在操作中发现鼠标一直在图里面但遮罩会一直变化,我感觉应该是遮罩层出现后导致鼠标离开了底层图片所以会一直变化.想起之前用的 ...
- C#入门笔记2 变量
变量关系到数据的存储,一个供程序操作的存储区的名字,每一个变量都一个特定的类型,类型决定变量的内存大小和布局. 注:必须一定要先声明,赋值后,才能使用. 变量声明 三种声明方式: 1.先声明,后赋值. ...