UVM TLM Blocking Put

Blocking put is a fundamental UVM TLM communication mechanism where a producer sends a transaction and waits until the consumer finishes processing it before continuing execution.

Learning Objectives

  • Understand blocking communication in UVM TLM
  • Learn the roles of port, export, and implementation
  • Understand how transactions are routed between components
  • Run and analyze a working example

What is Blocking Put?

In blocking put communication, the sender calls the put() method and waits until the receiver completes the operation. The sender resumes execution only after the consumer finishes processing the transaction.

Blocking behavior guarantees ordered and synchronized transaction transfer.

Architecture Overview

Blocking put communication is built using three TLM elements. Each element has a specific responsibility in the communication chain.

Producer (Port) → Export (Forwarding) → Implementation (Consumer)

TLM Components

Blocking Put Port

The port belongs to the producer and initiates the transaction transfer. It declares the put() interface but does not implement it.

uvm_blocking_put_port #(packet) put_port;
  • Owned by the sender
  • Calls put()
  • Contains no implementation logic
Blocking Put Export

The export forwards the transaction to another component. It enables hierarchical connections without adding behavior.

uvm_blocking_put_export #(packet) put_export;
Blocking Put Implementation

The implementation resides in the consumer and contains the actual put() task that processes the transaction.

uvm_blocking_put_imp #(packet, consumer) put_imp;
The producer remains blocked until this implementation finishes.

Connections and Code Behavior

p.put_port.connect(c.put_export);
c.put_export.connect(c.put_imp);

Connections are established during the connect_phase. When the producer calls put(), UVM routes the call through the connected chain until it reaches the implementation.

Port → Export → Implementation → put()

Because the call is blocking, execution returns to the producer only after the consumer's put() task completes.

Execution Flow

  1. Producer calls put(transaction)
  2. Call is forwarded through export
  3. Consumer implementation executes
  4. Method returns to producer
Blocking duration depends entirely on the execution time of the consumer’s put() task.

Verification Insight

Blocking put is commonly used between drivers, reference models, and scoreboards where transaction completion and ordering must be guaranteed.

Run This Example on EDA Playground

Run the complete example directly in your browser without installing tools.

▶ Open in EDA Playground

View Source Code on GitHub

The complete source code for this example is available on GitHub. You can explore the project structure, download the files, or clone the repository to run locally.

Open on GitHub