610 likes | 759 Views
How do I use all this?. How do I use all this, really?. How do I use all this, really? Detailed step-by-step description of a pipeline verification example. Outline. 1 Informal Introduction 2 Formal Definitions Reactive Systems Witnessed Refinement Proofs Slicing Reactive Systems
E N D
How do I use all this, really? Detailed step-by-step description of a pipeline verification example
Outline • 1 Informal Introduction • 2 Formal Definitions • Reactive Systems • Witnessed Refinement Proofs • Slicing Reactive Systems • Decomposing Refinement Proofs • 3 Formal Example: Three-Stage Pipeline • 4 Informal Example: Dataflow Processor Array
isaRegFile op isaAlu inp src1 src2 dest isaOut out stall Specification: ISA
isaRegFile isaAlu op inp src1 isaOut src2 dst out stall load r1 1 xnor r2 r1 r1 store r2 r1 := 1 r2 := 0 out := 0 Notes: 1. Store instruction results in an output 2. Memory hierarchy is not represented 3. Why do we need “stall” ?
regFile out out alu src1 P1 P2 src2 inp op dst FETCH EXECUTE WRITE-BACK
regFile out out opr1 alu src1 opr2 src2 res inp p1inp op p2op p1op dst stall p2dst p1dst stall
Goal: Establish Pipeline refines ISA isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
need for “stall” in ISA isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
isaRegFile isaAlu witnessed refinement isaRegFile isaAlu op inp src1 isaOut src2 dst out stall Limitation: State explosion regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
Why not decompose proof? isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
regFile out out alu src1 P1 P2 src2 inp op dst FETCH EXECUTE WRITE-BACK
regFile out out P2 WRITE-BACK
alu P1 P2 EXECUTE
regFile src1 P1 src2 inp op dst FETCH
Why not decompose proof? isaRegFile isaAlu op inp src1 isaOut src2 dst out stall out out src1 src2 inp op dst
Why not decompose proof? isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out src1 src2 inp op dst
Why not decompose proof? isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out src1 res src2 inp p2op op p2dst dst stall stall
Decompositon does not work! isaRegFile isaAlu op inp src1 isaOut src2 dst out stall regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
isaRegFile op isaAlu inp src1 src2 dest isaOut out stall
isaRegFile op isaAlu inp src1 src2 dest isaOut out stall opr1 opr1 opr2 opr2 p2dst res res
“out” proof isaRegFile isaAlu op inp src1 isaOut src2 dst out stall opr1 opr1 opr2 opr2 res p2dst res regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
“out” proof isaRegFile isaAlu op inp src1 src2 dst stall res out out src1 src2 inp op dst
“out” proof isaRegFile isaAlu op inp src1 src2 dst stall res regFile out out src1 src2 inp op dst
“out” proof isaRegFile isaAlu op inp src1 src2 dst stall res regFile out out src1 res src2 inp p2op op p2dst dst stall stall
“out” proof isaRegFile isaAlu op inp src1 src2 dst stall res p2dst regFile out out src1 src2 p2op p1op op p2dst p1dst dst stall stall
“out” proof isaRegFile isaAlu op inp src1 isaOut src2 dst out stall res p2dst regFile out out src1 src2 p2op p1op op p2dst p1dst dst stall stall
regFile out out P2 WRITE-BACK
“res” proof isaRegFile isaAlu op inp src1 isaOut src2 dst out stall opr1 opr1 opr2 opr2 res p2dst res regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
“res” proof isaRegFile isaAlu op inp src1 src2 dst stall opr1 opr1 opr2 opr2 alu res res p1inp inp p2op p1op op p2dst p1dst dst stall stall
“res” proof isaRegFile isaAlu op inp src1 src2 dst stall opr1 opr1 opr2 opr2 res p2dst res alu res res p1inp inp p2op p1op op p2dst p1dst dst stall stall
alu P1 P2 EXECUTE
“opr1” proof isaRegFile isaAlu op inp src1 isaOut src2 dst out stall opr1 opr1 opr2 opr2 res p2dst res regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
“opr1” proof isaRegFile isaAlu op inp src1 src2 dst stall opr2 opr2 res p2dst res regFile opr1 alu src1 src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
“opr1” proof isaRegFile isaAlu op inp src1 src2 dst stall opr1 opr1 opr2 opr2 res p2dst res regFile opr1 alu src1 src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
regFile src1 P1 src2 inp op dst FETCH
EXECUTE WRITE-BACK FETCH
isaRegFile isaAlu op inp src1 isaOut src2 dst out stall opr1 opr1 opr2 opr2 res p2dst res regFile out out opr1 alu src1 opr2 res src2 p1inp inp p2op p1op op p2dst p1dst dst stall stall
But.. is this really practical? Verification of VGI multiprocessor
Outline • 1 Informal Introduction • 2 Formal Definitions • Reactive Systems • Witnessed Refinement Proofs • Slicing Reactive Systems • Decomposing Refinement Proofs • 3 Formal Example: Three-Stage Pipeline • 4 Informal Example: Dataflow Processor Array
VGI • VGI = “Video-Graphics-Image” • Designed by Infopad group at Berkeley • Purpose: web-based image processing • Designed using • VHDL (control) • Schematics (Data path)
VGI Architecture • 16 clusters with 6 processors in each - 4 compute, 1 memory, 1 I/O • ~30K logic gates per processor • ~800 latches per processor • Pipelined compute processors • Low latency data transfer between processors - complex control
pipeline pipeline Complex handshake pipeline pipeline pipeline VGI Architecture
FIFO buffer ISA ISA ISA ISA ISA pipeline pipeline Complex handshake pipeline pipeline pipeline
Verification • Different time scales • Implementation • two-phase clock • level-sensitive latches • activity on both HI and LO phases of clk • Specification • no clk signal
Sample Operator S I I’ = Sample I at Runs of I’ = Runs of I sampled at instances where holds
ISA ISA ISA ISA ISA pipeline pipeline pipeline pipeline pipeline clk