Randomize packet as well as interface signals

Hi,

My task is to randomize two different types of packets

Say Packet xyz,
Packet abc

and at the same time, I need to randomize the interface signals(valid, enable, data).
and need to drive these packets on one of the interface signals “data”.
What is the way to do this?

In reply to shankar_logic:

Never you randomize interface signals!
But you might have data fields reflecting the Control Signals in you sequence item/Transaction.
Regarding the data packets is it really differnt types og data packets or is it only different d packets of the same type?

Hi,

This problem got sorted out.

But, the problem is if I have different types of packets, how can i randomize it using single sequence.

For example, three sequence item class
Packet tx1
Packet tx2
Packet tx3

Now when i have to randomize them in the sequence i use the following statement

class seq extends uvm_sequence#(seq_item)
endclass

In reply to shankar_logic:
It is still unclear to me what is packet? Is this one class or is it 3 different classes?
Maybe you can use only 1 class with different data fields inside. And you are using different data fields for certain seq_items.

These are 3 different classes for packets

In reply to shankar_logic:

What di you mean with different?. Do they have a different structure or different data fields or do they use only different values for the data fields?

In reply to shankar_logic:

What di you mean with different?. Do they have a different structure or different data fields or do they use only different values for the data fields?