Skip to content

Commit 8e2acd5

Browse files
committed
Merge branch 'feature/2018-11-27-zephyr' into develop
2 parents 93aad00 + 69c409d commit 8e2acd5

File tree

2,623 files changed

+582364
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,623 files changed

+582364
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1-
# tra5
1+
# Multi-Threaded RISC-V Core
22

3-
Core microprocessor binary compatible with RISC-V.
3+
The design of this CPU is inspired by the previous work done with the AEMB2 microprocessor - fine-grain multi-threading.
4+
5+
## Verilator
6+
7+
The Verilator model *MUST* first be compiled before running any of the tests.
8+
To build the simulation model with Verilator, do the following:
9+
10+
$ cd sim/
11+
$ make
12+
13+
## Compliance Tests
14+
15+
The TRA5 core passes ALL the compliance tests except for the EBREAK, which fails simply due to an invalid MCAUSE value. This logic can be fixed easily, if necessary, but was not done in this case because this instruction does not appear to be used much, if at all.
16+
17+
To build and run the tests:
18+
19+
$ cd riscv-compliance-master/
20+
$ make
21+
22+
## Zephyr RTOS
23+
24+
The TRA5 core has some limitations with the RTOS samples.
25+
26+
1. It uses FGMT and unless the core of the OS is modified to cater to this, the RTOS will not be capable of exploiting the full capabilities of the CPU. Also, two lines of assembly was inserted into vectors.S to lock out all threads except for Thread0. This code was borrowed verbatim from the Compliance Tests.
27+
2. It lacks timers, which means that cooperative multi-tasking is required for now. Furthermore, any timing based delay will face issues.
28+
29+
To build and run the tests:
30+
31+
$ cd zephyr-zephyr-v1.13.0/
32+
$ ./t5_build.sh
33+
34+
The 'console' output is piped to the *.out files.
35+
36+
## Hardware
37+
38+
Although the CPU has been designed in 100% fully-synthesisable Verilog, it has not been tested in hardware.
39+
Caveat emptor!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--mailback
2+
--no-tree
3+
--emacs
4+
--summary-file
5+
--show-types
6+
--max-line-length=80
7+
--min-conf-desc-length=1
8+
--typedefsfile=scripts/checkpatch/typedefsfile
9+
10+
--ignore BRACES
11+
--ignore PRINTK_WITHOUT_KERN_LEVEL
12+
--ignore SPLIT_STRING
13+
--ignore VOLATILE
14+
--ignore CONFIG_EXPERIMENTAL
15+
--ignore AVOID_EXTERNS
16+
--ignore NETWORKING_BLOCK_COMMENT_STYLE
17+
--ignore DATE_TIME
18+
--ignore MINMAX
19+
--ignore CONST_STRUCT
20+
--ignore FILE_PATH_CHANGES
21+
--exclude ext

zephyr-zephyr-v1.13.0/.codecov.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
status:
11+
project: yes
12+
patch: yes
13+
changes: no
14+
15+
#ignore:
16+
# - "tests/**/*"
17+
# - "samples/**/*"
18+
# - "ext/hal/**/*"
19+
20+
parsers:
21+
gcov:
22+
branch_detection:
23+
conditional: yes
24+
loop: yes
25+
method: no
26+
macro: no
27+
28+
comment:
29+
layout: "reach, diff, flags, files, footer"
30+
behavior: default
31+
require_changes: no

zephyr-zephyr-v1.13.0/.gitlint

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# All these sections are optional, edit this file as you like.
2+
[general]
3+
ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B3, B1
4+
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
5+
verbosity = 3
6+
# By default gitlint will ignore merge commits. Set to 'false' to disable.
7+
ignore-merge-commits=true
8+
# Enable debug mode (prints more output). Disabled by default
9+
debug = false
10+
11+
# Set the extra-path where gitlint will search for user defined rules
12+
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
13+
extra-path=scripts/gitlint
14+
15+
[title-max-length-no-revert]
16+
line-length=72
17+
18+
[body-min-line-count]
19+
min-line-count=1
20+
21+
[body-max-line-count]
22+
max-line-count=200
23+
24+
[title-starts-with-subsystem]
25+
regex = ^(([^:]+):)(\s([^:]+):)*\s(.+)$
26+
27+
[title-must-not-contain-word]
28+
# Comma-separated list of words that should not occur in the title. Matching is case
29+
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
30+
# will not cause a violation, but "WIP: my title" will.
31+
words=wip
32+
33+
[title-match-regex]
34+
# python like regex (https://docs.python.org/2/library/re.html) that the
35+
# commit-msg title must be matched to.
36+
# Note that the regex can contradict with other rules if not used correctly
37+
# (e.g. title-must-not-contain-word).
38+
#regex=^US[0-9]*
39+
40+
[max-line-length-with-exceptions]
41+
# B1 = body-max-line-length
42+
line-length=72
43+
44+
[body-min-length]
45+
min-length=3
46+
47+
[body-is-missing]
48+
# Whether to ignore this rule on merge commits (which typically only have a title)
49+
# default = True
50+
ignore-merge-commits=false
51+
52+
[body-changed-file-mention]
53+
# List of files that need to be explicitly mentioned in the body when they are changed
54+
# This is useful for when developers often erroneously edit certain files or git submodules.
55+
# By specifying this rule, developers can only change the file when they explicitly reference
56+
# it in the commit message.
57+
#files=gitlint/rules.py,README.md
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
This directory contains configuration files to ignore errors found in
2+
the build and test process which are known to the developers and for
3+
now can be safely ignored.
4+
5+
To use:
6+
7+
$ cd zephyr
8+
$ make SOMETHING >& result
9+
$ scripts/filter-known-issues.py result
10+
11+
It is included in the source tree so if anyone has to submit anything
12+
that triggers some kind of error that is a false positive, it can
13+
include the "ignore me" file, properly documented.
14+
15+
Each file can contain one or more multiline Python regular expressions
16+
(https://docs.python.org/2/library/re.html#regular-expression-syntax)
17+
that match an error message. Multiple regular expressions are
18+
separated by comment blocks (that start with #). Note that an empty
19+
line still is considered part of the multiline regular expression.
20+
21+
For example
22+
23+
---beginning---
24+
#
25+
# This testcase always fails, pending fix ZEP-1234
26+
#
27+
.*/tests/kernel/grumpy .* FAIL
28+
#
29+
# Documentation issue, masks:
30+
#
31+
# /home/e/inaky/z/kernel.git/doc/api/io_interfaces.rst:28: WARNING: Invalid definition: Expected identifier in nested name. [error at 19]
32+
# struct dev_config::@65 dev_config::bits
33+
# -------------------^
34+
#
35+
^(?P<filename>.+/doc/api/io_interfaces.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
36+
^\s+struct dev_config::@[0-9]+ dev_config::bits.*
37+
^\s+-+\^
38+
---end---
39+
40+
Note you want to:
41+
42+
- use relateive paths; instead of
43+
/home/me/mydir/zephyr/something/somewhere.c you will want
44+
^.*/something/somewhere.c (as they will depend on where it is being
45+
built)
46+
47+
- Replace line numbers with [0-9]+, as they will change
48+
49+
- (?P<filename>[-._/\w]+/something/somewhere.c) saves the match on
50+
that file path in a "variable" called 'filename' that later you can
51+
match with (?P=filename) if you want to match multiple lines of the
52+
same error message.
53+
54+
Can get really twisted and interesting in terms of regexps; they are
55+
powerful, so start small :)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#
2+
# Bluetooth unnamed struct definition
3+
#
4+
# FIXME: all these should match the relative filename
5+
#
6+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
7+
^[ \t]*$
8+
^[ \t]*\^$
9+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
10+
^[ \t]*$
11+
^[ \t]*\^$
12+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]$
13+
^.*bt_conn_info.__unnamed__.*$
14+
^[- \t]*\^$
15+
#
16+
# bt_gatt_discover_params unnamed struct definition
17+
#
18+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
19+
^[ \t]*
20+
^[ \t]*\^
21+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
22+
^[ \t]*
23+
^[ \t]*\^
24+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
25+
^.*bt_gatt_discover_params.__unnamed__.*
26+
^[- \t]*\^
27+
#
28+
# Bluetooth GATT unnamed struct definition
29+
#
30+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
31+
^[ \t]*
32+
^[ \t]*\^
33+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
34+
^[ \t]*
35+
^[ \t]*\^
36+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
37+
^.*bt_gatt_read_params.__unnamed__.*
38+
^[- \t]*\^
39+
#
40+
# Bluetooth mesh unnamed struct definition
41+
#
42+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
43+
^[ \t]*
44+
^[ \t]*\^
45+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
46+
^[ \t]*
47+
^[ \t]*\^
48+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
49+
^.*bt_mesh_model.__unnamed__.*
50+
^[- \t]*\^
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Display
3+
#
4+
#
5+
# include
6+
#
7+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]display_api.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
8+
^[ \t]*
9+
^[ \t]*\^
10+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
11+
^[ \t]*
12+
^[ \t]*\^
13+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
14+
^.*mb_image.__unnamed__
15+
^[- \t]*\^
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]file_system.rst):(?P<lineno>[0-9]+): WARNING: Duplicate declaration.
3+
#
4+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]io_interfaces.rst):(?P<lineno>[0-9]+): WARNING: Duplicate declaration.
5+
#
6+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]subsystems[/\\]sensor.rst):(?P<lineno>[0-9]+): WARNING: Duplicate declaration.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Kernel
3+
#
4+
#
5+
# include/kernel.h warnings
6+
#
7+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]kernel_api.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
8+
^[ \t]*
9+
^[ \t]*\^
10+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
11+
^[ \t]*
12+
^[ \t]*\^
13+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
14+
^[ \t]*
15+
^[ \t]*\^
16+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
17+
^[ \t]*
18+
^[ \t]*\^
19+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
20+
^[ \t]*
21+
^[ \t]*\^
22+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
23+
^.*k_poll_event.__unnamed__
24+
^[- \t]*\^
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Display
3+
#
4+
#
5+
# include
6+
#
7+
^(?P<filename>([\-:\\/\w\.])+[/\\]doc[/\\]api[/\\]misc_api.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
8+
^[ \t]*
9+
^[ \t]*\^
10+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
11+
^[ \t]*
12+
^[ \t]*\^
13+
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
14+
^.*json_obj_descr.__unnamed__
15+
^[- \t]*\^

0 commit comments

Comments
 (0)