复现了下你的代码,没任何问题。
- `ifndef MY_CASE1__SV
- `define MY_CASE1__SV
- `define DIR "test_case"
- class case1_sequence extends uvm_sequence #(my_transaction);
- my_transaction m_trans;
- string case_name;
- logic [31:0] data[9:0];
- function new(string name= "case1_sequence");
- super.new(name);
- endfunction
- virtual task body();
- if(starting_phase != null)
- starting_phase.raise_objection(this);
- for(int t=32 ;t<33 ; t++) begin
- $sformat(case_name,"%s%0d.txt",`DIR,t);
- $display(case_name);
- $readmemh(case_name,data);
- end
- // $readmemh("test_case33.txt",data);
- for(int i=0; i<10 ; i++) begin
- $display("data[%d] = %h",i, data[i]);
- end
- `uvm_info(get_type_name(),"2019 test",UVM_NONE);
复制代码
|