Jump to content

Question about grab/ungrab for interrupt


Recommended Posts

Dear all,

I made interrupt sequence. For interrupt opeartion, I use grab/ungrab function from UVM.

But I have a problem not to grab.

My testbench has 4 sequencers from interface UVC, so virtual sequence handles this.

My interrupt sequence is based on uvm_reg_sequence.

And I start the interrupt sequence in virtual sequence class and this virtual sequence is started in virtual sequencer.

#--------------

class int_seq_c extends uvm_reg_sequence;

... ...

virutal task body();

forever begin

@(posedge interrupt);

grab(regmodel.default_map.get_sequencer()); // Sequencer of AXI bus is get.

// clear interrupt

ungrab(regmodel.default_map.get_sequencer());

end

endtask

endclass

class int_virt_seq_c extends uvm_sequence;

int_seq_c int_seq;

virutal task body();

int_seq = int_seq_c::type_id::create("int_seq");

int_seq.start(null);

endtask

endclass

class my_virtual_sequencer extends uvm_sequencer;

... ...

virtual task run_phase(uvm_phase phase);

int_virt_seq = int_virt_seq_c::type_id::create("int_virt_seq");

fork

int_virt_seq.start(this);

join_none

endtask

endclass

I checked grab startus in int_seq_c class using "is_grabbed()" function after executing "grab()" task.

But 0 value is returned.

What is my problem?

How can I fix my problem?

Thanks and Regards,

// yyn

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...