You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(core): consolidate check_lane_strict into check_lane (#273) (#289)
* refactor(core): consolidate check_lane_strict into check_lane (#273)
Replace check_lane with the stricter validation that also verifies
the site/word is a valid forward source for the bus. Remove
check_lane_strict as a separate function.
Fixes:
- Bus.resolve_forward/resolve_backward now use .get() to avoid
panicking on mismatched src/dst lengths
- Example arch spec lane encoding updated from 0xC000000000010000
(word_id=1, old convention) to 0xC000000000000000 (word_id=0,
correct forward-source convention)
- AOD rectangle tests updated to use valid forward source sites
across two words instead of destination sites on one word
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(core): update group_rectangle smoke test for stricter check_lane
The .sst test file used sites 5,6 (bus destinations) as forward
sources. Updated to use valid forward sources across two words
to form the same 2x2 rectangle geometry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(core): add site_id bounds check for WordBus lanes and clarify docs
- check_lane now validates site_id is in range for WordBus lanes
(previously only word_id was checked, but site_id is used in
lane_endpoints to build LocationAddr)
- Clarify archspec.md lane example: word_id encodes the forward
source for that specific lane, not necessarily word 0 in general
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -164,7 +164,7 @@ Each `TransportPath` entry has:
164
164
|`lane`| string | Encoded `LaneAddr` as a `"0x..."` hex string. |
165
165
|`waypoints`|[x, y][]| Sequence of physical coordinate waypoints. |
166
166
167
-
To decode the lane hex string, parse it as a 64-bit unsigned integer. The low 32 bits (data0) contain `[word_id:16][site_id:16]` and the high 32 bits (data1) contain `[dir:1][mt:1][pad:14][bus_id:16]`. For example, `"0xC000000000010000"` decodes to direction=Backward, move_type=WordBus, word=1, site=0, bus=0.
167
+
To decode the lane hex string, parse it as a 64-bit unsigned integer. The low 32 bits (data0) contain `[word_id:16][site_id:16]` and the high 32 bits (data1) contain `[dir:1][mt:1][pad:14][bus_id:16]`. For example, `"0xC000000000000000"` decodes to direction=Backward, move_type=WordBus, word=0, site=0, bus=0. In the lane address convention, `word_id` always encodes the forward-direction source word for that lane; in this specific example the bus mapping is src=[0], dst=[1], so `direction=Backward` means the move goes from word 1 back to word 0.
168
168
169
169
This field is omitted from the JSON when not needed.
0 commit comments