It prints the expected sequence ID but it always prints the default transaction id when we cal get_transaction_id
i.e “SeqIDwithTransID:[1][-1],[1][-1],…” and it is expected to display [1][1],[1][2],… If sequence contains more than one transaction.
I believe when we call `ovm_do, macro should be able to set the m_transaction_id and it should reflect the same when we call get_transaction_id()
or
Do we need to set this member explicitly when we create the sequence item ?
The transaction_id is assigned automatically by the sequence each time a transaction is sent
to the sequencer with the transaction_id in its default (-1) value. If the user sets the
transaction_id to any non-default value, that value will be maintained.
transaction_id won’t be set by sequence automatically. It needs to be set by user manually.
Thanks for the response.
After working with few examples, i could see the transactionID is getting updated if we refer get_transaction_id() through its sequence_item in the user defined sequence class.
Thanks for correcting me. After going through the code i could see transaction id is getting updated with incremented value of previous transaction id.
if (param_t.get_transaction_id() == -1) begin
param_t.set_transaction_id(sequence_ptr.m_next_transaction_id++);