I have a base sequence, and some sequences extend it.
I want that the base sequence will responsible for setting the constraints of some member of the transaction.
For example:
class axi_base_sequence extends uvm_sequence#(axi_transaction);
//configuration object
axi_agent_config m_cfg;
//factory registration
`uvm_object_utils(axi_base_sequence)
//new
function new (string name = "axi_sequence");
super.new(name);
endfunction: new
//members decleration
delay_type delay_t;
int fixed_delay;
axi_transaction axi_trx;
[b]//can I add the following to ensure that the set constrain always happens?
if(!uvm_config_db #(axi_agent_config)::get(m_sequencer, "", "db_axi_agent_config", m_cfg)) begin
`uvm_error("task_body", "axi_agent_config not found")
end//if
m_cfg.max = 3455;
m_cfg.max = 34;[/b]
endclass: axi_base_sequence