|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 xm900626 于 2014-12-25 17:24 编辑
这是本人在编写简单的验证平台时遇到的一个问题,看了case1.sv也没看出什么问题,请各位大神指教
编译错误如下:
Error-[SE] Syntax error
Following verilog source has syntax error :
"case1.sv", 4: token is 'class'
class case1 extends uvm_test;
^
System verilog keyword 'class' is not expected to be used in this context.
1 warning
1 error
CPU time: .694 seconds to compile
case1.sv内容如下:
`ifndef CASE1_SV
`define CASE1_SV
class case1 extends uvm_test;
data_config data_cfg;
img_set_config img_set_cfg;
`uvm_component_utils(case1)
mod_adp_driver mod_adp_drv;
mod_adp_sequencer mod_adp_sqr;
function new(string name = "case1", uvm_component parent = null);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
mod_adp_drv = mod_adp_driver::type_id::create("mod_adp_drv", this);
mod_adp_sqr = mod_adp_sequencer::type_id::create("mod_adp_sqr", this);
data_cfg = data_config::type_id::create("data_cfg", this);
data_cfg.build();
uvm_config_db#(data_config)::set(this, "mod_adp_sqr.*", "data_cfg", data_cfg);
img_set_cfg = img_set_config::type_id::create("img_set_cfg", this);
img_set_cfg.build();
uvm_config_db#(img_set_config)::set(this, "mod_adp_drv", "img_set_cfg", img_set_cfg);
uvm_config_db#(uvm_object_wrapper)::set(this, "mod_adp_sqr.main_phase.*", "default_sequence", mod_adp_sequence::type_id::get());
endfunction
virtual function viod connect_phase(uvm_phase phase);
super.connect_phase(phase);
mod_adp_drv.seq_item_port.connect(mod_adp_sqr.seq_item_export);
endfunction
endclass
`endif |
|