Hi ,
I am going to use UVM register ,when I compile sequence ,a error comes :
** Warning: …/tb/seq_lib/register_seq_lib.sv(34): (vlog-2181) Use of a parameterized class uvm_reg_sequence as a type creates a default specialization.
** Error: …/tb/seq_lib/register_seq_lib.sv(51): near “reg_data”: syntax error, unexpected IDENTIFIER, expecting
the following is my source code :
##################################################
`include “uvm_macros.svh”
import uvm_pkg::*;
class user_test_seq extends uvm_reg_sequence;
`uvm_object_utils(user_test_seq)
reg_block_slave reg_model;
function new(string name=“user_test_seq”);
super.new(name);
endfunction : new
virtual task body();
$cast(reg_model, this.reg_model);
// Randomize the content of 10 random indexed registers
uvm_reg_data_t reg_data; //line 51
uvm_status_e status;
reg_model.SWRST.write(status, 'h33, .parent(this));
reg_model.SWRST.read(status, reg_data);
$display("read return reg_data is %h",reg_data);
endtask : body
endclass : user_test_seq
##################################################