P_sequencer and m_sequencer

In reply to cgales:

Just to be clear, when you say use m_sequencer to get configuration information, do you mean something like:

class seq_plb_base extends uvm_sequence #(plb_transaction);
  `uvm_object_utils(seq_plb_base);
  const string report_id="SEQ";

  plb_agent_configuration cfg;

  function new(string name="");
    super.new(name);
  endfunction

  virtual task body();
    if( !uvm_config_db #( plb_agent_configuration )::get( m_sequencer, "", "AGENT_CONFIG", cfg ))
      `uvm_fatal(report_id, "cannot find resource AGENT_CONFIG" )
    // .. do stuff

  endtask

endclass

But, as soon as I enter the work of transient dynamic objects like this, does performance not dictate that I should avoid using the config_db? I seems simpler to simply use p_sequencer.cfg (which is assigned once, in the agent).

An even more drastic situation: I extend a transaction, and apply constraints to it based on some configuration variable. If I rely on the database in that case, I’m really up the creek for performance. Example, I am generating IP packets, so I extend ip_transaction, and add a constraint that the destination IP address should be … some distribution or another. That distribution is based off IP addresses that were randomized in the test. That’s not really something I’d like to pull from DB every single time I create a packet. What do you think?