Skip to content

Commit e9e1d43

Browse files
committed
GitHub Actions: Add continuous integration tests
1 parent 568fb33 commit e9e1d43

File tree

7 files changed

+32
-8
lines changed

7 files changed

+32
-8
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: ci
2+
on: [pull_request, push]
3+
jobs:
4+
codespell_and_ruff:
5+
runs-on: ubuntu-24.04-arm
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: codespell-project/actions-codespell@v2
9+
with:
10+
ignore_words_list: nd
11+
- uses: astral-sh/ruff-action@v3
12+
with:
13+
args: "--exit-zero" # TODO: Fix the errors and remove this line
14+
15+
test_cmn_diagram:
16+
runs-on: ubuntu-24.04-arm
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: |
20+
sudo src/cmn_discover.py
21+
src/cmn_detect_cpu.py
22+
src/cmn_diagram_py
23+
echo "====="
24+
cat ~/.cache/arm/cmn-system.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ available through the ``perf_event_open`` interface and the ``perf``
124124
userspace tools. These should be sufficient for many purposes.
125125

126126
In some cases it may be useful to construct CMN watchpoints to
127-
match and count certan types of interconnect traffic. This generally
127+
match and count certain types of interconnect traffic. This generally
128128
requires some level of knowledge of the CHI architecture.
129129
The ``cmnwatch.py`` script can be used to generate strings that
130130
match CHI flits. The strings can be passed to the ``perf`` command.

src/cmn_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
This module provides classes to model the structure of one or
1010
more CMN mesh interconnects. Each mesh consists of a rectangular
1111
grid of crosspoints (XPs), to which are attached devices such
12-
as requestors and home nodes.
12+
as requesters and home nodes.
1313
1414
The classes (System, CMN, CMNNode and CPU) can be used directly,
1515
or subclassed to provide more detailed functionality.

src/cmn_detect_cpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def prepare_system(S):
285285
if o_verbose:
286286
print("%u CPUs, %u RN-F ports" % (S.n_cpu, len(S.rnf_ports)))
287287
# We usually see a consistent number of CPUs per RN-F port, but not always
288-
if (S.n_cpu % len(S.rnf_ports)) != 0:
288+
if S.rnf_ports and (S.n_cpu % len(S.rnf_ports)) != 0:
289289
"""
290290
A homogeneous system would have perhaps 1 or 2 CPUs per RN-F.
291291
If the number does not divide equally, it could indicate that:

src/cmn_devmem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def port_base_id(self, rP):
469469
def dtc_domain(self):
470470
"""
471471
Return the DTC domain number of this XP, if known.
472-
TBD: Recent CMN allows an XP to have multiple DTMs, with a corrresponding
472+
TBD: Recent CMN allows an XP to have multiple DTMs, with a corresponding
473473
dtm_unit_info register for each one - implying an XP's DTMs could be in
474474
different domains. We have not observed this.
475475
"""
@@ -511,7 +511,7 @@ def dtm_is_enabled(self):
511511
"""
512512
e = self.test64(CMN_DTM_CONTROL, CMN_DTM_CONTROL_DTM_ENABLE)
513513
if self._dtm_is_enabled is not None:
514-
assert e == self._dtm_is_enabled, "%s: cached DTM emable state out of sync" % self
514+
assert e == self._dtm_is_enabled, "%s: cached DTM enable state out of sync" % self
515515
return e
516516

517517
def dtm_clear_fifo(self):

src/cmn_flits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def long_str(self):
305305
else:
306306
# SnpDVMOp part 1: often address[:6], but sometimes low
307307
# bits are used for other purposes e.g. IS, TTL, TG
308-
# Wthout seeing part 0, our heuristic is that if any bits
308+
# Without seeing part 0, our heuristic is that if any bits
309309
# from bit 7 on are set, it's an address.
310310
if (addr >> 7) != 0:
311311
address = (addr >> 1) << 6

src/cmnwatch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def _object_to_dict(obj, fields):
325325
CMN-650: 7.1, tables 7-1 on
326326
CMN-700: 6.1, tables 6-1 on
327327
328-
Some fields may exist in multple match groups, while others only exist
328+
Some fields may exist in multiple match groups, while others only exist
329329
in one. This gives us some flexibility in how we allocate fields.
330330
331331
CMN-650, CMN-700 and CI-700 appear to be the same.
@@ -341,7 +341,7 @@ def _object_to_dict(obj, fields):
341341
"srcid": (None, [(0, 0, 11)], [(0, 0, 11), (2, 0, 11)]),
342342
"tgtid": (None, [(0, 0, 11)], [(0, 0, 11), (2, 0, 11)]),
343343
"returnnid": (None, [(0, 11, 11)], [(0, 11, 11)]),
344-
"endian": (None, [(0, 22, 1)], [(0, 22, 1)]), # overlays wth stashnidvalid/deep
344+
"endian": (None, [(0, 22, 1)], [(0, 22, 1)]), # overlays with stashnidvalid/deep
345345
"opcode": (chi_spec.opcodes_REQ, [(0, 31, 6)], [(0, 29, 7), (2, 11, 7)]),
346346
"size": (None, [(0, 37, 3)], [(0, 36, 3)]),
347347
"ns": (chi_spec.NS, [(0, 40, 1)], [(0, 39, 1)]),

0 commit comments

Comments
 (0)