当前位置:网站首页>UVM - two way communication
UVM - two way communication
2022-07-24 10:42:00 【Bunny9__】
UVM—— Two-way communication
1. summary
- The same as one-way communication , Two-way communication (bidirectional communication) Both ends of are also divided into initiator and targer, But the data flow is bidirectional from end to end ;
- Both ends of two-way communication act at the same time producer and consumer Role , and initiator As request Initiator , Is initiating request after , Will wait response return ;
- UVM Bidirectional ports are divided into the following types :
- uvm_blocking_transport_PORT
- uvm_nonblocking_transport_PORT
- uvm_transport_PORT
- uvm_blocking_master_PORT
- uvm_nonblocking_master_PORT
- uvm_master_PORT
- uvm_blocking_slave_PORT
- uvm_nonblocking_slave_PORT
- uvm_slave_PORT
2. classification
- Two way ports are classified according to communication handshake :
- transport Two way communication
- master and slave Two way communication
- transport Port by transp() Method , It can be done during the same method call REQ and RSP Sending and returning of ;
- master and slave The means of communication must be through put、get and peek Call to , Only two methods can be used to complete a handshake communication ;
- master Port and slave The difference between ports is , When initiator As master when , He will initiate REQ To target End , And then from target End access RSP; When initiator Use slave Port time , It will start with target End access REQ, And then RSP To target End ;
- about master Port or slave Port implementation , Similar to one-way communication , It's just imp There are more methods to implement the component where the port is located ;
3. transport
class comp1 extends uvm_component;
uvm_blocking_transport_port #(itrans, otrans) bt_port;
`uvm_component_utils(comp1)
...
task run_phase(uvm_phase phase);
itrans itr;
otrans otr;
int trans_num = 2;
for(int i = 0; i < trans_num; i++) begin
itr = new("itr", this);
itr.id = i;
itr.data = 'h10 + i;
this.bt_port.transport(itr, otr);
`uvm_info("TRSPT", $sformatf("put itrans id: 'h0x, data: 'h0x | get otrans id: 'h0x, data: 'h0x", itr.id, itr.data, otr.id, otr.data), UVM_LOW)
end
endtask
endclass
class comp2 extends uvm_component;
uvm_blocking_transport_imp #(itrans, otrans, comp2) bt_imp;
`uvm_component_utils(comp2)
...
task transport(itrans req, output otrans rsp);
rsp = new("rsp", this);
rsp.id = req.id;
rsp.data = req.data << 8;
endtask
endclass
class env1 extends uvm_env;
comp1 c1;
comp2 c2;
`uvm_component_utils(env1)
...
function void build_phase(uvm_phase phase);
super.build_phase(phase);
c1 = comp1::type_id::create::("c1", this);
c2 = comp2::tyoe_id::create::("c2", this);
endfunction: build_phase
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
c1.bt_port.connect(c2.bt_imp);
endfunction: connect_phase
endclass


- comp1 yes initiator,comp2 yes target, Predefined transmission type itrans and otrans
- Instantiate the port
- stay target One side defines corresponding import Methods needed ,transport()
- Make connections in the top-level environment
边栏推荐
- js函数调用下载文件链接
- Simply use golang SQLC to generate MySQL query code
- MySQL - 删除数据库表中的数据
- The method modified by private can be accessed through reflection. What is the meaning of private?
- Arduino + AD9833 waveform generator
- [carving master learning programming] Arduino hands-on (59) - RS232 to TTL serial port module
- Adobe Substance 3D Designer 2021软件安装包下载及安装教程
- This usage, SystemVerilog syntax
- 563 pages (300000 words) overall design scheme of smart Chemical Park (phase I)
- In depth analysis of common cross end technology stacks of app
猜你喜欢

Distributed lock implementation scheme (glory collection version)

Intranet remote control tool under Windows

I admire a Google boss very much, and he left..

MySQL - hiding and deleting indexes

PC博物馆(1) 1970年 Datapoint 2000

Arduino + AD9833 waveform generator

38. REM adaptive layout

《nlp入门+实战:第二章:pytorch的入门使用 》

Association Rules -- July 10, 2022

Sentinel flow control quick start
随机推荐
[dish of learning notes dog learning C] advanced pointer
Binlog and iptables prevent nmap scanning, xtrabackup full + incremental backup, and the relationship between redlog and binlog
Partition data 2
Simply use golang SQLC to generate MySQL query code
Onpropertychange event "suggestions collection"
Qt创建应用程序托盘及相关功能
MySQL - unique index
分布式事务处理方案大 PK!
QT create application tray and related functions
Erlang学习番外
简单使用 MySQL 索引
[C Primer Plus Chapter 3 after class programming questions]
MySQL - multi column index
[carving master learning programming] Arduino hands-on (59) - RS232 to TTL serial port module
Call bind apply simple summary
数组元素移除问题
脚手架文件目录说明、文件暴露
Cross platform audio playback Library
Sentinel 三种流控模式
Sentinel flow control quick start