lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1 | // Copyright lowRISC contributors. |
| 2 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
| 4 | |
Srikrishna Iyer | a8255fd | 2019-10-11 11:58:17 -0700 | [diff] [blame] | 5 | % if is_cip: |
| 6 | class ${name}_base_test extends cip_base_test #( |
| 7 | % else: |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 8 | class ${name}_base_test extends dv_base_test #( |
Srikrishna Iyer | a8255fd | 2019-10-11 11:58:17 -0700 | [diff] [blame] | 9 | % endif |
Srikrishna Iyer | de3b673 | 2020-01-30 14:50:07 -0800 | [diff] [blame] | 10 | .CFG_T(${name}_env_cfg), |
| 11 | .ENV_T(${name}_env) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 12 | ); |
Srikrishna Iyer | a8255fd | 2019-10-11 11:58:17 -0700 | [diff] [blame] | 13 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 14 | `uvm_component_utils(${name}_base_test) |
| 15 | `uvm_component_new |
| 16 | |
| 17 | // the base class dv_base_test creates the following instances: |
| 18 | // ${name}_env_cfg: cfg |
| 19 | // ${name}_env: env |
| 20 | |
Udi Jonnalagadda | 3e460cc | 2020-02-11 15:46:24 -0800 | [diff] [blame] | 21 | % if not has_ral: |
| 22 | virtual function void build_phase(uvm_phase phase); |
| 23 | super.build_phase(phase); |
| 24 | cfg.has_ral = 1'b0; |
| 25 | endfunction |
Udi Jonnalagadda | 3e460cc | 2020-02-11 15:46:24 -0800 | [diff] [blame] | 26 | |
Srikrishna Iyer | b29ebe8 | 2020-05-20 11:29:25 -0700 | [diff] [blame] | 27 | % endif |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 28 | // the base class also looks up UVM_TEST_SEQ plusarg to create and run that seq in |
| 29 | // the run_phase; as such, nothing more needs to be done |
| 30 | |
| 31 | endclass : ${name}_base_test |