8 `uvm_component_utils_begin(cl_syoscb_queue_hash_md5)
9 `uvm_component_utils_end
14 extern function new(string name, uvm_component parent);
28 extern
virtual function void do_copy(uvm_object rhs);
31 function cl_syoscb_queue_hash_md5::new(string name, uvm_component parent);
32 super.new(name, parent);
34 this.
hash_algo = cl_syoscb_hash_md5::type_id::create("hash_algo", this);
45 while(this.iter_sem.try_get() == 0);
48 iter_name = $sformatf("%0s_iter%0d", this.get_name(), this.num_iters_created);
53 f = this.
iterators.find_index() with (item.get_name() == name);
54 if(f.size() != 0) begin
55 `uvm_info("ITERATOR", $sformatf("[%0s] An iterator with the name %0s already exists", this.cfg.get_scb_name(), name), UVM_DEBUG)
59 result = cl_syoscb_queue_iterator_hash_md5::type_id::create(iter_name);
63 void'(result.set_queue(this));
76 locator = cl_syoscb_queue_locator_hash_md5::type_id::create($sformatf("%s_loc", this.get_name()));
77 void'(locator.set_queue(this));
83 function void cl_syoscb_queue_hash_md5::do_copy(uvm_object rhs);
88 if(!$cast(rhs_cast, rhs))begin
90 $sformatf("The given object argument is not %0p type", rhs_cast.get_type()))
97 this.
hash.delete_all();
99 if(rhs_aa.first(l_digest)) begin
101 for(int idx=0; idx<rhs_aa.get_size(l_digest); idx++) begin
102 cl_syoscb_item other_item;
103 other_item = rhs_aa.get_item(l_digest, idx);
104 this.hash.insert(l_digest, other_item);
107 while(rhs_cast.hash.next(l_digest));
virtual cl_syoscb_queue_iterator_base create_iterator(string name="")
Queue API: See cl_syoscb_queue_base::create_iterator for more details
cl_syoscb_queue_iterator_base iterators[cl_syoscb_queue_iterator_base]
List of iterators registered with this queue.
Locator class for searching over hash queues using md5 as the hash algorithm.
virtual tp_aa_hash get_hash()
Gets the hash AA wrapper used for this queue.
MD5 implementation of a hash queue which optimizes the OOO compare.
cl_syoscb_hash_base< HASH_DIGEST_WIDTH > hash_algo
Handle to the implemented hash algorithm.
cl_syoscb_hash_base< HASH_DIGEST_WIDTH >::tp_hash_digest tp_digest
Typedef for hash algorithm digests.
Locator base class defining the locator API used for searching in queues.
semaphore iter_sem
Semaphore guarding exclusive access to the queue when multiple iterators are in play.
cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH > hash
Queue implementation with an assosiative array. Wrapped in a class for performance reasons...
Queue iterator base class defining the iterator API used for iterating over queues.
virtual cl_syoscb_queue_locator_base get_locator()
Queue API: See cl_syoscb_queue_base::create_iterator for more details
Queue iterator class defining the iterator API used for iterating md5 hash queues.
int num_iters_created
The number of iterators that have been created for this queue so far.
A wrapper around an associative array, used for storing hash queues.
Class which represents the base concept of a hash queue.