blob: 92e9d5b857b99de467d2aebaf394cb8025b6e55d [file] [log] [blame]
lowRISC Contributors802543a2019-08-31 12:12:56 +01001####################################################################################################
2## Copyright lowRISC contributors. ##
3## Licensed under the Apache License, Version 2.0, see LICENSE for details. ##
4## SPDX-License-Identifier: Apache-2.0 ##
5####################################################################################################
6## Entry point test Makefile forr building and running tests. ##
7## These are generic set of option groups that apply to all testbenches. ##
8## This flow requires the following options to be set: ##
9## DV_DIR - current dv directory that contains the test Makefile ##
10## DUT_TOP - top level dut module name ##
11## TB_TOP - top level tb module name ##
12## DOTF - .f file used for compilation ##
13## COMPILE_KEY - compile option set ##
14## TEST_NAME - name of the test to run - this is supplied on the command line ##
15####################################################################################################
16DV_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
17export DUT_TOP := gpio
18export TB_TOP := tb
19FUSESOC_CORE := lowrisc:dv:gpio_sim:0.1
20COMPILE_KEY ?= default
21
22####################################################################################################
23## A D D I N D I V I D U A L T E S T S B E L O W ##
24####################################################################################################
25TEST_NAME ?= gpio_sanity
26UVM_TEST ?= gpio_base_test
27UVM_TEST_SEQ ?= gpio_base_vseq
28
29ifeq (${TEST_NAME},gpio_sanity)
30 UVM_TEST_SEQ = gpio_sanity_vseq
31endif
32
33ifeq (${TEST_NAME},gpio_sanity_no_pullup)
34 UVM_TEST_SEQ = gpio_sanity_vseq
35 RUN_OPTS += +active_high_pullup=0
36endif
37
38ifeq (${TEST_NAME},gpio_csr_hw_reset)
39 UVM_TEST_SEQ = gpio_csr_vseq
40 RUN_OPTS += +csr_hw_reset
41 RUN_OPTS += +en_scb=0
42endif
43
44ifeq (${TEST_NAME},gpio_csr_rw)
45 UVM_TEST_SEQ = gpio_csr_vseq
46 RUN_OPTS += +csr_rw
47 RUN_OPTS += +en_scb=0
48endif
49
50ifeq (${TEST_NAME},gpio_csr_bit_bash)
51 UVM_TEST_SEQ = gpio_csr_vseq
52 RUN_OPTS += +csr_bit_bash
53 RUN_OPTS += +en_scb=0
54endif
55
56ifeq (${TEST_NAME},gpio_csr_aliasing)
57 UVM_TEST_SEQ = gpio_csr_vseq
58 RUN_OPTS += +csr_aliasing
59 RUN_OPTS += +en_scb=0
60endif
61
62ifeq ($(TEST_NAME),gpio_random_dout_din)
63 UVM_TEST_SEQ = gpio_random_dout_din_vseq
64endif
65
66ifeq ($(TEST_NAME),gpio_random_dout_din_no_pullup)
67 UVM_TEST_SEQ = gpio_random_dout_din_vseq
68 RUN_OPTS += +active_high_pullup=0
69endif
70
71ifeq ($(TEST_NAME),gpio_dout_din_regs_random_rw)
72 UVM_TEST_SEQ = gpio_dout_din_regs_random_rw_vseq
73endif
74
75ifeq ($(TEST_NAME),gpio_intr_rand_pgm)
76 UVM_TEST_SEQ = gpio_intr_rand_pgm_vseq
77endif
78
79ifeq ($(TEST_NAME),gpio_rand_intr_trigger)
80 UVM_TEST_SEQ = gpio_rand_intr_trigger_vseq
81endif
82
83ifeq ($(TEST_NAME),gpio_intr_with_filter_rand_intr_event)
84 UVM_TEST_SEQ = gpio_intr_with_filter_rand_intr_event_vseq
85 RUN_OPTS += +en_scb=0
86 RUN_OPTS += +zero_delays=1
87endif
88
89####################################################################################################
90## Include the tool Makefile below ##
91## Dont add anything else below it! ##
92####################################################################################################
93include ${DV_DIR}/../../../dv/tools/Makefile
94