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
{{ message }}
Repository navigation
Edges of multi-bit event signals are judged on the low byte, not the LSB #1968
Part of #1123. Found in the reviews of #1777 and #1967. The reference runtime's event_level (and the compiled scheduler's g.level, which mirrors it) reads up to 8 low bits of an event signal and tests != 0. So a multi-bit event or derived-clock expression has a 'level' of any bit of its low byte.
IEEE 1800-2023 9.4.2 / Table 9-2: posedge and negedge are judged on the least significant bit. Example: logic [3:0] c; with always @(posedge c), where c goes 4'b0001 -> 4'b0010. The LSB falls, so there's no posedge, but Celox sees level 1 -> 1. And 4'b0010 -> 4'b0011, where the LSB rises, is posedge, but Celox sees level 1 -> 1 and misses it.
Fix both the reference and the compiled level read to the LSB. That includes the four-state rows of Table 9-2 where four-state is supported. Add vtest cases checked against Icarus/Verilator.
Note: reachability from SV still needs checking. Since #1708, a plain always @(posedge bus) with a multi-bit bus runs as a process (edge on the LSB through the wait machinery), so the example above may not reach event_level directly. Paths that can still reach it: multi-bit derived clock expressions, Veryl clock types wider than 1 bit, and host event signals. Confirm a reachable case first; if none exists, close this as unreachable.
Activity
tignear commentedon Oct 25, 2026
Note: reachability from SV still needs checking. Since #1708, a plain
always @(posedge bus)with a multi-bitbusruns as a process (edge on the LSB through the wait machinery), so the example above may not reach event_level directly. Paths that can still reach it: multi-bit derived clock expressions, Veryl clock types wider than 1 bit, and host event signals. Confirm a reachable case first; if none exists, close this as unreachable.