sequencer的cfg怎么传递不到transaction中呢?
时间:10-02
整理:3721RD
点击:
各位:
我正在学习使用VIP,有个transaction需要获得agent的config。我采用从sequencer传递进来的方法。
首先在sequence中用`uvm_declare_p_sequencer(svt_eth_sequencer),然后,在body中用tx.cfg=p_sequencer.cfg来传递。
但是结果编译的时候Error:
Local member 'cfg' of class 'svt_eth_sequencer' is no tvisible to scope 'eth_directed_sequence'. Please make sure that the above member is accessed only from its own class properties as it is declared as local.
两处cfg的类型都是eth_agent_configuration,应该不需要使用$cast吧?
我正在学习使用VIP,有个transaction需要获得agent的config。我采用从sequencer传递进来的方法。
首先在sequence中用`uvm_declare_p_sequencer(svt_eth_sequencer),然后,在body中用tx.cfg=p_sequencer.cfg来传递。
但是结果编译的时候Error:
Local member 'cfg' of class 'svt_eth_sequencer' is no tvisible to scope 'eth_directed_sequence'. Please make sure that the above member is accessed only from its own class properties as it is declared as local.
两处cfg的类型都是eth_agent_configuration,应该不需要使用$cast吧?
从error message看,我的理解是,p_sequencer的cfg变量是local变量或者私有变量。
它不可以传递给其他类使用,或者你无法用 “p_sequencer.cfg” 这样的代码来看到 cfg 变量。