-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.sv
68 lines (52 loc) · 1.69 KB
/
test.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
// -------------------------------------------------------------
// Copyright 2004-2011 Synopsys, Inc.
// Copyright 2010 Mentor Graphics Corporation
// Copyright 2010 Cadence Design Systems, Inc.
// All Rights Reserved Worldwide
//
// Licensed under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in
// writing, software distributed under the License is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See
// the License for the specific language governing
// permissions and limitations under the License.
// -------------------------------------------------------------
//
program test;
import uvm_pkg::*;
import apb_pkg::*;
`include "reg_model.sv"
`include "volatile_impl_if.sv"
`include "volatile_cb.sv"
`include "fifo_volatile_impl.sv"
`include "timer_volatile_impl.sv"
`include "apb_reg_predictor.sv"
`include "tb_env.sv"
`include "testlib.sv"
class dut_reset_seq extends uvm_sequence;
function new(string name = "dut_reset_seq");
super.new(name);
endfunction
`uvm_object_utils(dut_reset_seq)
virtual task body();
tb_top.rst = 1;
repeat (5) @(negedge tb_top.clk);
tb_top.rst = 0;
endtask
endclass
initial
begin
static tb_env env = new("env");
uvm_config_db#(apb_vif)::set(env, "apb", "vif", $root.tb_top.apb0);
uvm_config_db#(gpio_vif)::set(env, "gpio", "vif", $root.tb_top.gpio0);
run_test();
end
endprogram