{"id":49363,"date":"2025-07-30T18:01:44","date_gmt":"2025-07-30T10:01:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/49363.html"},"modified":"2025-07-30T18:01:44","modified_gmt":"2025-07-30T10:01:44","slug":"uvm-tlm-example","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/49363.html","title":{"rendered":"uvm-tlm-example"},"content":{"rendered":"<p>\u6b64UVM TLM\u793a\u4f8b\u8fd0\u7528\u4e86\u524d\u6587\u8ba8\u8bba\u7684put\u7aef\u53e3\u3001TLM FIFO\u548cget\u7aef\u53e3&#xff0c;\u6784\u5efa\u4e86\u4e00\u4e2a\u5728\u4e0d\u540c\u5c42\u7ea7\u5305\u542bTLM\u7aef\u53e3\u7684\u6d4b\u8bd5\u5e73\u53f0\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"tlm-hier\" height=\"285\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730100141-6889ed856d19d.png\" width=\"1795\" \/><\/p>\n<p>TLM\u00a0 FIFO\u00a0\u53ef\u4ee5\u6269\u5c55\u4e3a\u5305\u542b\u53e6\u4e00\u4e2a\u540d\u4e3acomponentB\u7684\u7ec4\u4ef6&#xff0c;\u8be5\u7ec4\u4ef6\u4f7f\u7528\u53e6\u4e00\u4e2a\u5185\u90e8FIFO\u548c\u5b50\u7ec4\u4ef6\u6765\u63a5\u6536\u6570\u636e\u5305\u3002<\/p>\n<p>\u4e0b\u9762\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3aPacket\u7684\u7c7b&#xff0c;\u4f5c\u4e3a\u5728\u4e0d\u540c\u7ec4\u4ef6\u4e4b\u95f4\u4f20\u8f93\u7684\u6570\u636e\u9879\u3002\u8be5\u7c7b\u7684\u5bf9\u8c61\u5c06\u5305\u542b\u4e24\u4e2a\u968f\u673a\u53d8\u91cf&#xff0c;\u8fd9\u4e9b\u53d8\u91cf\u5728\u53d1\u9001\u524d\u53ef\u4ee5\u88ab\u968f\u673a\u5316\u3002<\/p>\n<p>class Packet extends uvm_object;<br \/>\n  rand bit[7:0] addr;<br \/>\n  rand bit[7:0] data;<\/p>\n<p>  &#096;uvm_object_utils_begin(Packet)<br \/>\n    &#096;uvm_field_int(addr, UVM_ALL_ON)<br \/>\n    &#096;uvm_field_int(data, UVM_ALL_ON)<br \/>\n  &#096;uvm_object_utils_end<\/p>\n<p>  function new(string name &#061; &#034;Packet&#034;);<br \/>\n    super.new(name);<br \/>\n  endfunction<br \/>\nendclass<\/p>\n<h3>subComp1<\/h3>\n<p>\u8be5\u7ec4\u4ef6\u4e0eUVM TLM FIFO\u793a\u4f8b\u4e2d\u7684\u5b8c\u5168\u76f8\u540c&#xff0c;\u5e76\u901a\u8fc7\u5176uvm_blocking_put_port\u5f00\u59cb\u53d1\u9001\u6570\u636e\u5305\u3002<\/p>\n<\/p>\n<p>class subComp1 extends uvm_component;<br \/>\n   &#096;uvm_component_utils (subComp1)<\/p>\n<p>  \/\/ Create a blocking TLM put port which can send an object<br \/>\n  \/\/ of type &#039;Packet&#039;<br \/>\n  uvm_blocking_put_port #(Packet) m_put_port;<br \/>\n  int m_num_tx;<\/p>\n<p>   function new (string name &#061; &#034;subComp1&#034;, uvm_component parent&#061; null);<br \/>\n      super.new (name, parent);<br \/>\n   endfunction<\/p>\n<p>   \/\/ Remember that TLM put_port is a class object and it will have to be<br \/>\n   \/\/ created with new ()<br \/>\n   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n     m_put_port &#061; new (&#034;m_put_port&#034;, this);<br \/>\n   endfunction<\/p>\n<p>  \/\/ Create a packet, randomize it and send it through the port<br \/>\n  \/\/ Note that put() is a method defined by the receiving component<br \/>\n  \/\/ Repeat these steps N times to send N packets<br \/>\n   virtual task run_phase (uvm_phase phase);<br \/>\n     repeat (m_num_tx) begin<br \/>\n         Packet pkt &#061; Packet::type_id::create (&#034;pkt&#034;);<br \/>\n         assert(pkt.randomize ());<br \/>\n #50;<br \/>\n          \/\/ Print the packet to be displayed in log<br \/>\n       &#096;uvm_info (&#034;SUBCOMP1&#034;, &#034;Packet sent to compA:tlm_fifo&#034;, UVM_LOW)<br \/>\n         pkt.print (uvm_default_line_printer);<\/p>\n<p>         \/\/ Call the TLM put() method of put_port class and pass packet as argument<br \/>\n         m_put_port.put (pkt);<br \/>\n      end<br \/>\n   endtask<br \/>\nendclass<\/p>\n<h3>subComp2<\/h3>\n<\/p>\n<p>\u8be5\u5b50\u7ec4\u4ef6\u63a5\u6536\u6570\u636e\u5305\u7684\u901f\u5ea6\u6bd4\u4e0a\u6587\u63d0\u5230\u7684\u7ec4\u4ef6\u7a0d\u6162&#xff0c;\u5e76\u901a\u8fc7uvm_blocking_get_port\u63a5\u53e3\u63a5\u6536\u6570\u636e\u3002<\/p>\n<p>\u9700\u6ce8\u610f&#xff1a;\u8be5\u7ec4\u4ef6\u8fd8\u914d\u6709\u7c7b\u578b\u4e3auvm_blocking_put_port\u7684\u53e6\u4e00\u4e2a\u8f93\u51fa\u7aef\u53e3&#xff0c;\u7528\u4e8e\u4ececomponentA\u5411\u5916\u4f20\u8f93\u6570\u636e\u3002<\/p>\n<p>class subComp2 extends uvm_component;<br \/>\n   &#096;uvm_component_utils (subComp2)<\/p>\n<p>   \/\/ Create a get_port to request for data from subComp1<br \/>\n   uvm_blocking_get_port #(Packet) m_get_port;<br \/>\n  uvm_blocking_put_port #(Packet) m_put_port;<\/p>\n<p>  function new (string name, uvm_component parent);<br \/>\n      super.new (name, parent);<br \/>\n   endfunction<\/p>\n<p>   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n      m_get_port &#061; new (&#034;m_get_port&#034;, this);<br \/>\n     m_put_port &#061; new (&#034;m_put_port&#034;, this);<br \/>\n   endfunction<\/p>\n<p>   virtual task run_phase (uvm_phase phase);<br \/>\n      Packet pkt;<br \/>\n      forever begin<br \/>\n       #100;<br \/>\n         m_get_port.get (pkt);<br \/>\n        &#096;uvm_info (&#034;SUBCOMP2&#034;, &#034;Packet received from compA:tlm_fifo, forward it&#034;, UVM_LOW)<br \/>\n        pkt.print (uvm_default_line_printer);<br \/>\n        m_put_port.put(pkt);<br \/>\n      end<br \/>\n   endtask<br \/>\nendclass<\/p>\n<h3>ComponentA<\/h3>\n<\/p>\n<p>\u8be5\u5c42\u5305\u542b\u901a\u8fc7TLM FIFO\u8fde\u63a5\u7684\u4e24\u4e2a\u5b50\u7ec4\u4ef6&#xff0c;\u56e0\u4e3a\u5b83\u4eec\u7684\u4f20\u8f93\u901f\u7387\u4e0d\u540c\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u5b83\u8fd8\u5177\u6709\u53e6\u4e00\u4e2a\u7c7b\u578b\u4e3auvm_blocking_put_port\u7684put\u7aef\u53e3&#xff0c;\u7528\u4e8e\u8f6c\u53d1\u4ece\u8f83\u4f4e\u5c42subComp2\u63a5\u6536\u7684\u6570\u636e\u5305\u3002<\/p>\n<p>class componentA extends uvm_component;<br \/>\n   &#096;uvm_component_utils (componentA)<br \/>\n  function new(string name&#061;&#034;componentA&#034;, uvm_component parent&#061;null);<br \/>\n    super.new(name, parent);<br \/>\n  endfunction<\/p>\n<p>   subComp1 m_subcomp_1;<br \/>\n   subComp2 m_subcomp_2;<\/p>\n<p>   uvm_tlm_fifo #(Packet)    m_tlm_fifo;<br \/>\n   uvm_blocking_put_port #(Packet)  m_put_port;<br \/>\n   int m_num_tx;<\/p>\n<p>   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n      \/\/ Create an object of both components<br \/>\n      m_subcomp_1 &#061; subComp1::type_id::create (&#034;m_subcomp_1&#034;, this);<br \/>\n      m_subcomp_2 &#061; subComp2::type_id::create (&#034;m_subcomp_2&#034;, this);<\/p>\n<p>      \/\/ Create a FIFO with depth 2<br \/>\n      m_tlm_fifo &#061; new (&#034;uvm_tlm_fifo&#034;, this, 2);<br \/>\n      m_put_port &#061; new (&#034;m_put_port&#034;, this);<br \/>\n      m_subcomp_1.m_num_tx &#061; m_num_tx;<br \/>\n   endfunction<\/p>\n<p>   \/\/ Make componentA connections<br \/>\n   virtual function void connect_phase (uvm_phase phase);<br \/>\n     \/\/ Connect put port from subComp1 to TLM FIFO and then<br \/>\n     \/\/ connect get_export of TLM FIFO with subComp2<br \/>\n     m_subcomp_1.m_put_port.connect(m_tlm_fifo.put_export);<br \/>\n     m_subcomp_2.m_get_port.connect(m_tlm_fifo.get_export);<\/p>\n<p>     \/\/ Now connect subComp2 to componentA for forwarding pkt<br \/>\n     m_subcomp_2.m_put_port.connect(this.m_put_port);<br \/>\n   endfunction<\/p>\n<p>   \/\/ Display a message when the FIFO is full<br \/>\n   virtual task run_phase (uvm_phase phase);<br \/>\n      forever begin<br \/>\n        #10 if (m_tlm_fifo.is_full ())<br \/>\n          &#096;uvm_info (&#034;COMPA&#034;, &#034;componentA:TLM_Fifo is now FULL !&#034;, UVM_MEDIUM)<br \/>\n      end<br \/>\n   endtask<br \/>\nendclass<\/p>\n<h3>subComp3<\/h3>\n<\/p>\n<p>\u5047\u8bbe\u76ee\u6807\u7ec4\u4ef6\u6bd4\u4e0a\u8ff0\u5176\u4ed6\u7ec4\u4ef6\u66f4\u6162&#xff0c;\u5e76\u4e14\u4f7f\u7528\u00a0uvm_blocking_get_port\u00a0\u6765\u63a5\u6536\u6570\u636e\u5305\u3002<\/p>\n<\/p>\n<p>\/\/ subComp3 accepts packet even slower than what componentA is sending out<br \/>\n\/\/ which is the reason we need a TLM FIFO in componentB<br \/>\nclass subComp3 extends uvm_component;<br \/>\n  &#096;uvm_component_utils (subComp3)<\/p>\n<p>   \/\/ Create a get_port to request for data from subComp1<br \/>\n   uvm_blocking_get_port #(Packet) m_get_port;<br \/>\n   int m_num_tx;<\/p>\n<p>  function new (string name, uvm_component parent);<br \/>\n      super.new (name, parent);<br \/>\n   endfunction<\/p>\n<p>   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n      m_get_port &#061; new (&#034;m_get_port&#034;, this);<br \/>\n   endfunction<\/p>\n<p>   virtual task run_phase (uvm_phase phase);<br \/>\n      Packet pkt;<br \/>\n     repeat(m_num_tx) begin<br \/>\n        #200;<br \/>\n        m_get_port.get (pkt);<br \/>\n        &#096;uvm_info (&#034;SUBCOMP3&#034;, &#034;Packet received from componentA&#034;, UVM_LOW)<br \/>\n        pkt.print (uvm_default_line_printer);<br \/>\n      end<br \/>\n   endtask<br \/>\nendclass<\/p>\n<h3>ComponentB<\/h3>\n<p>\u7531\u4e8e\u76ee\u6807\u901f\u7387\u8f83\u6162&#xff0c;\u9700\u8981\u518d\u8fde\u63a5\u4e00\u4e2aUVM TLM FIFO\u5230subComp3&#xff0c;\u7528\u4e8e\u7f13\u51b2\u5176\u63a5\u6536\u7684\u6570\u636e\u5305\u3002\u8bf7\u6ce8\u610f&#xff0c;\u8be5FIFO\u5177\u6709\u4e00\u4e2a\u9876\u5c42put_export\u7aef\u53e3&#xff0c;\u7c7b\u578b\u4e3auvm_blocking_put_export\u3002<\/p>\n<p>class componentB extends uvm_component;<br \/>\n   &#096;uvm_component_utils (componentB)<\/p>\n<p>   subComp3                    m_subcomp_3;<br \/>\n  uvm_tlm_fifo #(Packet)    m_tlm_fifo;<br \/>\n   uvm_blocking_put_export #(Packet) m_put_export;<br \/>\n   int m_num_tx;<\/p>\n<p>   function new (string name &#061; &#034;componentB&#034;, uvm_component parent &#061; null);<br \/>\n      super.new (name, parent);<br \/>\n   endfunction<\/p>\n<p>   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n      \/\/ Create an object of both components<br \/>\n     m_subcomp_3 &#061; subComp3::type_id::create (&#034;m_subcomp_3&#034;, this);<\/p>\n<p>      \/\/ Create a FIFO with depth 2<br \/>\n      m_tlm_fifo &#061; new (&#034;tlm_fifo&#034;, this, 2);<\/p>\n<p>      \/\/ Create the export to connect with componentA<br \/>\n     m_put_export &#061; new (&#034;m_put_export&#034;, this);<\/p>\n<p>     m_subcomp_3.m_num_tx &#061; m_num_tx;<br \/>\n   endfunction<\/p>\n<p>   virtual function void connect_phase (uvm_phase phase);<br \/>\n      \/\/ Connect from componentB export to FIFO export<br \/>\n     m_put_export.connect (m_tlm_fifo.put_export);<\/p>\n<p>      \/\/ Connect from FIFO export to subComponent3 port<br \/>\n     m_subcomp_3.m_get_port.connect (m_tlm_fifo.get_export);<br \/>\n   endfunction<\/p>\n<p>     \/\/ Display a message when the FIFO is full<br \/>\n   virtual task run_phase (uvm_phase phase);<br \/>\n      forever begin<br \/>\n        #10 if (m_tlm_fifo.is_full ())<br \/>\n          &#096;uvm_info (&#034;COMPB&#034;, &#034;componentB:TLM_Fifo is now FULL !&#034;, UVM_MEDIUM)<br \/>\n      end<br \/>\n   endtask<br \/>\nendclass<\/p>\n<h3>Top Env\/Test<\/h3>\n<p style=\"background-color:transparent\">\u7aef\u53e3\u4e0e\u5176\u5b9e\u73b0\u4e4b\u95f4\u7684\u8fde\u63a5\u5fc5\u987b\u5728\u66f4\u9ad8\u7684\u5c42\u6b21\u7ed3\u6784\u4e2d\u8fdb\u884c\u3002\u7531\u4e8e\u5728\u6b64\u793a\u4f8b\u4e2d\u4e24\u4e2a\u7ec4\u4ef6\u90fd\u76f4\u63a5\u5b9e\u4f8b\u5316\u4e8e\u6d4b\u8bd5\u7c7b\u5185&#xff0c;\u5b83\u4eec\u4e4b\u95f4\u7684\u8fde\u63a5\u53ef\u4ee5\u5728\u6d4b\u8bd5\u7684connect_phase\u9636\u6bb5\u5b8c\u6210\u3002\u5982\u679c\u8fd9\u4e24\u4e2a\u7ec4\u4ef6\u5b9e\u4f8b\u5316\u4e8e\u53e6\u4e00\u4e2a\u7ec4\u4ef6\u6216\u73af\u5883\u4e2d&#xff0c;\u5219\u5fc5\u987b\u5728\u8be5\u7ec4\u4ef6\u6216\u73af\u5883\u7684connect_phase\u9636\u6bb5\u8fdb\u884c\u8fde\u63a5\u3002<\/p>\n<\/p>\n<p>class my_test extends uvm_env;<br \/>\n  &#096;uvm_component_utils (my_test)<\/p>\n<p>  componentA compA;<br \/>\n  componentB compB;<br \/>\n  int  m_num_tx;<\/p>\n<p>  function new (string name &#061; &#034;my_test&#034;, uvm_component parent &#061; null);<br \/>\n      super.new (name, parent);<br \/>\n   endfunction<\/p>\n<p>   virtual function void build_phase (uvm_phase phase);<br \/>\n      super.build_phase (phase);<br \/>\n     compA &#061; componentA::type_id::create(&#034;componentA&#034;, this);<br \/>\n     compB &#061; componentB::type_id::create(&#034;componentB&#034;, this);<\/p>\n<p>     std::randomize(m_num_tx) with { m_num_tx inside {[4:10]}; };<br \/>\n     &#096;uvm_info(&#034;TEST&#034;, $sformatf(&#034;Create %0d packets in total&#034;, m_num_tx), UVM_LOW)<br \/>\n     compA.m_num_tx &#061; m_num_tx;<br \/>\n     compB.m_num_tx &#061; m_num_tx;<br \/>\n   endfunction<\/p>\n<p>   \/\/ Connect the ports to the export of FIFO.<br \/>\n   virtual function void connect_phase (uvm_phase phase);<br \/>\n     compA.m_put_port.connect(compB.m_put_export);<br \/>\n   endfunction<\/p>\n<p>  virtual task run_phase(uvm_phase phase);<br \/>\n    super.run_phase(phase);<br \/>\n    \/\/ Let all components finish for purpose of illustration<br \/>\n    phase.raise_objection(this);<br \/>\n    #1000;<br \/>\n    phase.drop_objection(this);<br \/>\n  endtask<br \/>\nendclass<\/p>\n<p>\u00a0Simulation Log<\/p>\n<p>UVM_INFO &#064; 0: reporter [RNTST] Running test my_test&#8230;<br \/>\nUVM_INFO testbench.sv(220) &#064; 0: uvm_test_top [TEST] Create 4 packets in total<br \/>\nUVM_INFO testbench.sv(48) &#064; 50: uvm_test_top.componentA.m_subcomp_1 [SUBCOMP1] Packet sent to compA:tlm_fifo<br \/>\npkt: (Packet&#064;2663) { addr: &#039;h1f  data: &#039;h31  }<br \/>\nUVM_INFO testbench.sv(79) &#064; 100: uvm_test_top.componentA.m_subcomp_2 [SUBCOMP2] Packet received from compA:tlm_fifo, forward it<br \/>\npkt: (Packet&#064;2663) { addr: &#039;h1f  data: &#039;h31  }<br \/>\nUVM_INFO testbench.sv(48) &#064; 100: uvm_test_top.componentA.m_subcomp_1 [SUBCOMP1] Packet sent to compA:tlm_fifo<br \/>\npkt: (Packet&#064;2685) { addr: &#039;hf4  data: &#039;h91  }<br \/>\nUVM_INFO testbench.sv(48) &#064; 150: uvm_test_top.componentA.m_subcomp_1 [SUBCOMP1] Packet sent to compA:tlm_fifo<br \/>\npkt: (Packet&#064;2699) { addr: &#039;hab  data: &#039;ha8  }<br \/>\nUVM_INFO testbench.sv(126) &#064; 150: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 160: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 170: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 180: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 190: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(154) &#064; 200: uvm_test_top.componentB.m_subcomp_3 [SUBCOMP3] Packet received from componentA<br \/>\npkt: (Packet&#064;2663) { addr: &#039;h1f  data: &#039;h31  }<br \/>\nUVM_INFO testbench.sv(79) &#064; 200: uvm_test_top.componentA.m_subcomp_2 [SUBCOMP2] Packet received from compA:tlm_fifo, forward it<br \/>\npkt: (Packet&#064;2685) { addr: &#039;hf4  data: &#039;h91  }<br \/>\nUVM_INFO testbench.sv(48) &#064; 200: uvm_test_top.componentA.m_subcomp_1 [SUBCOMP1] Packet sent to compA:tlm_fifo<br \/>\npkt: (Packet&#064;2681) { addr: &#039;h77  data: &#039;he7  }<br \/>\nUVM_INFO testbench.sv(126) &#064; 200: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 210: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 220: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 230: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 240: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 250: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 260: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 270: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 280: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(126) &#064; 290: uvm_test_top.componentA [COMPA] componentA:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(79) &#064; 300: uvm_test_top.componentA.m_subcomp_2 [SUBCOMP2] Packet received from compA:tlm_fifo, forward it<br \/>\npkt: (Packet&#064;2699) { addr: &#039;hab  data: &#039;ha8  }<br \/>\nUVM_INFO testbench.sv(198) &#064; 300: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 310: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 320: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 330: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 340: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 350: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 360: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 370: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 380: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 390: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(154) &#064; 400: uvm_test_top.componentB.m_subcomp_3 [SUBCOMP3] Packet received from componentA<br \/>\npkt: (Packet&#064;2685) { addr: &#039;hf4  data: &#039;h91  }<br \/>\nUVM_INFO testbench.sv(79) &#064; 400: uvm_test_top.componentA.m_subcomp_2 [SUBCOMP2] Packet received from compA:tlm_fifo, forward it<br \/>\npkt: (Packet&#064;2681) { addr: &#039;h77  data: &#039;he7  }<br \/>\nUVM_INFO testbench.sv(198) &#064; 400: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 410: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 420: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 430: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 440: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 450: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 460: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 470: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 480: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 490: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 500: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 510: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 520: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 530: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 540: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 550: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 560: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 570: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 580: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(198) &#064; 590: uvm_test_top.componentB [COMPB] componentB:TLM_Fifo is now FULL !<br \/>\nUVM_INFO testbench.sv(154) &#064; 600: uvm_test_top.componentB.m_subcomp_3 [SUBCOMP3] Packet received from componentA<br \/>\npkt: (Packet&#064;2699) { addr: &#039;hab  data: &#039;ha8  }<br \/>\nUVM_INFO testbench.sv(154) &#064; 800: uvm_test_top.componentB.m_subcomp_3 [SUBCOMP3] Packet received from componentA<br \/>\npkt: (Packet&#064;2681) { addr: &#039;h77  data: &#039;he7  }<br \/>\nUVM_INFO \/playground_lib\/uvm-1.2\/src\/base\/uvm_objection.svh(1271) &#064; 1000: reporter [TEST_DONE] &#039;run&#039; phase is ready to proceed to the &#039;extract&#039; phase<br \/>\nUVM_INFO \/playground_lib\/uvm-1.2\/src\/base\/uvm_report_server.svh(847) &#064; 1000: reporter [UVM\/REPORT\/SERVER]<br \/>\n&#8212; UVM Report Summary &#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb300\u6b21\u3002\u6b64UVM TLM\u793a\u4f8b\u8fd0\u7528\u4e86\u524d\u6587\u8ba8\u8bba\u7684put\u7aef\u53e3\u3001TLM FIFO\u548cget\u7aef\u53e3\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a\u5728\u4e0d\u540c\u5c42\u7ea7\u5305\u542bTLM\u7aef\u53e3\u7684\u6d4b\u8bd5\u5e73\u53f0\u3002TLM  FIFO \u53ef\u4ee5\u6269\u5c55\u4e3a\u5305\u542b\u53e6\u4e00\u4e2a\u540d\u4e3acomponentB\u7684\u7ec4\u4ef6\uff0c\u8be5\u7ec4\u4ef6\u4f7f\u7528\u53e6\u4e00\u4e2a\u5185\u90e8FIFO\u548c\u5b50\u7ec4\u4ef6\u6765\u63a5\u6536\u6570\u636e\u5305\u3002\u4e0b\u9762\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3aPacket\u7684\u7c7b\uff0c\u4f5c\u4e3a\u5728\u4e0d\u540c\u7ec4\u4ef6\u4e4b\u95f4\u4f20\u8f93\u7684\u6570\u636e\u9879\u3002\u8be5\u7c7b\u7684\u5bf9\u8c61\u5c06\u5305\u542b\u4e24\u4e2a\u968f\u673a\u53d8\u91cf\uff0c\u8fd9\u4e9b\u53d8\u91cf\u5728\u53d1\u9001\u524d\u53ef\u4ee5\u88ab\u968f\u673a\u5316\u3002<\/p>\n","protected":false},"author":2,"featured_media":49362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4800],"topic":[],"class_list":["post-49363","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-uvm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/49363.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb300\u6b21\u3002\u6b64UVM TLM\u793a\u4f8b\u8fd0\u7528\u4e86\u524d\u6587\u8ba8\u8bba\u7684put\u7aef\u53e3\u3001TLM FIFO\u548cget\u7aef\u53e3\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a\u5728\u4e0d\u540c\u5c42\u7ea7\u5305\u542bTLM\u7aef\u53e3\u7684\u6d4b\u8bd5\u5e73\u53f0\u3002TLM FIFO \u53ef\u4ee5\u6269\u5c55\u4e3a\u5305\u542b\u53e6\u4e00\u4e2a\u540d\u4e3acomponentB\u7684\u7ec4\u4ef6\uff0c\u8be5\u7ec4\u4ef6\u4f7f\u7528\u53e6\u4e00\u4e2a\u5185\u90e8FIFO\u548c\u5b50\u7ec4\u4ef6\u6765\u63a5\u6536\u6570\u636e\u5305\u3002\u4e0b\u9762\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3aPacket\u7684\u7c7b\uff0c\u4f5c\u4e3a\u5728\u4e0d\u540c\u7ec4\u4ef6\u4e4b\u95f4\u4f20\u8f93\u7684\u6570\u636e\u9879\u3002\u8be5\u7c7b\u7684\u5bf9\u8c61\u5c06\u5305\u542b\u4e24\u4e2a\u968f\u673a\u53d8\u91cf\uff0c\u8fd9\u4e9b\u53d8\u91cf\u5728\u53d1\u9001\u524d\u53ef\u4ee5\u88ab\u968f\u673a\u5316\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/49363.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T10:01:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730100141-6889ed856d19d.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/49363.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/49363.html\",\"name\":\"uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T10:01:44+00:00\",\"dateModified\":\"2025-07-30T10:01:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/49363.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/49363.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/49363.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"uvm-tlm-example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/49363.html","og_locale":"zh_CN","og_type":"article","og_title":"uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb300\u6b21\u3002\u6b64UVM TLM\u793a\u4f8b\u8fd0\u7528\u4e86\u524d\u6587\u8ba8\u8bba\u7684put\u7aef\u53e3\u3001TLM FIFO\u548cget\u7aef\u53e3\uff0c\u6784\u5efa\u4e86\u4e00\u4e2a\u5728\u4e0d\u540c\u5c42\u7ea7\u5305\u542bTLM\u7aef\u53e3\u7684\u6d4b\u8bd5\u5e73\u53f0\u3002TLM FIFO \u53ef\u4ee5\u6269\u5c55\u4e3a\u5305\u542b\u53e6\u4e00\u4e2a\u540d\u4e3acomponentB\u7684\u7ec4\u4ef6\uff0c\u8be5\u7ec4\u4ef6\u4f7f\u7528\u53e6\u4e00\u4e2a\u5185\u90e8FIFO\u548c\u5b50\u7ec4\u4ef6\u6765\u63a5\u6536\u6570\u636e\u5305\u3002\u4e0b\u9762\u5b9a\u4e49\u4e86\u4e00\u4e2a\u540d\u4e3aPacket\u7684\u7c7b\uff0c\u4f5c\u4e3a\u5728\u4e0d\u540c\u7ec4\u4ef6\u4e4b\u95f4\u4f20\u8f93\u7684\u6570\u636e\u9879\u3002\u8be5\u7c7b\u7684\u5bf9\u8c61\u5c06\u5305\u542b\u4e24\u4e2a\u968f\u673a\u53d8\u91cf\uff0c\u8fd9\u4e9b\u53d8\u91cf\u5728\u53d1\u9001\u524d\u53ef\u4ee5\u88ab\u968f\u673a\u5316\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/49363.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T10:01:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730100141-6889ed856d19d.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/49363.html","url":"https:\/\/www.wsisp.com\/helps\/49363.html","name":"uvm-tlm-example - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T10:01:44+00:00","dateModified":"2025-07-30T10:01:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/49363.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/49363.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/49363.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"uvm-tlm-example"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/49363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=49363"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/49363\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/49362"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=49363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=49363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=49363"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=49363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}