ref:https://solvnet.synopsys.com/dow_retrieve/latest/snps_vip_lib/doc/axi_svt_uvm_class_reference/html/index.html
1. testbench buildup
关于bench可以选择两种方式,比如只需要master agent:(下面的所有example都会以我的DUT是slave)
1.单独invoke master agent,所以留给user的configuration object是svt_axi_port_configuration
2.invoke svt_axi_system_env,相当于invoke了即有master又有slave的env,所以database里面的最高层级是svt_axi_system_env;user configuration object是svt_axi_system_configuration,以下是各configuration的主要信息:
The AXI VIP defines following configuration classes:
. System configuration (svt_axi_system_configuration)
The System configuration class contains configuration information which is applicable across the
entire system. You can specify the system level configuration parameters through this class. You
need to provide the system configuration to the system env from the environment or the testcase.
The system configuration mainly specifies:
. Number of master and slave agents in the system env
. Port configurations for master and slave agents
. Virtual top level AXI interface
. Address map
. Timeout values
. Port configuration (svt_axi_port_configuration)
The Port configuration class contains configuration information which is applicable to individual
AXI master or slave agents in the system env. Some of the important information provided by port
configuration class is:
. Active or Passive mode of the master or slave port agent
. Enable or disable protocol checks
. Enable or disable port-level coverage
. Interface type (AXI3/AXI4/AXI4-Lite)
. Port configuration contains the virtual interface for the port
The port configuration objects within the system configuration object are created in the constructor
of the system configuration.
❖ Interconnect configuration (svt_axi_interconnect_configuration)
Interconnect configuration class contains configuration information for the interconnect component.
It has a handle to the system configuration. In addition, this class contains configuration for number
of master and slave ports of the interconnect component, and the respective configuration for these
master and slave ports.
建议:
不管你的DUT是master,slave,还是interconnector,最好选择第2种方式,这便于向上集成,而且用起来也很方便,因为他提供的example就是这样的,所以只需要gen出example,把东西搬过来用就可以了。
USER最好要提供三个配置文件:
1.cust_svt_axi_system_configuration: extends from svt_axi_system_configuration, 对自己的环境进行用户自定义配置并config_db set下去(如果没有,vip不会报错,他会自己create一个default出来,所以要特别注意,)如下所示:
相关设定可以查看官司网的class referrence(需要注意的时,master_cfg只是调用function gen出来了,并没有随机,但建议不要随机整个cfg,而是对某些你DUT支援的进行随机,比如说arready default value 之类的)
(图中deault value的约束有点问题,对于master来说,应该约束rready和bready才是有用约束,对于slave来说应该约束arready,awready,wready)
2.cust_svt_axi_master_transaction
extends
from svt_axi_master_transaction,主要是对一些DUT的limition进行限制,加额外或override constraint,并记得在build phase override其default 的transaction.
3. svt_axi_user_defines.svpredefine一些define,因为VIP的default define不一定是你想要的(特别要注意,如果你想override他default define,一
定要在compile option加上 +define+SVT_AXI_INCLUDE_USER_DEFINES,他的devfine文件才会去include svt_axi_user_define.sv)
ps.对port width相关信息的define在svt_axi_port_defines.svi
对于transaction管控,比如outstanding ability之类的在svt_axi_common_defines.svi
2. monitor VIP的monitor提供了几个analysis_port,
其中item_observed_port用的比较多,记录了transaction的所有信息,传输的是svt_axi_transaction