下面代码的作用是什么:class scp_2_pdma_mem2perip_burst_test extends base_test; `uvm_component_utils (scp_2_pdma_mem2perip_burst_test) virtual function void test_cfg(); endfunction function new (string name="scp_2_pdma_mem2perip_burst_test", uvm_component parent=null); super.new (name, parent); endfunction : new function void build_phase(uvm_phase phase); super.build_phase(phase); endfunction : build_phase task run_phase(uvm_phase phase); ahb1_spi0_std_mode_sequence ahb1_spi0_std_mode_seq; ahb_master_8corecfg_sequence ahb_mst_8ccfg_seq; sysctrl_dma_config_sequence stsctrl_dma_seq; pdma_config_mem2perip_burst_sequence pdma_cfg_mem2perip_burst_seq; super.run_phase(phase); ahb1_spi0_std_mode_seq = ahb1_spi0_std_mode_sequence::type_id::create("ahb1_spi0_std_mode_seq"); ahb_mst_8ccfg_seq = ahb_master_8corecfg_sequence::type_id::create("ahb_mst_8ccfg_seq"); stsctrl_dma_seq = sysctrl_dma_config_sequence::type_id::create("stsctrl_dma_seq"); pdma_cfg_mem2perip_burst_seq = pdma_config_mem2perip_burst_sequence::type_id::create("pdma_cfg_mem2perip_burst_seq"); phase.raise_objection(this); // seq.starting_phase = phase; ahb1_spi0_std_mode_seq.start(env.scp_2_8core_master_agent.sequencer); ahb_mst_8ccfg_seq.start(env.scp_2_8core_master_agent.sequencer); stsctrl_dma_seq.start(env.scp_2_8core_master_agent.sequencer); pdma_cfg_mem2perip_burst_seq.start(env.scp_2_8core_master_agent.sequencer); phase.drop_objection(this); endtask endclass
时间: 2023-05-23 15:07:04 浏览: 176
这段代码定义了一个类 "scp_2_pdma_mem2perip_burst_test",它是 "base_test" 类的子类,并且使用了 UVM (Universal Verification Methodology)框架。这个类包含以下成员函数:test_cfg() 和 new(),以及 build_phase() 和 run_phase() 函数,它们均重写了 base_test 中对应的函数。在 run_phase() 函数中,定义了四个不同的 sequence,然后启动这四个 sequence,实现对 "env.scp_2_8core_master_agent" 中的 sequencer 的控制。这段代码可能是用于硬件验证的测试代码。
阅读全文