Jump to content

Switching between data_items during simullation


Recommended Posts

Hi , 

 

I would like to use some data items in one test: frame_packet,  short_packet , illegal_packet.

 

In the uvm documentation i found that in order to switch between packets i should use factory setting in the test:

 

frame_packet::type_id::set_type_override(short_packet::get_type());

 

according to my understanding this completly replaces that data item and does not leave option to use frame_packet in this test.

 

Is there any other way to do it?

 

Thanks, 

Ilan

 

 

 

Link to comment
Share on other sites

why not just write a sequence which selects one of these packets?

/uwe

 

// short skeleton, you can improve this scheme ...

class bla extends uvm_sequence;

frame_packet a;

short_packet b;

illegal_packet c;

 

rand int sel;

 

task body();

case(sel)

0: uvm_do(a);

1: uvm_do(B);

2: uvm_do©;

endtask

endclass

Link to comment
Share on other sites

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...