In reply to ashishd:
Hi,
i used grab and lock in virtual sequence. i used four subsequences in this code. When i execute this code, i am not getting high priority to grab sequence(last parallel thread of fork-join). Can any one tell, where i have done wrong?
[b]class tx_rx_sequence extends ovm_sequence;
eth_bad_crc_seq tx_seq;
eth_bad_crc_rx_seq rx_seq;
eth_good_crc_seq tx_good_seq;
eth_good_crc_rx_seq rx_good_seq;
function new(string name = “tx_rx_sequence”);
super.new(name);
endfunction :new
`ovm_sequence_utils(tx_rx_sequence,mcs_vir_sequencer)
virtual task body();
fork
begin
if(p_sequencer.rx_sequencer !== null)
p_sequencer.rx_sequencer.lock(this);
//ovm_do_on(tx_seq,p_sequencer.tx_sequencer);
ovm_do_on(rx_seq,p_sequencer.rx_sequencer);
if(p_sequencer.rx_sequencer !== null)
p_sequencer.rx_sequencer.unlock(this);
end
begin
if(p_sequencer.tx_sequencer !== null)
p_sequencer.tx_sequencer.lock(this);
ovm_do_on(tx_seq,p_sequencer.tx_sequencer); //
ovm_do_on(rx_seq,p_sequencer.rx_sequencer);
if(p_sequencer.tx_sequencer !== null)
p_sequencer.tx_sequencer.unlock(this);
end
begin
if(p_sequencer.rx_sequencer !== null)
p_sequencer.rx_sequencer.lock(this);
//ovm_do_on(tx_seq,p_sequencer.tx_sequencer);
ovm_do_on(rx_good_seq,p_sequencer.rx_sequencer);
if(p_sequencer.rx_sequencer !== null)
p_sequencer.rx_sequencer.unlock(this);
end
begin
if(p_sequencer.tx_sequencer !== null)
p_sequencer.tx_sequencer.grab(this);
ovm_do_on(tx_good_seq,p_sequencer.tx_sequencer); //
ovm_do_on(rx_seq,p_sequencer.rx_sequencer);
if(p_sequencer.tx_sequencer !== null)
p_sequencer.tx_sequencer.ungrab(this);
end
join
endtask
endclass:tx_rx_sequence
THanks & Regards,
sudheer