Skip to content

Commit

Permalink
floogen: Align unique ID increments in 2D meshes (#32)
Browse files Browse the repository at this point in the history
* floogen(pkg): Align address range and index increment

Before, the Id and the address range was not incremented in the same order of X,Y

* doc: Update CHANGELOG
  • Loading branch information
fischeti authored Mar 8, 2024
1 parent b863831 commit 847ad13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- System address map was renamed from `AddrMap` to `Sam`.
- The destination field in the flit header have a new type `dst_t` which is either set to `route_t` for the new source-based routing algorithm, and `id_t` for all the other routing algorithms.

### Fixed

- The generation of the unique ID has been changed resp. aligned for 2D meshes to increment Y-first and X-second. This way the address range and ID increment are consistent with each other.

## [0.4.0] - 2024-02-07

### Added
Expand Down
4 changes: 2 additions & 2 deletions floogen/model/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def compile_nis(self):
ni_dict["addr_range"] = ep_desc.addr_range.model_copy().set_idx(node_idx)

# 2D array case
case (m, _):
case (_, n):
x, y = self.graph.get_node_arr_idx(ni_name)
idx = y * m + x
idx = x * n + y
ni_dict["arr_idx"] = Coord(x=x, y=y)
ni_dict["addr_range"] = ep_desc.addr_range.model_copy().set_idx(idx)

Expand Down

0 comments on commit 847ad13

Please sign in to comment.