Skip to content

Commit

Permalink
[uvmgen] get seq form cmd in default_seq method
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon-Git committed Nov 21, 2023
1 parent 2bf88f0 commit e21df17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/uvmgen/templates/test_pkg/base_test.mako.sv
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ class ${test_name} extends uvm_test;
endfunction

virtual function void build_phase(uvm_phase phase);
string seq_name;
uvm_factory factory;
super.build_phase(phase);
env = ${env_name}::type_id::create("env", this);
% if seq_start_method != "start_task": ## seq_start_method == "default_seq"
uvm_config_db #(uvm_object_wrapper)::set(this, "env.vsqr.main_phase", "default_sequence", ${seq_lib_name}::get_type());
factory = uvm_factory::get();
void'($value$plusargs("UVM_TEST_SEQ=%0s", seq_name));
uvm_config_db #(uvm_object_wrapper)::set(this, "env.vsqr.main_phase", "default_sequence", factory.find_wrapper_by_name(seq_name));
% endif

endfunction
Expand Down

0 comments on commit e21df17

Please sign in to comment.