Clock Verification IP

Clock Verification IP

IP 参数及接口

在这里插入图片描述

IP 例化界面

在这里插入图片描述

相关函数

start_clock

//产生时钟 
<hierarchy_path>.IF.start_clock

stop_clock

//停止时钟 
<hierarchy_path>.IF.stop_clock

set_initial_value

//设置时钟初始值为 0
<hierarchy_path>IF.set_initial_value(0)
//设置时钟初始值为 1
<hierarchy_path>IF.set_initial_value(1)

set_clk_prd

//设置时钟周期、占空比、抖动是能、抖动范围
<hierarchy_path>IF.set_clk_prd(.user_period(200),.user_duty_cycle(0.3),.user_jitter_on(1),.user_jitter_min_range(0.0),.user_jitter_max_range(0.01));

set_clk_frq

//设置时钟频率、占空比、抖动是能、抖动范围
<hierarchy_path>IF.set_clk_prd(.user_frequency(10000000),.user_duty_cycle(0.3),.user_jitter_on(1),.user_jitter_min_range(0.0),.user_jitter_max_range(0.01));

set_master_mode

//设置 CLK_VIP 模式为 Master
< hierarchy_path>.set_master_mode();

set_passthrough_mode

//设置 CLK_VIP 模式为 passthrough
< hierarchy_path>.set_passthrough_mode();

参考代码

`timescale 1ps / 1ps
`include "clk_monitor.sv"module clk_vip_0_exdes_tb();wire                                                                     clk_out;//Declare monitor for master CLK VIP clk_monitor#(10.0)                                       mst_monitor;//Declare monitor for passthrough CLK VIP clk_monitor#(10.0)                                       passthrough_monitor;initial begin/*******************************************************************************************   *    The hierarchy path of the CLK VIP's interface is passed to the monitor when it is newed*    construct mst_monitor and assign the master clk vip interface to its virtual interface*    construct passthrough_monitor and assign the passthrough clk vip interface to its*    virtual interface*******************************************************************************************/mst_monitor =new("Clk mst_monitor",clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_mst.inst.IF);passthrough_monitor =new("Clk passthrough_monitor",clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF);/******************************************************************************************* switch passthrough VIP into runtime master mode*     8.1 start clock-- this will generate the default clk with period(default passthrough clk*         vip period) with no jitter,  duty cycle 50%*     8.2 turn on mst_monitor clk check with expected clk settings*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.set_master_mode();#1ns;clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.set_initial_value(0);clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.start_clock();passthrough_monitor.enable_clk_check(.expected_period(10.0),.expected_duty_cycle(0.50),.expected_jitter(0.0));#(10.0*10*1ns);/*******************************************************************************************  *     9.1 update clock by calling set_clk_prd with clock period, duty cycle,jitter on/off,*        jitter minmum range, jitter maximum range,if jitter is on,it means*        that the jitter is randomized picked between jitter minmum range and jitter maximum*        range)*     9.2 turn on the monitor check with expected clock period, duty cycle and jitter*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.set_clk_prd(.user_period(1000),.user_duty_cycle(0.3),.user_jitter_on(1),.user_jitter_min_range(0.0),.user_jitter_max_range(0.01));passthrough_monitor.enable_clk_check(.expected_period(1000),.expected_duty_cycle(0.3),.expected_jitter(0.01));#4000ns;/******************************************************************************************* *   10.1 update clock by calling set_clk_frq with clock frequency, duty cycle,jitter on/off,*        jitter minmum range, jitter maximum range,if jitter is on,it means *        that the jitter is randomized picked between jitter minmum range and jitter maximum*        range)*    10.2 turn on the monitor check with expected clock period, duty cycle and jitter*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.set_clk_frq(.user_frequency(10000000),.user_duty_cycle(0.7),.user_jitter_on(0),.user_jitter_min_range(0.0),.user_jitter_max_range(0.00));passthrough_monitor.enable_clk_check(.expected_period(100),.expected_duty_cycle(0.7),.expected_jitter(0));#810ns;/*******************************************************************************************  * update clock again with different period and duty cycle*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.set_clk_prd(.user_period(200),.user_duty_cycle(0.4),.user_jitter_on(1),.user_jitter_min_range(0.0),.user_jitter_max_range(0.02));passthrough_monitor.enable_clk_check(.expected_period(200),.expected_duty_cycle(0.4),.expected_jitter(0.0));#1080ns;/******************************************************************************************* * stop clock and disable passthrough monitor*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.IF.stop_clock();passthrough_monitor.disable_clk_check();#1;/*******************************************************************************************  * set clk_vip_passthrough back into passthrough mode*******************************************************************************************/clk_vip_0_exdes_tb.DUT.ex_design.clk_vip_passthrough.inst.set_passthrough_mode();#(10*1ns);$display("EXAMPLE TEST DONE : Test Completed Successfully");$finish;endchip DUT(.clk_out(clk_out));endmodule

官方手册:pg291-clk-vip

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/732394.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LeetCode 2386.找出数组的第 K 大和:逆向思维(小根堆)

【LetMeFly】2386.找出数组的第 K 大和&#xff1a;逆向思维&#xff08;小根堆&#xff09; 力扣题目链接&#xff1a;https://leetcode.cn/problems/find-the-k-sum-of-an-array/ 给你一个整数数组 nums 和一个 正 整数 k 。你可以选择数组的任一 子序列 并且对其全部元素求…

Android性能优化 - ANR的分析和解决

一、ANR概念 1.定义 “Application Not Responding”的缩写&#xff0c;即“应用程序无响应”。如果你应用程序在UI线程被阻塞太长时间&#xff0c;就会出现ANR。 2.类型 ① KeyDispatchTimeout&#xff08;常见&#xff09; input事件在5S内没有处理完成发生了ANR。logca…

Python和Google Colab进行卫星图像二维小波变化和机器学习

2D 小波分解是图像处理中的一种流行技术,使用不同的滤波器将图像分解为不同的频率分量(“近似”和“细节”系数)。该技术对于各种图像处理任务特别有用,例如压缩、去噪、特征提取和边缘检测。 在本文中,我们将演示如何在 Google Colab 中使用 Python 下载高分辨率样本卫星…

划拳(c++题解)

题目描述 小王和小明在吃饭的时候玩起了划拳游戏。 游戏规则是&#xff0c;每一轮两个人同时说出一个数&#xff08;只能是 中的一个&#xff09;&#xff0c;若两人说出的数一样&#xff0c;则两人均不计分&#xff0c;否则说出数字更大的人获得两人说出的数差值这么多的分…

解决火狐浏览器访问地址受限制问题(This address is restricted)

问题如下图&#xff1a; This address is restrictedThis address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection. 此地址受到限制 此地址使用通常用于 Web 浏览以外的目的的网…

【Pytorch】进阶学习:基于矩阵乘法torch.matmul()实现全连接层

【Pytorch】进阶学习&#xff1a;基于矩阵乘法torch.matmul()实现全连接层 &#x1f308; 个人主页&#xff1a;高斯小哥 &#x1f525; 高质量专栏&#xff1a;Matplotlib之旅&#xff1a;零基础精通数据可视化、Python基础【高质量合集】、PyTorch零基础入门教程&#x1f448…

深入了解304缓存原理:提升网站性能与加载速度

&#x1f90d; 前端开发工程师、技术日更博主、已过CET6 &#x1f368; 阿珊和她的猫_CSDN博客专家、23年度博客之星前端领域TOP1 &#x1f560; 牛客高级专题作者、打造专栏《前端面试必备》 、《2024面试高频手撕题》 &#x1f35a; 蓝桥云课签约作者、上架课程《Vue.js 和 E…

微信小程序开发系列(十八)·wxml语法·声明和绑定数据

目录 1. 双大括号写法用法一&#xff1a;展示内容 步骤一&#xff1a;创建一个data对象 步骤二&#xff1a;双大括号写法的使用 步骤三&#xff1a;拓展 2. 双大括号写法用法二&#xff1a;绑定属性值 步骤一&#xff1a;给对象赋一个属性值 步骤二&#xff1a;双大括…

激光打标机红光与激光不重合:原因及解决方案

激光打标机红光和激光不在一个位置的问题可能由多种原因导致。以下是一些可能的原因和解决方法&#xff1a; 1. 激光器光路调整不当&#xff1a;激光器光路调整不当会导致激光束偏移&#xff0c;从而使红光与激光不重合。解决方法是重新调整激光器的光路&#xff0c;确保激光束…

【文档智能】再谈基于Transformer架构的文档智能理解方法论和相关数据集

前言 文档的智能解析与理解成为为知识管理的关键环节。特别是在处理扫描文档时&#xff0c;如何有效地理解和提取表单信息&#xff0c;成为了一个具有挑战性的问题。扫描文档的复杂性&#xff0c;包括其结构的多样性、非文本元素的融合以及手写与印刷内容的混合&#xff0c;都…

Java本地接口(Java Native Interface,JNI)讲解

Java本地接口&#xff08;Java Native Interface&#xff0c;JNI&#xff09;是一个编程框架&#xff0c;允许Java代码与其他语言写的代码&#xff0c;特别是C和C&#xff0c;进行交互。这个功能使得Java程序能够调用系统级别的库和那些已经用这些语言实现的库。JNI主要用于两个…

C# winform 重启电脑

一、重启电脑指令 windows7系统的启动文件夹为“开始菜单”——“所有程序”里面就有“启动”文件夹&#xff0c;其位置是 “C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup” 如果没有&#xff0c;则需要将其中的"administrator…

【正点原子STM32探索者】CubeMX+Keil开发环境搭建

文章目录 一、简单开箱二、资料下载三、环境搭建3.1 安装Keil MDK3.2 激活Keil MDK3.3 安装STM32CubeMX3.4 安装STM32F4系列MCU的Keil支持包 四、GPIO点灯4.1 查阅开发板原理图4.2 创建STM32CubeMX项目4.3 配置系统时钟和引脚功能4.4 生成Keil项目4.5 打开Keil项目4.6 编译Keil…

Java学习笔记NO.18

T1.理工超市 &#xff08;1&#xff09;题目描述 编写一个程序&#xff0c;设计理工超市功能菜单并完成注册和登录功能的实现。显示完菜单后&#xff0c;提示用户输入菜单项序号。当用户输入<注册>和<登录>菜单序号时模拟完成注册和登录功能&#xff0c;最后提示…

使用Python快速提取PPT中的文本内容

直接提取PPT中的文本内容可以方便我们进行进一步处理或分析&#xff0c;也可以直接用于其他文档的编撰。通过使用Python程序&#xff0c;我们可以快速批量提取PPT中的文本内容&#xff0c;从而实现高效的信息收集或对其中的数据进行分析。本文将介绍如何使用Python程序提取Powe…

模拟实现C语言库函数(strlen,strcpy,strcat)

模拟实现strlen 三种方法 size_t my_strlen(char* s)//计数器 {size_t count 0;while (*(s))count;return count; }size_t my_strlen(char* s)//递归 {if (*s \0)return 0;elsereturn my_strlen(s) 1; }size_t my_strlen(char* s)//指针-指针 {char* tmp s;while (*(s));…

设计模式-代理模式使用教程

在 Java 中实现代理模式通常包括两种方式&#xff1a;静态代理和动态代理。静态代理是在编译时就已经确定代理类和真实对象的关系&#xff0c;而动态代理则是在运行时动态生成代理类。下面&#xff0c;我会分别解释如何在项目中实践这两种代理模式。 静态代理 定义接口&#…

HTML5基础2

drag 可以把拖放事件拆分成4个步骤 设置元素为可拖放。为了使元素可拖动&#xff0c;把 draggable 属性设置为 true 。 <img draggable"true"> 拖动什么。ondragstart 和 setData() const dragestart (ev)>{ev.dataTransfer.setData(play,ev.target.id)} …

Pytorch线性回归实现(原理)

设置梯度 直接在tensor中设置 requires_gradTrue&#xff0c;每次操作这个数的时候&#xff0c;就会保存每一步的数据。也就是保存了梯度相关的数据。 import torch x torch.ones(2, 2, requires_gradTrue) #初始化参数x并设置requires_gradTrue用来追踪其计算历史 print(x…

软考笔记--系统架构评估

系统架构评估是在对架构分析、评估的基础上&#xff0c;对架构策略的选取进行决策。它利用数据或逻辑分析技术&#xff0c;针对系统的一致性&#xff0c;正确性&#xff0c;质量属性&#xff0c;规划结果等不同方面&#xff0c;提供描述性&#xff0c;预测性和指令性的分析结果…