ic验证笔记-20天挑战day16

1.TLM2.0通信

TLM2.0主要包括:

双向的阻塞或者非阻塞接口

时间标记

统一的数据包

TLM2.0的传输是双向的,意味着在一次完整传输中有request和response类型

TLM2.0支持blocking和nonblocking两种transport方式

blocking的传输方式要求在一次传输过程中,完成request和response的传输

nonblocking的传输方式将request和response的传输分为了两个独立的单向传输,而两次传输整体视为完成一次握手传输。

对应的uvm方法

task b_transport(T t, uvm_tlm_time delay);

function uvm_tlm_sync_e nb_transport_fw(T t, ref P p, input uvm_tlm_time_delay);//forward

function uvm_tlm_sync_e nb_transport_bw(T t, ref P p, input uvm_tlm_time_delay);//backward

T代表着统一的传输数据类uvm_tlm_generic_payload,P代表着在nonblocking传输方式中用来做状态同步的类型

TLM2.0将端口类定义为socket,包含port,export,imp

put(),get(),peek()变为了b_transport(),nb_transport_fw(),nb_transport_bw();

uvm_tlm_generic_payload:

bit[63:0] m_address:数据的读写地址

uvm_tlm_command_e m_command:数据的读写命令

byte unsigned data[]:写入的数据或者读出的数据,由byte unsigned的类型构成动态数组,按照总线传输的最小粒度进行划分,便于target一侧进行数据整合

int unsigned length:data数组的长度,该数值应该与data数组的实际容量保持一致

uvm_tlm_response_status_e m_response_status :由target返回的状态值,表示数据传输是否完成和有效

byte unsigned m_byte_enable[]:用来标记写入数据的有效性,标记哪个byte应该写入

int unsigned m_byte_enable_length:该数值应该等于m_byte_enable数组的容量值

m_stream_width:用来表示连续传输时的数据传输长度

uvm_tlm_extension_base m_extensions[uvm_tlm_extension_base]:如果一些数据域不在上面的部分,那么可以在这个数据延伸域中添加

时间类uvm_tlm_time

class comp1 extends uvm_component;

        uvm_tlm_b_initiator_socket b_ini_skt;

        `uvm_component_utils(comp1)

        ...

        task run_phase(uvm_phase phase);

                byte unsigned data[] = {1, 2, 3, 4, 5, 6, 7, 8};

                uvm_tlm_generic_payload p1 = new("p1");

                uvm_tlm_time delay = new("delay");

                p1.set_address('h0000F000);

                p1.set_data_length(8);

                p1.set_data(data);

                p1.set_byte_enable_length(8);

       
学习uvm必看的书。 1. Overview.............................................................................................................................................. 1 1.1 Introduction to UVM.................................................................................................................. 1 1.1.1 Coverage-Driven Verification (CDV) ........................................................................ 1 1.1.2 Testbenches and Environments .................................................................................. 1 1.2 Verification Component Overview ............................................................................................ 3 1.2.1 Data Item (Transaction) .............................................................................................. 3 1.2.2 Driver (BFM) .............................................................................................................. 3 1.2.3 Sequencer .................................................................................................................... 3 1.2.4 Monitor ....................................................................................................................... 3 1.2.5 Agent ........................................................................................................................... 4 1.2.6 Environment ................................................................................................................ 4 1.3 The UVM Class Library............................................................................................................. 5 1.4 Other UVM Facilities................................................................................................................. 7 1.4.1 UVM Factory .............................................................................................................. 7 1.4.2 Transaction-Level Modeling (TLM) .......................................................................... 8 2. Transaction-Level Modeling (TLM) ................................................................................................... 9 2.1 Overview .................................................................................................................................... 9 2.2 TLM, TLM-1, and TLM-2.0 ...................................................................................................... 9 2.2.1 TLM-1 Implementation ............................................................................................ 10 2.2.2 TLM-2.0 Implementation ......................................................................................... 10 2.3 Basics ....................................................................................................................................... 10 2.3.1 Transactions .............................................................................................................. 10 2.3.2 Transaction-Level Communication .......................................................................... 11 2.3.3 Basic TLM Communication ..................................................................................... 11 2.3.4 Communicating between Processes .......................................................................... 12 2.3.5 Blocking versus Nonblocking ................................................................................... 13 2.3.6 Connecting Transaction-Level Components ............................................................ 13 2.3.7 Peer-to-Peer connections .......................................................................................... 14 2.3.8 Port/Export Compatibility ......................................................................................... 14 2.4 Encapsulation and Hierarchy ................................................................................................... 14 2.4.1 Hierarchical Connections .......................................................................................... 14 2.4.2 Connection Types ..................................................................................................... 16 2.5 Analysis Communication ......................................................................................................... 16 2.5.1 Analysis Ports ........................................................................................................... 16 2.5.2 Analysis Exports ....................................................................................................... 17 2.6 Generic Payload ....................................................................................................................... 18 2.6.1 Attributes .................................................................................................................. 18 2.6.2 Accessors .................................................................................................................. 19 2.6.3 Extensions ................................................................................................................. 20 2.7 Core Interfaces and Ports ......................................................................................................... 21 2.8 Blocking Transport................................................................................................................... 22 2.9 Nonblocking Transport ............................................................................................................ 22 2.10 Sockets ..................................................................................................................................... 24 2.11 Time ......................................................................................................................................... 26 2.12 Use Models............................................................................................................................... 28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值