Tutorials

Learn More

  1. It provides pass by value transaction-level interface.
  2. It consists of ports, interface, and FIFOs
  3. Ports: To communicate between each component (producer and consumer) should have
    a. port: A port must provide implementation direct to imp or through export.
    b. Interface: helps to transmit transactions based on request or timely broadcasting way.
    c. FIFO: one component can store transactions in FIFO, while another component will consume it.

Ports in TLM 1.0

All TLM connections are checked before the test runs.

  1. Port: It operates to control transaction flow. It can either send or demand transactions.
  2. Imp: Based on connected port/ export, it can send or receive transactions.
  3. Export: It forwards transactions from one component to another or from one layer to another.
  4. Valid Connections:
    a. port to port
    b. port to export
    c. port to imp
    d. export to export
    e. 
    export to imp
  5. Export to port connection is not allowed

      Symbols:

      TLM 1.0 port symbols

      Interface class method types in TLM 1.0

      1. Put
      2. Get
      3. Peek
      4. Get peek
      5. Analysis interface

      put, get, peek ports

      Put

      Get

      Peek

      uvm_put_port

      uvm_get_port

      uvm_peek_port

      uvm_blocking_put_port

      uvm_blocking_get_port

      uvm_blocking_peek_port

      uvm_nonblocking_put_port

      uvm_nonblocking_get_port

      uvm_nonblocking_peek_port

      uvm_put_imp

      uvm_get_imp

      uvm_peek_imp

      uvm_blocking_put_imp

      uvm_blocking_get_imp

      uvm_blocking_peek_imp

      uvm_nonblocking_put_imp

      uvm_nonblocking_get_imp

      uvm_nonblocking_peek_imp

      uvm_put_export

      uvm_get_export

      uvm_peek_export

      uvm_blocking_put_export

      uvm_blocking_get_export

      uvm_blocking_peek_export

      uvm_nonblocking_put_export

      uvm_nonblocking_get_export

      uvm_nonblocking_peek_export

      put, get, peek port methods

      All communication methods are provided by TLM interface class.

      Methods ->

      put port

      get port

      Peek port

      Blocking Port

      Put

      get

      peek

      Nonblocking Port

      1. try_put
      2. can_put
      1. try_get
      2. can_get
      1. try_peek
      2. can_peek

      Methods

      Description

      put

      1. To send transactions to another component
      2. As it is a blocking method, until the transaction is sent successfully, it will be blocked.
      3. .put (trans_item)

      try_put

      1. To send transactions to another component
      2. As it is a non-blocking method, it returns 1 if the consumer component is ready to accept the transaction otherwise, it returns 0
      3. .try_put(trans_item)

      can_put

      1. It can not send transactions to another component. Hence, no argument is passed when this method is called
      2. As it is a non-blocking method, it returns 1 as it checks the consumer component is ready to accept the transaction otherwise, it returns 0
      3. .can_put()

      get

      1. To retrieve transaction from another component
      2. As it is a blocking method until the transaction is retrieved successfully, it will be blocked.
      3. It is also used to retrieve transactions from tlm_fifo
      4. .get(trans_item)

      try_get

      1. To retrieve transactions from another component
      2. As it is a non-blocking method, it returns 1 if the consumer component is ready to retrieve the transaction otherwise, it returns 0
      3. .try_get(trans_item)

      can_get

      1. It can not retrieve transactions from another component. Hence, no argument is passed when this method is called
      2. As it is a non-blocking method, it returns 1 as it checks the availability of transaction from another component otherwise, it returns 0
      3. .can_get()

      peek

      1. It is a blocking method that returns transactions without consuming it.
      2. Since the transaction is not consumed, subsequent peek or get method call will return the same transaction item.
      3. .peek(trans_item)

      try_peek

      1. To obtain transactions from another component
      2. As it is a non-blocking method, it returns 1 if the transaction is available otherwise, it returns 0
      3. .try_peek(trans_item)

      can_peek

      1. It can not obtain transactions from another component. Hence, no argument is passed when this method is called.
      2. As it is a non-blocking method, it returns 1 as it checks the availability of transaction from another component otherwise, it returns 0
      3. .can_peek()

      Analysis: write

      1. It is a non-blocking method call
      2. Write method broadcasts transaction to any number of listeners
      3. .write(trans_item)

      Key Notes:

      UVM TLM

      Classes

      constructor method

      TLM Port

      uvm_*_port #(T) //unidirectional
      uvm_*_port #(REQ,RSP) //bidirectional

      function new (string name, uvm_component parent, int min_size=1, int max_size=1);

      TLM export

      uvm_*_export #(T) //unidirectional
      uvm_*_export #(REQ,RSP) //bidirectional

      function new (string name, uvm_component parent, int min_size=1, int max_size=1);

      TLM Imp Port

      uvm_*_imp #(T,IMP)                 //unidirectional
      uvm_*_imp #(REQ, RSP,
                  IMP, REQ_IMP, RSP_IMP) //bidirectional

      function new(string name, IMP imp)

      For master and slave imp:
      function new(string name, IMP imp, REQ_IMP req_imp=imp, RSP_IMP rsp_imp=imp)

      Where parameters are described as:

      T  – Type of transaction

      REQ – Type of request transaction

      RSP  – Type of response transaction

      IMP – Type of the component implementing the interface.

      For master and slave imp (Default to imp):

      REQ_IMP – The component type that implements the request side of the interface.

      RSP_IMP – The component type that implements the response side of the interface.