Skip to content

fix(sim): flip-flop domains miss edges to and from z on a four-state clock #1472

Closed

Description

@tignear

A flip-flop domain judges its clock edge on the level of the clock's value bits. In four-state simulation a transition to or from z (or x) is an edge by IEEE 1800-2023 Table 9-2 (0 -> z and 0 -> x are posedges, 1 -> z a negedge), but the domain does not fire.

Reproducer, from the SV timing case four_state_edges_count_transitions_through_unknown (four-state mode):

module Top(input logic host_clk, output logic [7:0] host_count);
    always_ff @(posedge host_clk) host_count <= host_count + 1;
endmodule

Driving host_clk 0, then 1'bz, leaves host_count at 0; Icarus counts the 0 -> z posedge. Waits in processes (@(posedge s)) already follow Table 9-2.

Part of #1123 (step 4).

Activity

  1. tignear commented on Oct 18, 2026

    @tignear
    ContributorAuthor

    Related: #1414 judges four-state edges of internally driven clocks by Table 9-2 and may cover this case (a host-driven clock).

  2. tignear commented on Oct 18, 2026

    @tignear
    ContributorAuthor

    Fixed by #1414: timing::four_state_edges_count_transitions_through_unknown passes on every backend on master, and #1475 enables it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions