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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [do.py] - Blame information for rev 65

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 64 zero_gravi
#!/usr/bin/env python3
2
 
3
# doit
4
 
5
from sys import executable, argv as sys_argv, exit as sys_exit
6
from os import environ
7
from pathlib import Path
8
 
9
from doit.action import CmdAction
10
from doit.cmd_base import ModuleTaskLoader
11
from doit.doit_cmd import DoitMain
12
 
13
DOIT_CONFIG = {"verbosity": 2, "action_string_formatting": "both"}
14
 
15
ROOT = Path(__file__).parent
16
 
17
 
18
def task_BuildAndInstallSoftwareFrameworkTests():
19
    return {
20
        "actions": [
21
            # Check toolchain
22
            "make -C sw/example/processor_check check",
23
            # Generate executables for all example projects
24
            "make -C sw/example clean_all exe",
25
            # Compile and install bootloader
26
            "make -C sw/bootloader clean_all info bootloader",
27
            # Compile and install test application
28
            # Redirect UART0 TX to text.io simulation output via <UART0_SIM_MODE> user flag
29
            "echo 'Compiling and installing CPU (/Processor) test application'",
30 65 zero_gravi
            "make -C sw/example/processor_check clean_all USER_FLAGS+=-DRUN_CHECK USER_FLAGS+=-DUART0_SIM_MODE USER_FLAGS+=-DUART1_SIM_MODE MARCH=rv32imac info all",
31 64 zero_gravi
        ],
32
        "doc": "Build all sw/example/*; install bootloader and processor check",
33
    }
34
 
35
 
36
def task_RunRISCVArchitectureTests():
37
    return {
38
        "actions": [CmdAction(
39
            "./run_riscv_arch_test.sh {suite}",
40
            cwd=ROOT / "sim"
41
        )],
42
        "doc": "Run RISC-V Architecture Tests",
43
        "params": [
44
            {
45
                "name": "suite",
46
                "short": "s",
47
                "long": "suite",
48
                "default": "M",
49
                "choices": ((item, "") for item in [
50
                    "I",
51
                    "C",
52
                    "M",
53
                    "privilege",
54
                    "Zifencei",
55
                    "rv32e_C",
56
                    "rv32e_E",
57
                    "rv32e_M"
58
                ]),
59
                "help": "Test suite to be executed",
60
            }
61
        ],
62
    }
63
 
64
 
65
def task_Documentation():
66
    return {
67
        "actions": ["make -C docs {posargs}"],
68
        "doc": "Run a target in subdir 'doc'",
69
        "uptodate": [False],
70
        "pos_arg": "posargs",
71
    }
72
 
73
 
74
def task_DeployToGitHubPages():
75
    cwd = str(ROOT / "public")
76
    return {
77
        "actions": [
78
            CmdAction(cmd, cwd=cwd)
79
            for cmd in [
80
                "git init",
81
                "cp ../.git/config ./.git/config",
82
                "touch .nojekyll",
83
                "git add .",
84
                'git config --local user.email "push@gha"',
85
                'git config --local user.name "GHA"',
86
                "git commit -am '{posargs}'",
87
                "git push -u origin +HEAD:gh-pages",
88
            ]
89
        ],
90
        "doc": "Create a clean branch in subdir 'public' and push to branch 'gh-pages'",
91
        "pos_arg": "posargs",
92
    }
93
 
94
 
95
if __name__ == '__main__':
96
    sys_exit(DoitMain(ModuleTaskLoader(globals())).run(sys_argv[1:]))

powered by: WebSVN 2.1.0

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