blob: e6630e24470b5b1ee0e548bee1b935dacea5d929 [file] [log] [blame]
lowRISC Contributors802543a2019-08-31 12:12:56 +01001// Copyright lowRISC contributors.
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5package ${name}_agent_pkg;
6 // dep packages
7 import uvm_pkg::*;
8 import dv_utils_pkg::*;
9 import dv_lib_pkg::*;
10
11 // macro includes
12 `include "uvm_macros.svh"
13 `include "dv_macros.svh"
14
15 // parameters
16
17 // local types
18 // forward declare classes to allow typedefs below
19 typedef class ${name}_item;
20 typedef class ${name}_agent_cfg;
21
22% if has_separate_host_device_driver:
23 // add typedef for ${name}_driver which is dv_base_driver with the right parameter set
24 // ${name}_host_driver and ${name}_device_driver will extend from this
25 typedef dv_base_driver #(.ITEM_T (${name}_item),
26 .CFG_T (${name}_agent_cfg)) ${name}_driver;
27
28% endif
29 // reuse dv_base_seqeuencer as is with the right parameter set
30 typedef dv_base_sequencer #(.ITEM_T (${name}_item),
31 .CFG_T (${name}_agent_cfg)) ${name}_sequencer;
32
33 // functions
34
35 // package sources
36 `include "${name}_item.sv"
37 `include "${name}_agent_cfg.sv"
38 `include "${name}_agent_cov.sv"
39% if has_separate_host_device_driver:
40 `include "${name}_host_driver.sv"
41 `include "${name}_device_driver.sv"
42% else:
43 `include "${name}_driver.sv"
44% endif
45 `include "${name}_monitor.sv"
46 `include "${name}_agent.sv"
47 `include "${name}_seq_list.sv"
48
49 endpackage: ${name}_agent_pkg