From e21df17003356612fd5b9ba8636d50a8b6819fc0 Mon Sep 17 00:00:00 2001 From: Dragon-Git <1762578117@qq.com> Date: Tue, 21 Nov 2023 21:31:20 +0800 Subject: [PATCH] [uvmgen] get seq form cmd in default_seq method --- src/uvmgen/templates/test_pkg/base_test.mako.sv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uvmgen/templates/test_pkg/base_test.mako.sv b/src/uvmgen/templates/test_pkg/base_test.mako.sv index 2295219..e5dfd8a 100644 --- a/src/uvmgen/templates/test_pkg/base_test.mako.sv +++ b/src/uvmgen/templates/test_pkg/base_test.mako.sv @@ -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