[UVM源代码研究] 我们每天都在用的uvm_tlm_analysis_fifo内部是如何工作的

别再为UVM TLM的analysis_port写write函数发愁了,一个uvm_tlm_analysis_fifo全搞定 本文介绍了如何使用uvm_tlm_analysis_fifo简化UVM TLM通信,避免手动实现write函数的繁琐操作。通过分析传统方式的痛点,详细解析uvm_tlm_analysis_fifo的架构和实现原理,并提供实战重构示例和高级应用场景,帮助工程师提升验证平台开发效率。 阅读详情
AI摘要

本文详细探讨了UVM环境中uvm_tlm_analysis_fifo的工作原理,涉及发送端的uvm_analysis_port与uvm_analysis_imp的通信方式,以及接收端uvm_blocking_get_port的选择及其内部实现。文章揭示了fifo的灵活性和组件间通信的细节。,

[UVM源代码研究] 我们每天都在用的uvm_tlm_analysis_fifo内部是如何工作的

通常我们环境中的两个uvm_component之间进行通信时,都会用一个uvm_tlm_analysis_fifo作为媒介,发送数据的组件(如monitor)内部定义一个uvm_analysis_port连接fifo的analysis_export,对应的通信方法是write;接受数据的组件内定义一个uvm_blocking_get_port连接到fifo的blocking_get_export,通信方法用的是get。

那么在这个uvm_tlm_analysis_fifo内部究竟是如何实现以上通信方法,以及这里的analysis_export和blocking_get_export在fifo内部又对应着什么样的imp实现呢,今天让我们一睹为快!

首先我们先来看看monitor端选择的port类型。通过之前对TLM机制的研究,我们知道之所以在monitor里选用uvm_analysis_port是因为monitor里抓到的transaction需要发送到不止一个组件里,所以必须用广播包的形式。一旦我们选定了在monitor内使用uvm_analysis_port,那就决定了与之配对的imp类型必须是uvm_analysis_imp类型,且实现的通信方法必须是write函数。查看tlm相关源代码如下来印证我们的猜想。
在这里插入图片描述

我们再看看源代码里关于uvm_analysis_port以及uvm_analysis_imp的定义
在这里插入图片描述

UVM TLM FIFO 类 uvm_tlm_analysis_fifo是 UVM(Universal Verification Methodology)中的一个重要组件,用于在验证环境中实现基于 TLM(Transaction Level Modeling)的通信。它是一个 FIFO(First-In-First-Out)缓冲区,可以存储通过 TLM 分析端口(uvm_tlm_analysisi_fifo)发送的事务(transactions),并提供了多种方法来访问和管理这些事务。一、核心方法功能:将事务t写入 FIFO。 阅读详情

相关推荐

[UVM源代码研究] 聊聊uvm_tlm_analysis_fifo这个特殊的uvm_component(uvm-1.2版)

聊聊uvm_tlm_analysis_fifo这个特殊的uvm_component

sunstat的博客 2565

UVM验证中的TLM通信:深入理解uvm_tlm_analysis_fifo与普通FIFO的区别

本文深入解析了UVM验证环境中uvm_tlm_analysis_fifo与普通uvm_tlm_fifo的核心区别。uvm_tlm_analysis_fifo通过analysis_export支持非阻塞广播写入,适用于Monitor到Scoreboard等一对多数据流场景;而普通FIFO采用阻塞式点对点通信,适用于有缓冲的精确数据传递。正确选择两者对构建高效、健壮的TLM通信架构至关重要。

tech5的博客 956

[UVM源代码研究] 解密uvm_tlm_analysis_fifo:为何它既是uvm_component又无需phase机制(uvm-1.2版)

本文深入剖析了UVM-1.2中uvm_tlm_analysis_fifo的设计原理。它继承自uvm_component以获得TLM通信资格,但无需参与phase机制,因其作为通用数据缓冲器,功能固定且无需工厂注册。文章通过源代码解读,解释了其直接使用new创建、parent参数可省略的原因,并探讨了其在验证环境中解耦组件通信的实用价值。

weixin_29201933的博客 206

《UVM实战》学习笔记——第四章 UVM中的TLM1.0通信

TLM通信

qq_42135020的博客 2754

uvm_tlm_fifo内部代码的相关方法和功能

uvm_tlm_analysis_fifo 提供了无限容量的 FIFO,并通过分析接口与其他组件通信,适合用于连接分析端口和目标组件,减少阻塞,提高效率。我们现在就UVM TLM FIFO 类来拆解uvm_tlm_fifo 的相关方法和功能,代码中包含了uvm_tlm_fifo 和 uvm_tlm_analysis_fifo。阻塞:uvm_tlm_analysis_fifo 的 write 操作是非阻塞的,而 uvm_tlm_fifo 的 put 操作可能是阻塞的。put(): 将事务放入 FIFO。

minsixiang的博客 1274

UVM验证中,用uvm_tlm_analysis_fifo替代手写analysis_imp的write函数,真香!

本文深入探讨了UVM验证中使用uvm_tlm_analysis_fifo替代手写analysis_imp的write函数的高效实践。通过分析传统实现方式的痛点,展示了uvm_tlm_analysis_fifo如何简化TLM通信机制,减少重复代码并提升验证平台的可维护性。文章详细介绍了其核心特性、内部实现机制及在scoreboard、coverage collector等场景中的最佳应用实践,帮助验证工程师提升工作效率。

weixin_42531886的博客 198

【信息科学与工程学】【产品体系】第三十三篇 DPU/smartinic芯片中的学科知识03

需求实现DMA 与流边界检测优化​分级超时状态机(短/中/长)+ 积压计数 + 批量触发DMA 控制器优化​描述符预取(深度 4)+ 中断合并(阈值 8)Fence 语义正确性验证​RTL 断言 + C 语言序列号检测 + 性能对比 + 硬件计数器所有代码均为可综合 Verilog,已在仿真器中通过基本功能测试。在 FPGA 原型上运行上述 RTL,配合 ChipScope 观察 fence 时序在 BlueField-3 上运行 DOCA DPA 测试程序,对比加/不加 fence 的结果。

weixin_49199313的博客 266

域自适应的理解与想法(Domain Adaptation)

这幅图是域适应非常有名的一篇论文中的插图,被很多文章转载。 什么是领域自适应? Domain Adaptation是迁移学习中很重要的一部分内容,目的是把分布不同的源域和目标域的数据,映射到一个特征空间中,使其在该空间中的距离尽可能近。于是在特征空间中对source domain训练的目标函数,就可以迁移到target domain上,提高target domain上的准确率。 上面的图主要的思想来源于GAN,上图由三部分组成:特征映射网络 标签分类网络和和域判别网络 其中,source domain的数.

yuanxue18的博客 5981

802.11ax 的OFDMA资源分配详解

802.11ax 引入的最重要的技术就是OFDMA。OFDMA中引入了RU(资源块)概念,也就是20Mhz/40Mhz/80Mhz/160Mhz的带宽可以切割成不同尺寸的RU,分配给不同的用户使用,这样就大大提高了频谱资源的利用率。 常见的RU尺寸有26/52/102/242/484/996,单位是子载波,每个子载波是78.125Khz,这样20Mhz的带宽可以划分为如下图所示的不同RU大小。 按照11ax规范的要求,上下行的数据传输都可以由AP来统一调度,这样上下行的OFDM...

weixin_43408952的博客 1万+

FreeRtos——10、全局看门狗设计

RTOS 里的看门狗不只是为了证明 CPU 还在动,而是为了证明每个业务逻辑都在按预期的节奏“呼吸”。

qq_40170041的博客 899

Linux单独编译设备树,开发者分享 | Petalinux 工程中设备树的介绍

本文来自XILINX嵌入式产品应用工程师 Terry Ni设备树是 Petalinux kernel 的关键组件,接下来以 2020.1 版本为例,为大家介绍一下在Xilinx Petalinux 工程中的设备树是如何产生,配置以及修改的。Petalinux 工程中设备树的位置当我们创建了一个 petalinux 工程后(以zcu102为例),在编译的时候,会自动生成对应的设备树文件。这些设备树的...

weixin_28877107的博客 2576

从标记基因到功能分析:手把手教你人工注释单细胞亚群的完整流程

本文详细介绍了人工注释单细胞亚群的完整流程,从标记基因筛选到功能分析验证,特别针对肿瘤微环境、发育轨迹等复杂场景提供解决方案。通过差异表达分析、多维数据整合和实验验证,帮助研究者准确识别细胞类型,提升单细胞转录组研究的生物学解读深度。

jenkins8butler的博客 243

GEE:变异系数法在遥感影像分析中的应用及权重计算

本文介绍了在Google Earth Engine(GEE)平台上基于变异系数法的多指标加权遥感影像分析方法。该方法通过计算每个指标的平均值和标准差,进而计算变异系数来评估指标的变化程度。利用变异系数,我们可以计算每个指标的权重,并将其应用于加权和指数的计算,从而提高遥感影像分析的准确性和可靠性。方法应用于计算Risk-Screening Environmental Indicators (RSEI),并以此为例。

养乐多的博客 2270

YOLOv8安防监控实战:跌倒/闯入/徘徊实时检测(附TensorRT加速+声光报警部署代码)

精准性:针对跌倒/闯入/徘徊的行为特征优化,准确率达89.3%,误报率低于5次/天;实时性:TensorRT加速到50+FPS,报警延迟<1秒,满足安防“黄金响应时间”;低成本:无需专用AI芯片,RTX 3060或Jetson Orin就能跑,硬件成本比传统方案低60%;易部署:代码全开源,提供从模型训练到硬件联动的完整流程,2天即可搭起原型系统。如果你的安防监控还在“漏报误报”“响应慢”,建议先从跌倒检测的姿态过滤改起——用100张样本测试,再集成TensorRT加速,90%能看到明显改善。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 677

【HFSS】仿真目录

Author: JiJi\textrm{Author: JiJi}Author: JiJi Created Time: 2026.04.27\textrm{Created Time: 2026.04.27}Created Time: 2026.04.27 Modified Time: 2026.04.27\textrm{Modified Time: 2026.04.27}Modified Time: 2026.04.27如果大家觉得有用,就点个赞吧,在阅读过程中存在任何困惑,可在下方评论区留言~

u011699626的博客 310

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

上一篇: [UVM源代码研究] sequencer与driver之间如何实现通信
下一篇: [UVM源代码研究] 当我们调用uvm_config_db里的函数时uvm内部都是怎么工作的
数字验证Kane陈
博客等级 码龄12年 662粉丝 48原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值