Testing Composable Specifications
Ken McMillan Microsoft Research
Specifications Ken McMillan Microsoft Research Case study - - PowerPoint PPT Presentation
Testing Composable Specifications Ken McMillan Microsoft Research Case study TileLink is a protocol for implementing a coherent memory in a system-on-chip (SoC). Goal: a formal, modular specification of TileLink Specify the protocol
Ken McMillan Microsoft Research
CORE CORE CORE L2$ NET DIR DIR MEM MEM L2$ DIR MEM TL TL TL TL Hierarchy implements weakly consistent memory model.
system.
arbitrary configurations of components.
Some composable specifications are better than others, howeverβ¦
A B π π A: βπ» (πΌπ β π)β B: βπ» (πΌπ β π)β Aβ₯B: βπ»(π β§ π)β composable! This proof is checkable in P-time We want our specifications to be composable βby constructionβ.
Memory operations:
CPU
read write atomic
Happens-before relation on operations: happens-before(ππ1, ππ2) β loc(ππ1) = loc(ππ2) β§ time(ππ1) < time(ππ2) Weak consistency: A set of operations is weakly consistent if there exists an ordering π s.t:
Consistency: A sequence of ops is consistency if every read sees value of most recent write. β§ (addr(ππ1) = addr(ππ2) β¨ atomic(ππ1) β¨ atomic(ππ2))
How do we witness the serialization π? How do local operations fit into the global serialization?
These operations allow us to define the semantics of the system interfaces. ref. create commit create : op Γ loc β stamp commit : stamp β unit eval : stamp β value eval mem commit(stamp): assumes happens-before(X,op(stamp)) β committed(X) value = eval(stamp): guarantees value = result(π,op(stamp)) assumes committed(stamp)
CORE CORE CORE L2$ NET DIR DIR MEM MEM L2$ DIR MEM TL TL TL TL
Acquire Grants Finish Probe Release client manager
Typical transaction flow at interface
implies requested(X).
These properties refer to the reference object to define
has shared or exclusive permissions.
has exclusive permissions.
interface has shared or invalid permissions.
interface has invalid permissions.
The coherence state determines what commitments are allowed on either side of the interface. This is the function of coherence.
Note: βclient sideβ means any component left of the interface.
reference object β¦ ππππ π β¦ ππππ πΊπ©πΈ π΅π π«π π·π ππ ππ·π π»π΅π πππ π»π«π
reference object β¦ ππππ π β¦ ππππ πΊπ©πΈ π΅π π«π π·π ππ ππ·π π»π΅π πππ π»π«π P,R: π·π
β, ππ β β π·π, ππ
P,R: ππ·π, π·π
β, ππ β β ππ·π
P,R: πππ, π·π
β, ππ β β πππ
P,R: π·π
β, ππ β, πππ β, ππ·π β β ππ΅π
π» ππ΅π Checking this proof is a purely syntactic operation
Because our assume/guarantee specification is composable, we know that hierarchies built from these components implement a weakly consistent shared memory.
reference object π2 RTL β¦ ππππ β¦ ππππ πΊπ©πΈ π·π ππ ππ·π πππ π΅π π«π π»π΅π π»π«π
generate generate check check
check
internal corner cases
arbitrary configuration.
Composable specifications provide a way to formal verification experts to provide value in an environment where most engineers do not have formal skills.
designers intention.
should be strengthened or weakened for efficiency.