Skip to content

Mismatch between uarch spec and implementation for FwdRdAck/LOAD_FWDACK transition to Shared #171

@mujahid-10xe

Description

@mujahid-10xe

Description:
According to the micro-arch (Section 3.2, Figure 5), the following transitions should occur when a FwdRdAck is received from the owner:
M → S
E → S
Reference Figure:
Image

Currently, the RTL does not handle the M → S transition.

Verification Setup:
1- I wrote the following assertion based on the specification:
as_state_m_s_load_fwd_ack: assert property(
l2.pipe2.ctrl.valid_S2 &&
l2.pipe2.ctrl.msg_type_S2_f == LOAD_FWDACK &&
l2.pipe2.ctrl.l2_way_state_mesi_S2 == MODIFIED
|->
l2.pipe2.ctrl.state_mesi_S2 == SHARED
);

2- When running formal verification, the antecedent (conditions for firing) was covered, but the consequent (transition to SHARED) was never covered.
3- On inspecting the RTL, I found that there is no case defined for this transition in pipe2 of L2 cache.

Conclusion:
When the current state is Modified and a LOAD_FWDACK is received, the next state should transition to Shared, consistent with the specification (Section 3.2, Figure 5). However, the M → S transition is not implemented in the RTL, and as a result, assertions based on the specification fail to cover this scenario. This causes the L2 state machine behavior to diverge from the documented specification and can potentially lead to incorrect coherence behavior when a cache line in M receives a LOAD_FWDACK. To resolve this, the L2 controller state transition logic should be updated to handle the M → S case, similar to the existing E → S transition.

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