SyoSil ApS UVM Scoreboard  1.0.3.0
cl_scb_test_io_std_tlm_mutexed.svh
1 /// Simple IO test using the TLM ssetup and mutexed add_item
2 class cl_scb_test_io_std_tlm_mutexed extends cl_scb_test_single_scb;
3  //-------------------------------------
4  // Non randomizable variables
5  //-------------------------------------
6  cl_tb_tlm_monitor#() monQ1P1;
7  cl_tb_tlm_monitor#() monQ2P1;
8 
9  //-------------------------------------
10  // UVM Macros
11  //-------------------------------------
12  `uvm_component_utils(cl_scb_test_io_std_tlm_mutexed)
13 
14  //-------------------------------------
15  // Constructor
16  //-------------------------------------
17  extern function new(string name = "cl_scb_test_io_std_tlm_mutexed", uvm_component parent = null);
18  extern virtual function void pre_build();
19 
20  //-------------------------------------
21  // UVM Phase methods
22  //-------------------------------------
23  extern function void build_phase(uvm_phase phase);
24  extern function void connect_phase(uvm_phase phase);
25  extern task run_phase(uvm_phase phase);
27 
28 function cl_scb_test_io_std_tlm_mutexed::new(string name = "cl_scb_test_io_std_tlm_mutexed",
29  uvm_component parent = null);
30  super.new(name, parent);
31 endfunction : new
32 
33 function void cl_scb_test_io_std_tlm_mutexed::pre_build();
34  super.pre_build();
35  this.syoscb_cfgs.syoscb_cfg[0].set_mutexed_add_item_enable(1'b1);
36 endfunction : pre_build
37 
38 function void cl_scb_test_io_std_tlm_mutexed::build_phase(uvm_phase phase);
39  super.build_phase(phase);
40 
41  this.monQ1P1 = new("monQ1P1", this);
42  this.monQ2P1 = new("monQ2P1", this);
43 endfunction: build_phase
44 
45 function void cl_scb_test_io_std_tlm_mutexed::connect_phase(uvm_phase phase);
46  super.connect_phase(phase);
47 
48  // *NOTE*: This will hook up the TLM monitors with the TLM API of the
49  // scoreboard. Normally, this would not be done here but in the
50  // testbench environment which would have access to all of the
51  // montors and the scoreboard. However, these monitors only
52  // exists for this specific test. Thus, it is done here locally.
53  begin
54  cl_syoscb_subscriber subscriber;
55 
56  // Get the subscriber for Producer: P1 for queue: Q1 and connect it
57  // to the UVM monitor producing transactions for this queue
58  subscriber = this.scb_env.syoscb[0].get_subscriber("Q1", "P1");
59  this.monQ1P1.anls_port.connect(subscriber.analysis_export);
60 
61  // Get the subscriber for Producer: P1 for queue: Q2 and connect it
62  // to the UVM monitor producing transactions for this queue
63  subscriber = this.scb_env.syoscb[0].get_subscriber("Q2", "P1");
64  this.monQ2P1.anls_port.connect(subscriber.analysis_export);
65  end
66 endfunction: connect_phase
67 
68 task cl_scb_test_io_std_tlm_mutexed::run_phase(uvm_phase phase);
69  // Raise objection
70  phase.raise_objection(this);
71 
72  super.run_phase(phase);
73 
74  // *NOTE*: This test is intentionally empty since
75  // All of the stimulti is coming from the TLM monitors
76 
77  // Drop objection
78  phase.drop_objection(this);
79 endtask: run_phase
Simple IO test using the TLM ssetup and mutexed add_item.
Generic subscriber for the scoreboard.

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
All Rights Reserved Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:37:29
Find a documentation bug? Report bugs to: scoreboard@syosil.com