Jump to content

b0rna

Members
  • Content count

    3
  • Joined

  • Last visited

  1. Hello, I've run into a rather obscure scenario. I have multiple parallel sequences which push items to the same sequencer. These sequence will call lock and unlock before starting a small number of transactions. Here is what I observe. sequence A calls lock(this) and is unblocked at time t sequence C+D call lock at time t+1 sequence A calls unlock(this) once it is finished at time t+2 At time t+3, both sequences C and D appear to be unblocked (lock granted) in the same simulation cycle. Here is a print out... unblocked port_id: 2, @ 5394166 ps unblocked port_id: 1, @ 5394166 ps After this, at least one of the unblocked sequences (I only stepped through sequence C) have their "wait_for_grant" not complete. Hence, "start_item" is perpetually blocked (while the sequence has the sequencer lock) and the sequencer does not grant any more sequences access to the driver. Here is some sample code. forked threads... parallel sequence_a.start(sqr) parallel sequence_b.start(sqr) parallel sequence_c.start(sqr) join... sequence_[A/B/C] body() sqr.lock(this). [all the typical transaction item code] start_item(transaction); <--- does not return/unblock. wait_for_grant() not returning. ... finish_item(transaction); endtask At this point I am resorting to writing my own semaphore to control access to the agent. However, any deep insight or pointers are highly appreciated. I am using UVM 1.2 and the latest Cadence tools. Thanks, Borna I also found this which sounds similar! The closest replication of this issue on the forums:
  2. UVM events with data.

    Ah, I see. Thanks Uwes!
  3. Hi, In UVM 1.2, the UVM event class is declared as follows: class uvm_event#(type T=uvm_object) extends uvm_event_base; The trigger function has the following line of code: uvm_event_callback#(T) tmp=callbacks; The assignment to callbacks, refers to the uvm_event_base member callbacks[$]. The uvm_event_base is not parameterized, and callbacks[$] is declared in uvm_event_base as: protected uvm_event_callback callbacks[$]; Thus, making the parameterized type of callbacks[$] the default of callbacks[$], which is uvm_object. How can the uvm_event be parameterized to a non uvm_object? There is no casting done in the trigger function. Lets say that I tried following: class uvm_object_extend extends uvm_object; ... endclass uvm_event#(uvm_object_extend ) my_event; My compiler generates and error indicating that in the trigger function, the assignment of: uvm_event_callback#(T) tmp=callbacks; in the trigger function is not valid, since callbacks in the uvm_event_base is of parameterized type uvm_object, but uvm_event_callback#(T) is of parameterized type uvm_object_extend. This seems to be an issue in UVM, or am I not using this correctly? Does anyone have experience with uvm_events which use extended uvm_objects for data passing? Thanks, Borna.
×