Skip to content

GitHub Actions: Add continuous integration tests #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci
on: [pull_request, push]
jobs:
codespell_and_ruff:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
ignore_words_list: nd
# - uses: astral-sh/ruff-action@v3

test_cmn_diagram:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- run: |
sudo src/cmn_discover.py
python -m json.tool ~/.cache/arm/cmn-system.json
echo "====="
src/cmn_detect_cpu.py
src/cmn_diagram_py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ available through the ``perf_event_open`` interface and the ``perf``
userspace tools. These should be sufficient for many purposes.

In some cases it may be useful to construct CMN watchpoints to
match and count certan types of interconnect traffic. This generally
match and count certain types of interconnect traffic. This generally
requires some level of knowledge of the CHI architecture.
The ``cmnwatch.py`` script can be used to generate strings that
match CHI flits. The strings can be passed to the ``perf`` command.
Expand Down
2 changes: 1 addition & 1 deletion src/cmn_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
This module provides classes to model the structure of one or
more CMN mesh interconnects. Each mesh consists of a rectangular
grid of crosspoints (XPs), to which are attached devices such
as requestors and home nodes.
as requesters and home nodes.

The classes (System, CMN, CMNNode and CPU) can be used directly,
or subclassed to provide more detailed functionality.
Expand Down
2 changes: 1 addition & 1 deletion src/cmn_detect_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def prepare_system(S):
if o_verbose:
print("%u CPUs, %u RN-F ports" % (S.n_cpu, len(S.rnf_ports)))
# We usually see a consistent number of CPUs per RN-F port, but not always
if (S.n_cpu % len(S.rnf_ports)) != 0:
if S.rnf_ports and (S.n_cpu % len(S.rnf_ports)) != 0:
"""
A homogeneous system would have perhaps 1 or 2 CPUs per RN-F.
If the number does not divide equally, it could indicate that:
Expand Down
4 changes: 2 additions & 2 deletions src/cmn_devmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def port_base_id(self, rP):
def dtc_domain(self):
"""
Return the DTC domain number of this XP, if known.
TBD: Recent CMN allows an XP to have multiple DTMs, with a corrresponding
TBD: Recent CMN allows an XP to have multiple DTMs, with a corresponding
dtm_unit_info register for each one - implying an XP's DTMs could be in
different domains. We have not observed this.
"""
Expand Down Expand Up @@ -511,7 +511,7 @@ def dtm_is_enabled(self):
"""
e = self.test64(CMN_DTM_CONTROL, CMN_DTM_CONTROL_DTM_ENABLE)
if self._dtm_is_enabled is not None:
assert e == self._dtm_is_enabled, "%s: cached DTM emable state out of sync" % self
assert e == self._dtm_is_enabled, "%s: cached DTM enable state out of sync" % self
return e

def dtm_clear_fifo(self):
Expand Down
2 changes: 1 addition & 1 deletion src/cmn_flits.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def long_str(self):
else:
# SnpDVMOp part 1: often address[:6], but sometimes low
# bits are used for other purposes e.g. IS, TTL, TG
# Wthout seeing part 0, our heuristic is that if any bits
# Without seeing part 0, our heuristic is that if any bits
# from bit 7 on are set, it's an address.
if (addr >> 7) != 0:
address = (addr >> 1) << 6
Expand Down
4 changes: 2 additions & 2 deletions src/cmnwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _object_to_dict(obj, fields):
CMN-650: 7.1, tables 7-1 on
CMN-700: 6.1, tables 6-1 on

Some fields may exist in multple match groups, while others only exist
Some fields may exist in multiple match groups, while others only exist
in one. This gives us some flexibility in how we allocate fields.

CMN-650, CMN-700 and CI-700 appear to be the same.
Expand All @@ -341,7 +341,7 @@ def _object_to_dict(obj, fields):
"srcid": (None, [(0, 0, 11)], [(0, 0, 11), (2, 0, 11)]),
"tgtid": (None, [(0, 0, 11)], [(0, 0, 11), (2, 0, 11)]),
"returnnid": (None, [(0, 11, 11)], [(0, 11, 11)]),
"endian": (None, [(0, 22, 1)], [(0, 22, 1)]), # overlays wth stashnidvalid/deep
"endian": (None, [(0, 22, 1)], [(0, 22, 1)]), # overlays with stashnidvalid/deep
"opcode": (chi_spec.opcodes_REQ, [(0, 31, 6)], [(0, 29, 7), (2, 11, 7)]),
"size": (None, [(0, 37, 3)], [(0, 36, 3)]),
"ns": (chi_spec.NS, [(0, 40, 1)], [(0, 39, 1)]),
Expand Down