Out-of-order multiprocessors are critical components of modern hardware, and their verification is desirable as they are difficult to correct once shipped. Existing literature simplifies and improves instruction set architectures (ISAs) for such processors, but they assume the processor correctly implements the ISA rather than proving it. We present the first formal verification of an out-of-order multiprocessor $\text{Core}_{\text{Impl}}$ against an in-order, weak-memory RISC-V ISA, RISC-V$_{\text{prom}}$. Our central component is $\text{Core}_{\text{InO}}$, an in-order one-instruction at a time core specification, enabling us to confine out-of-order reasoning to a single core. We decompose the main proof into two refinements. The core refinement proves that $\text{Core}_{\text{InO}}$ is a correct specification for $\text{Core}_{\text{Impl}}$. The system refinement shows that RISC-V$_{\text{prom}}$ is a correct specification for multiple $\text{Core}_{\text{InO}}$ connected with shared memory, leveraging the simplicity of $\text{Core}_{\text{InO}}$ in the proof. All of our proofs are mechanized in Rocq, with large language model agents heavily used to automate proof writing. We synthesized $\text{Core}_{\text{Impl}}$ into the Bluespec hardware description language, and validated it produces the intended weak behaviors and adheres to the official RISC-V test suite.
翻译:暂无翻译