TODO 不完整,有时间再更新

SystemC 介绍

SystemC不是一门新的语言,而是基于C++开发的library

TLM2 介绍

如果都是SV code的话,结构上类型TLM1

TLM2 提供了下面2中传输接口

Blocking (b_transport) completes the entire transaction within a single method call
Non-blocking (nb_transport) describes the progress of a transaction using multiple nb_transport() method calls going back-and-forth between initiator and target

Contents

passthrough: 可以直接initiator connect到passthrough

uvm_tlm_b_initiator_socket#(uvm_tlm_generic_payload) init_skt; uvm_tlm_b_passthrough_initiator_socket#(uvm_tlm_generic_payload) pt_init_skt;init_skt.connect(pt_init_skt);

example:

initiator implement

class initiator extends uvm_component;`uvm_component_utils (initiator)// Declare a blocking transport socket (using initiator socket class)uvm_tlm_b_initiator_socket #(simple_packet) initSocket;uvm_tlm_time   delay;simple_packet  pkt;function new (string name = "initiator", uvm_component parent= null);super.new (name, parent);endfunctionvirtual function void build_phase (uvm_phase phase);super.build_phase (phase);// Create an instance of the socketinitSocket = new ("initSocket", this);delay = new ();endfunctionvirtual task run_phase (uvm_phase phase);pkt = simple_packet::type_id::create ("pkt");//...initSocket.b_transport (pkt, delay);endtask
endclass

target implement

class target extends uvm_component;`uvm_component_utils (target)// Declare a blocking target socketuvm_tlm_b_target_socket #(target, simple_packet) targetSocket;function new (string name = "target", uvm_component parent = null);super.new (name, parent);endfunctionvirtual function void build_phase (uvm_phase phase);super.build_phase (phase);// Create an instance of the target sockettargetSocket = new ("targetSocket", this);endfunction// Provide the implementation method of b_transport in the target classtask b_transport (simple_packet pkt, uvm_tlm_time delay);pkt.print (uvm_default_line_printer);endtask
endclass

initiator and target connection

class my_env extends uvm_env;`uvm_component_utils (my_env)initiator   init;target      tgt;function new (string name = "my_env", uvm_component parent = null);super.new (name, parent);endfunctionvirtual function void build_phase (uvm_phase phase);super.build_phase (phase);// Create an object of both componentsinit = initiator::type_id::create ("init", this);tgt = target::type_id::create ("tgt", this);endfunction// Connect both sockets in the connect_phasevirtual function void connect_phase (uvm_phase phase);init.initSocket.connect (tgt.targetSocket);endfunction
endclass

SC 与 SV 信息传递

ref:

https://www.chipverify.com/uvm/tlm-sockets

UVM TLM2: SystemC和SV 通信相关推荐

  1. (4)UVM TLM2.0

    UVM TLM2.0 概述 接口实现 传送数据 时间标记 示例 概述 TLM是一种为了构建更高级抽象模型的传输方式.虽然SV语言本身没有原生的TLM传输方式,但是TLM在UVM很好地集成进来,并且在组 ...

  2. UVM TLM2.0简单介绍

    文章目录 前言 一.UVM TLM2.0 二.Blocking Transport 2.1 Blocking Initiator 2.2 Blocking target 三.Non-Blocking ...

  3. UVM——TLM2通信

    TLM2通信 TLM2.0多用于SystemC,与TLM1.0相比,2.0的优势包括: - 双向的阻塞或非阻塞接口 - 时间标记 - 统一的数据包 TLM2.0使得接口之间的通信更趋于标准化,更容易为 ...

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

    文章目录 前言 一.TLM1.0 1.TLM的定义 2.数据流:数据流动的方向 3.控制流:动作发起者initiator.动作接收者target 4.各种端口的连接 5.transport 6.non ...

  5. UVM中component之间如何通信

    在简单的测试平台里,component之间通过变量或者config_db机制通信是可行的,但是如果在复杂测试平台中依然使用这种耦合性很强的方式通信的话,就不太行了.因此,UVM提供了TLM这样的概念. ...

  6. (14)UVM 史上最全通信管道介绍

    UVM通信管道 文章目录 UVM通信管道 一.前言 二.TLM FIFO 三.Analysis Port 四.Analysis TLM FIFO 五.Request & Response 通信 ...

  7. 【UVM基础】TLM1.0 通信机制(port/export/imp/analysis_xxx)快速上手指南

    知识点: 通过端口分辨initiator和traget.如:有两个端口port和imp,那initiator一定是port端,而target是imp端:连接的时候也是port.connect(imp) ...

  8. UVM通信篇之五:TLM2通信

    本文转自:http://www.eetop.cn/blog/html/28/1561828-5940102.html 在本章之前的部分中,读者们认识了TLM是一种为了构建更高级抽象模型的传输方式.虽然 ...

  9. 芯片漫游指南(3)-- UVM通信

    目录 1.TLM通信 1.1 概述 1.2 基本概念 1.3 分类 1.4 端口的使用 2. 单向通信 2.1 概念 2.2 方法 2.3 示例 3.双向通信 3.1 概述 3.2 分类 3.3 tr ...

最新文章

  1. scrapy的几个文件属性
  2. C++ - 给出一个函数来连接两个字符串A和B,其中字符串A的后几个字节和字符串B的前几个字节重叠
  3. 100行的python作品详解_不到 100 行 Python 代码徐峥变葛优
  4. 《趣题学算法》—第0章0.3节算法的伪代码描述
  5. ASP.NET WebAPI 集成 Swagger 启用 OAuth 2.0 配置问题
  6. java输错重新输入_java程序在dos界面运行时输入错误后返回重新输入的方法
  7. vue-cli搭建项目的目录结构及说明
  8. Linux下DRBD配置
  9. mysql full customer_mysql优化通常使用的几种方法
  10. UNION ALL vs UNION
  11. win7硬盘分区软件_系统软件
  12. 关于centos7重启报错:[sdb] Assuming drive cache: write through [sda] Assuming drive 解决如下
  13. scylladb集群管理
  14. 自动同步github项目到本地gitlab
  15. python学习之recognition的多人人脸识别
  16. MATLAB实现多重共线性诊断及处理
  17. python与以太坊交互将区块链信息存入SQLite数据库
  18. 2013华为校园招聘面经
  19. 878. 第 N 个神奇数字(二分查找+数学)| 1819. 序列中不同最大公约数的数目(枚举+数学)
  20. alfred 开发_适用于开发人员设计师和博客的7种Alfred工作流程

热门文章

  1. CentOS7中使用yum安装php5.6的方法
  2. Javascript万年历
  3. 汉与匈奴之战,中华民族兴起的序幕
  4. 学习日记20160915
  5. 爱德泰科普 | 单模光纤和多模光纤小知识
  6. CCF201403-5 任务调度
  7. Silverlight的未来[译文]
  8. repo 工具使用手册
  9. android通过百度语音合成实现文字转换成语音(TTS)详细教程?
  10. matlab怎样编程形成软件_MATLAB程序设计语言(1)-入门 – MATLAB中文论坛