资源简介
业界通用验证方法学。包内包括userguide, reference, source code, examples.
代码片段和文件信息
//----------------------------------------------------------------------
// Copyright 2007-2011 Cadence Design Systems Inc.
// Copyright 2009-2010 Mentor Graphics Corporation
// Copyright 2010-2011 Synopsys Inc.
// All Rights Reserved Worldwide
//
// Licensed under the Apache License Version 2.0 (the
// “License“); you may not use this file except in
// compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in
// writing software distributed under the License is
// distributed on an “AS IS“ BASIS WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND either express or implied. See
// the License for the specific language governing
// permissions and limitations under the License.
//----------------------------------------------------------------------
#include “vpi_user.h“
#include “veriuser.h“
#include “svdpi.h“
#include
#include
#include
/*
* UVM HDL access C code.
*
*/
/*
* This C code checks to see if there is PLI handle
* with a value set to define the maximum bit width.
*
* If no such variable is found then the default
* width of 1024 is used.
*
* This function should only get called once or twice
* its return value is cached in the caller.
*
*/
static int uvm_hdl_max_width()
{
vpiHandle ms;
s_vpi_value value_s = { vpiIntVal { 0 } };
ms = vpi_handle_by_name(
(PLI_BYTE8*) “uvm_pkg::UVM_HDL_MAX_WIDTH“ 0);
if(ms == 0)
return 1024; /* If nothing else is defined
this is the DEFAULT */
vpi_get_value(ms &value_s);
return value_s.value.integer;
}
#ifdef QUESTA
static int uvm_hdl_set_vlog(char *path p_vpi_vecval value PLI_INT32 flag);
static int uvm_hdl_get_vlog(char *path p_vpi_vecval value PLI_INT32 flag);
static int partsel = 0;
/*
* Given a path with part-select break into individual bit accesses
* path = pointer to user string
* value = pointer to logic vector
* flag = deposit vs force/release options etc
*/
static int uvm_hdl_set_vlog_partsel(char *path p_vpi_vecval value PLI_INT32 flag)
{
char *path_ptr = path;
int path_len idx;
svLogicVecVal bit_value;
path_len = strlen(path);
path_ptr = (char*)(path+path_len-1);
if (*path_ptr != ‘]‘)
return 0;
while(path_ptr != path && *path_ptr != ‘:‘ && *path_ptr != ‘[‘)
path_ptr--;
if (path_ptr == path || *path_ptr != ‘:‘)
return 0;
while(path_ptr != path && *path_ptr != ‘[‘)
path_ptr--;
if (path_ptr == path || *path_ptr != ‘[‘)
return 0;
int lhs rhs width incr;
// extract range from path
if (sscanf(path_ptr“[%u:%u]“&lhs &rhs)) {
char index_str[20];
int i;
path_ptr++;
path_len = (path_len - (path_ptr - path));
incr = (lhs>rhs) ? 1 : -1;
width = (lhs>rhs) ? lhs-rhs+1 : rhs-lhs+1;
// perform set for each individual bit
for (i=0; i < width; i+
- 上一篇:嵌入式系统原理及应用.pdf
- 下一篇:遥感影像去云处理
相关资源
- UVM实用指南-A Practical Guide to Adopting
- Getting Started with UVM
- uvm user guide
- uvm+vcs+verdi基本平台搭建
- A Practical Guide to Adopting the Universal Ve
- UVM实战
- uvm_ref_flow_2013.05
- UVM实战卷1
- uvm_users_guide_1.1(学习uvm必备,可添加
- UVM实战 张强
- 数字电路验证环境UVM实战教学
- uvm-cookbook-complete-verification-academy
- AMBA_UVM验证DEMO
- modelsim/questasim-gcc-4.5.0-mingw64编译器
- FPGA原型验证方法学
- The UVM Primer中文+英文
- UVM验证方法学
- 夏宇闻SystemVerilog+验证方法学.pdf
- UVM_A Practical Guide to Adopting the Universa
- TheUVMPrimer.pdf
- 低功耗验证方法学中文清晰版
- 芯片验证漫游指南以及源代码.zip
- UVM经典学习资料
- 学习vmm的好,用SV写的代码
- vim下systemverilog/VMM/UVM语法高亮文件
- 03_UVM-Harness.pdf
- SPI_UVM_VIP SPI协议的芯片验证VIP
- UVM实战以及源代码
- UVM实战 卷 I pdf
- vim_verilog_systemverilog_uvm_语法高亮.zip
评论
共有 条评论