The invention relates to a modeling and formalized
verification method for
cache consistency protocol verification, and the method comprises the steps: building a protocol model which comprises a plurality of processor nodes,
directory nodes and a communication mechanism through a structured modeling mode, and constructing an asynchronous message mechanism to simulate disordered concurrent communication; protocol behavior rules such as processor requests,
directory responses and network receiving are defined, protocol property invariants are set, semantic constraints such as
data consistency, confirmation before writing and sharing state legality are covered, model
verification is carried out in a
state space traversal mode, breadth-first search and a symmetry recognition mechanism are supported, and the method is suitable for the protocol behavior rules. A
protocol error or
deadlock state is effectively found, a traceable error path is generated, a verifier can automatically generate source codes through a
compiler and operate on a host platform, and rapid
verification and result output of a protocol model are achieved. The method has good protocol adaptability and model
reusability, and is suitable for formalized verification of various
cache consistency protocols.