[UVM]UVM环境搭建之top module

       前言:top module是整个UVM验证环境的最顶层,那么我们需要在top中做什么工作呢?本文将做一个详细的介绍。

一、调用run_test(),启动UVM验证系统。

  1. 需要制定download哪些Wavefrom。
  2. 其次需要定制化环境中时间的显示格式。
  3. 最后调用run_test()启动验证环境。
module top();

  initial begin
    $fdsbDumpDMA(); #vcs compile option : -debug_pp, +memcbk is needed
    $fdsbDumpSVA(0, "dut_i");
    $timeformatf(-9, 3, "ns", 20);
    run_test();
  end

endmodule

二、例化DUT

dut dut_i(
  .clk            (sys_clk),
  .rst_n          (rst_n),
  .psel           (psel),
  .pclk           (sys_clk),
  .penable        (penable),
  .pready         (pready),
  .paddr          (paddr),
  .pwrite         (pwrite),
  .prdata         (prdata),
  .pwdata         (pwdata)
)

三、Set Interface.

svt_apb_mst_if        apb_mst_vif(.clk(sys_clk), .rst_n(rst_n));

initial begin
  uvm_c

猜你喜欢

转载自blog.csdn.net/gsjthxy/article/details/105016608