OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
#
2
# Ensure the compiler and necessary executables are on the search PATH
3
#
4
 
5
#
6
# Ensure you have set the following Variables
7
#
8
#
9
 
10
pipe:= |
11
empty:=
12
space:= $(empty) $(empty)
13
 
14
RISCV_ISA_ALL = $(shell ls $(ROOTDIR)/riscv-test-suite)
15
RISCV_ISA_OPT = $(subst $(space),$(pipe),$(RISCV_ISA_ALL))
16
 
17
export RISCV_TARGET ?= riscvOVPsim
18
export RISCV_DEVICE ?= rv32i
19
export RISCV_PREFIX ?= riscv64-unknown-elf-
20
 
21
ifeq ($(RISCV_ISA),)
22
    RISCV_ISA = rv32i
23
    DEFAULT_TARGET=all_variant
24
else
25
    DEFAULT_TARGET=variant
26
endif
27
 
28
export ROOTDIR  = $(shell pwd)
29
export WORK     = $(ROOTDIR)/work
30
export SUITEDIR = $(ROOTDIR)/riscv-test-suite/$(RISCV_ISA)
31
 
32
default: $(DEFAULT_TARGET)
33
 
34
variant: simulate verify
35
 
36
all_variant:
37
        for isa in $(RISCV_ISA_ALL); do \
38
                echo $$isa; \
39
                $(MAKE) RISCV_TARGET=$(RISCV_TARGET) RISCV_DEVICE=$$isa RISCV_ISA=$$isa variant; \
40
                rc=$$?; \
41
                if [ $$rc -ne 0 ]; then \
42
                        exit $$rc; \
43
                fi \
44
        done
45
 
46
simulate:
47
        make \
48
                RISCV_TARGET=$(RISCV_TARGET) \
49
                RISCV_DEVICE=$(RISCV_DEVICE) \
50
                RISCV_PREFIX=$(RISCV_PREFIX) \
51
                run -C $(SUITEDIR)
52
 
53
verify:
54
        riscv-test-env/verify.sh
55
 
56
clean:
57
        make \
58
                RISCV_TARGET=$(RISCV_TARGET) \
59
                RISCV_DEVICE=$(RISCV_DEVICE) \
60
                RISCV_PREFIX=$(RISCV_PREFIX) \
61
                clean -C $(SUITEDIR)
62
 
63
help:
64
        @echo "make"
65
        @echo "RISCV_TARGET='riscvOVPsim|spike'"
66
        @echo "RISCV_DEVICE='rv32i|rv32im|...'"
67
        @echo "RISCV_ISA=$(RISCV_ISA_OPT)"
68
        @echo "make all_variant // all combinations"
69
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.