12.07.2015 Views

ACL2-Based Verification of NoC Communication Infrastructures

ACL2-Based Verification of NoC Communication Infrastructures

ACL2-Based Verification of NoC Communication Infrastructures

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACL2</strong>-<strong>Based</strong> <strong>Verification</strong> <strong>of</strong> <strong>NoC</strong><strong>Communication</strong> <strong>Infrastructures</strong>Dominique Borrione, Amr Helmy, Laurence Pierre(TIMA Laboratory, Grenoble, F)Julien Schmaltz (Radboud University, Nijmegen, NL)


TIMA Laboratory1


TIMA Laboratory• Techniques <strong>of</strong> Informatics and Microelectronicsfor integrated systems Architecture (Head:D.Borrione)• Six teams: ARIS (Architectures for Robust and complex IntegratedSystems), M.Nicolaidis and R.Velazco CIS (Concurrent Integrated Systems), L.Fesquet andG.Sicard MNS (Micro and Nano systems), S.Basrour RMS (Reliable Mixed-signal Systems), S.Mir SLS (System Level Synthesis), F.Pétrot VDS (<strong>Verification</strong> and modeling <strong>of</strong> Digital Systems),L.Pierre2


Outline• IntroductionNetworks on ChipFormal verification <strong>of</strong> <strong>NoC</strong>• Ge<strong>NoC</strong> model• Application: HERMES• Conclusion3


Introduction• Formal verification <strong>of</strong> complex SoC’s:<strong>Verification</strong><strong>of</strong> the IPs<strong>Verification</strong> <strong>of</strong> thecommunicationinfrastructure4


Introduction• <strong>Communication</strong> infrastructure: bus, Networkon Chip (<strong>NoC</strong>),…• The Network-on-Chip paradigm is emergingas a promising solution L.Benini and G.De Micheli, « Networks on Chips: A NewSoC Paradigm », Computer, 35 (1), 2002. P.Pande, G.De Micheli, C.Grecu, A.Ivanov, R.Saleh,« Design Synthesis, and Test <strong>of</strong> Networks on Chips »,Design & Test <strong>of</strong> Computers, 22 (5), 2005.5


Introduction• What is a <strong>NoC</strong>?Topology(Ex: 2D-Mesh)Routing algorithm(Ex: XY routing)Switching technique(Ex: wormhole)6


Formal <strong>Verification</strong>• State <strong>of</strong> the art:Model checking and/or theorem provingtechniques used to verify instances <strong>of</strong>networks or protocols• Ge<strong>NoC</strong> is a generic model for reasoningabout <strong>NoC</strong>s general framework7


Ge<strong>NoC</strong> Model• Meta-model: network topology and size, routingand switching techniques• High level <strong>of</strong> abstractionAbstract view <strong>of</strong> the Transport (4), Network (3)and Data Link (2) layers <strong>of</strong> the OSI model• Encoded in the <strong>ACL2</strong> theorem proverFunctional representation, parameterizedpro<strong>of</strong>s8


Approach9


Correctness Statement∀T, ∀ I, ∀ R, ∀ S,P 1 (T) ∧ P 2 (I) ∧ P 3 (R) ∧ P 4 (S) ⇒P (Ge<strong>NoC</strong>(T, I, R, S)P : every message arrived at a node actuallycorresponds to a message issued at anothernode <strong>of</strong> the network, and the message reachesthe intended destination without modification <strong>of</strong>its contents10


Ge<strong>NoC</strong> Function11


Ge<strong>NoC</strong> FunctionMessagesNode setInitially emptyStateTimeGe<strong>NoC</strong>(M,N,a,T,S,z) ≡if SumOfAttempts(a)=0then list(T,M)elseArrived messageslet = R4D(M,z) inlet =Scheduling(Routing(Tr,N),a,S) inGe<strong>NoC</strong>(TM ∪ D,N,a',A ∪ T,S’,z+1)Delayed or en route messages12


Main Constraints• Interfaces: p2prcv o p2psend = Id• Network state: State modification functions return valid states Tr ∩ D = ∅• Routing: Each route from c to d starts in c, uses validnodes, and ends in d• Scheduling: TM ∩ A = ∅13


Implementation in <strong>ACL2</strong>• Ge<strong>NoC</strong> : recursive function• Using constrained functions encapsulation mechanism(defspec GenericRouting(((Routing * *) => *))(local (defun Routing(M N) ; witness...))(defthm Routing-typing-constraint...)(defthm Routing-correctroutesp...)))14


Implementation in <strong>ACL2</strong>• Instances <strong>of</strong> Routing and Scheduling: recursivefunctions (must terminate!) Routing: Each recursive call brings closer to thedestination• Definition <strong>of</strong> a well-founded relation:nodelt(n 1 ,n 2 ) =o i on 1 .x < n 2 .x∨ (n 1 .x=n 2 .x ∧ n 1 .y < n 2 .y) x x+1∨ (n 1 .x=n 2 .x ∧ n 1 .y=n 2 .y ∧ (n 1 .dir=i ∧ n 2 .dir=o))15


Example: HERMES• Univ. Rio Grande do Sul (Porto Alegre, BR)and LIRMM (Montpellier, F)• Regular 2D mesh• Node : IP core Switch16


Example: HERMES• Switch:5 ports: North, South, East,West, Local• Deterministic minimalrouting algorithm: XY routing• Wormhole switching17


Pro<strong>of</strong> <strong>of</strong> HERMES• XY routing algorithm:XYRouting(from,to) ≡if from=to /* destination reached */then thru localelseif Xfrom != Xto /* change X */then if Xfrom < Xtothen thru EastNN0 W EW Eelse thru WestSSelse /* change Y */NNif Yfrom < Yto1 W EW ESSthen thru Southelse thru North20 1 2NW ESNW ESNW ESNW ESNW ESfrom = (Xfrom,Yfrom), to = (Xto,Yto)18


Pro<strong>of</strong> <strong>of</strong> HERMES• Scheduling function:WormHSched(L,TM,A,S) ≡if empty(L)then list(TM,A,S)elseList <strong>of</strong> messagesState <strong>of</strong> the networkArrived messagesEn route messageslet tr=first(L) /* first message */and r=routesOf(tr) /* set <strong>of</strong> routes */and c=check_routes(r,S) /* ∃ valid route */and a=check_arrival(c) / destination reached */inif c!=nilthen let TM’= if a then TM else TM ∪ update(tr)and A’= if a then A ∪ tr else AinWormHSched(rest(L), TM’, A’, updateSt(S))else WormHSched(rest(L), TM ∪ tr, A, S)19


Simulation• <strong>ACL2</strong> provides a theorem prover + anexecution engine (Common Lisp)• Simulation results for the formally provenspecification• Simulation in Common Lisp + visualizationinterface in Java20


Simulation0 1 2012WWWNESNESNES3WWWNESNESNES1WWWNESNESNES2VHDL simulation:message 2 is blockedin node (2,2)21


Simulation0 1 20WNESWNESWNES<strong>ACL2</strong> simulation1WNES3WNES1WNES22WNESWNESWNES22


Other Case Studies• Spidergon (STMicroelectronics): Shortest-path routing (maximumnumber <strong>of</strong> hops = N/4) Packet switching• Nostrum (KTH Stockholm, Sweden): 2D mesh Deflective routing + load averaging Packet switching23


Conclusion• Ge<strong>NoC</strong> is a kind <strong>of</strong> meta-model, that canbe used to verify realistic <strong>NoC</strong>sGeneric pro<strong>of</strong>s on the size <strong>of</strong> the <strong>NoC</strong>sand the length <strong>of</strong> messages• Future work: various extensions towardsRTL24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!