SyoSil ApS UVM Scoreboard  1.0.3.0
cl_syoscb_queue_locator_base.svh
1 /// Locator base class defining the locator API used for searching in queues.
2 /// Locators are primarily used with the OOO compare and hash queues, as this allows us
3 /// to efficiently find an item with a matching digest
4 class cl_syoscb_queue_locator_base extends uvm_object;
5  //-------------------------------------
6  // Non randomizable variables
7  //-------------------------------------
8  /// The queue owning this locator
10 
11  /// Local handle to the SCB cfg
12  protected cl_syoscb_cfg cfg;
13 
14  `uvm_object_utils_begin(cl_syoscb_queue_locator_base)
15  `uvm_field_object(owner, UVM_DEFAULT)
16  `uvm_field_object(cfg, UVM_DEFAULT | UVM_REFERENCE)
17  `uvm_object_utils_end
18 
19  function new(string name = "cl_syoscb_queue_locator_base");
20  super.new(name);
21  endfunction: new
22 
23  //-------------------------------------
24  // Locator API
25  //-------------------------------------
26  extern virtual function cl_syoscb_proxy_item_base search(cl_syoscb_proxy_item_base proxy_item);
27  extern virtual function bit set_queue(cl_syoscb_queue_base owner);
28  extern virtual function cl_syoscb_queue_base get_queue();
30 
31 /// <b>Locator API:</b> Returns the item of the underlying queue which matches the given proxy item
32 /// \param proxy_item A proxy item indicating what to search for in this queue
33 /// \return A proxy item pointing to the matching item in this queue, or null if no match is found
34 function cl_syoscb_proxy_item_base cl_syoscb_queue_locator_base::search(cl_syoscb_proxy_item_base proxy_item);
35  `uvm_fatal("IMPL_ERROR", $sformatf("cl_syoscb_queue_locator_base::search() *MUST* be overwritten"))
36  return null;
37 endfunction: search
38 
39 /// <b>Locator API:</b> Returns the queue that this locator is associated with
41  if(this.owner == null) begin
42  // A locator should always have an associated queue
43  `uvm_fatal("QUEUE_ERROR",
44  $sformatf("Unable to find queue associated with iterator %s", this.get_name()))
45  return null;
46  end else begin
47  return this.owner;
48  end
49 endfunction: get_queue
50 
51 /// <b>Locator API:</b> Sets the queue that this locator is associated with
52 function bit cl_syoscb_queue_locator_base::set_queue(cl_syoscb_queue_base owner);
53  if(owner == null) begin
54  // An iterator should always have an associated queue
55  `uvm_error("QUEUE_ERROR", $sformatf("Unable to associate queue with locator "));
56  return 0;
57  end else begin
58  this.owner = owner;
59  this.cfg = owner.get_cfg();
60  return 1;
61  end
62 endfunction: set_queue
cl_syoscb_cfg cfg
Local handle to the SCB cfg.
virtual cl_syoscb_queue_base get_queue()
Locator API: Returns the queue that this locator is associated with
Base class for all proxy items.
Locator base class defining the locator API used for searching in queues.
Class which represents the base concept of a queue.
cl_syoscb_queue_base owner
The queue owning this locator.
virtual cl_syoscb_proxy_item_base search(cl_syoscb_proxy_item_base proxy_item)
Locator API: Returns the item of the underlying queue which matches the given proxy item ...
Configuration class for the SyoSil UVM scoreboard.
virtual bit set_queue(cl_syoscb_queue_base owner)
Locator API: Sets the queue that this locator is associated with

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:39:53
Find a documentation bug? Report bugs to: scoreboard@syosil.com