Creating a Formal Verification Platform for IBM CoreConnect-based SoC

  • 格式:pdf
  • 大小:214.34 KB
  • 文档页数:12

Creating a Formal Verification Platform for IBMCoreConnect-based SoC∗Wen-Shiu Liao and Pao-Ann Hsiung†Department of Computer Science and Information EngineeringNational Chung Cheng University,Chiayi,Taiwan-621.†hpa@AbstractHow to ensure functionality correctness in an SoC chip is a troublesome issue.This is because SoC is so complex that it is difficult tofind errors in corner cases.Thus,bugs mayexist even after thorough simulation and emulation.In contrast,formal verification provides100%coverage with counterexamples and is expected to be a complementary solution.Hence,many researchers and designers are trying to apply formal verification to SoC design in ordertofind errors as early as possible.The current status-quo is that there are only isolated tools,but no integrated environment for the formal verification of VLSI designs.Here,a Formal Ver-ification Platform(FVP)is proposed,which allows designers to configure a formal verificationenvironment representing the SoC in which a user-designed Intellectual Property(IP)is to beintegrated.We illustrate how to create a formal verification platform for an IBM CoreConnect-based SoC in this work.1IntroductionSystem-on-a-Chip(SoC)design is getting more and more popular in the recent years.However,how to ensure an SoC product satisfies its specification is becoming a serious problem.Due to the design complexity in SoC,traditional verification methods must generate huge numbers of test patterns to test the functionality of an SoC design.With traditional verification,some bugs may still exist even if an SoC passes the tests.To get rid of the verification crisis in an SoC design,many researchers ∗This work was supported by project grants NSC91-2215-E-194-008,NSC92-2218-E-194-009,and NSC91-2213-E-194-008,NSC92-2213-E-194-003from the National Science Council,Taiwan.are trying to apply formal verification to SoC design.The advantages of formal verification are (1)it provides more confidences by exhaustively traversing whole system state spaces,and(2) when a system fails to satisfy a property,formal verification will produce a counterexample to indicate where the bug is.Several efforts on formally verifying hardware or SoC indicate that verifying a large system by using formal methods is feasible[1],[2],[3],[4],[5],even though formal verification has its own share of problems such as the famous state-space explosion issue.Often,in a platform-based SoC design,a system designer integrates some pre-designed and verified Intellectual Properties(IP)with one or more user-designed IP.In order to efficiently reuse IPs in an SoC,an on-chip bus(OCB)architecture such as AMBA[6]or CoreConnect[7]is essential. Often,a typical OCB architecture is composed by two buses:a processor local bus(PLB)and an on-chip peripheral bus(OPB).Each bus has some IPs attached and a bus arbiter to control the bus.The bus bridge enables data communication between the buses.For formally verifying a user-designed IP,a designer needs to also model the SoC environment in which the IP will be embedded.Thus,it is desirable that we have a platform in which formal verification can be done.To complement a system designer’s efforts in formally verifying an IP,a Formal Verification Platform(FVP)[8]is proposed,which provides cycle-accurate modeling and verification.The article is organized as follows.Section2introduces a formal verification platform for SoC. Section3describes the system model and the property definition that are used in our formal ver-ification platform.Then,we demonstrate how we model hardware systems with clock models. Section4discusses the issues encountered in the creation of a formal verification platform for IBM CoreConnect-based SoC and the corresponding solutions.Section5concludes with future work.2Formal Verification PlatformDue to the inefficiency of traditional hardware verification methods and the increase in design com-plexity,formal verification is getting more and more attention in recent years.As summarized below,there are some issues unresearched in the current state-of-art on formally verifying an SoC.(1)Some model checkers like SMV has only one implicit clock,a designer has to make some tricks when modeling an SoC with two or more bus frequencies or with gated clocks[3].(2)Currently, there is no utility for platform-based formal verification of SoC.(3)The state space explosion issue is still a major bottleneck in formal verification.To handle above issues,we choose State Graph Manipulators(SGM)[9]as the verification……...Figure1:FVP Architecturekernel for our FVP.SGM is a high-level compositional model checker with multiple state-space reduction techniques for the verification of real time systems.In SGM,a system is described by a set of communication Extended Timed Automata(ETA)[10]and a property is specified by Computation Tree Logic(CTL)[11].We can model hardware behavior with multiple clocks or a gated clock in the timed automata model.In SGM,the global system state-space is computed iteratively by composing one timed automaton at a time.Thus,it is natural to treat an IP as a timed automaton in SGM.Figure1illustrates the architecture of FVP consisting of three components:SoC environment configurator,SoC system integrator,and SGM kernel.The given order is the sequence in which they are used.A user sets up an SoC environment using the SoC environment configurator.After the userfinishes modeling a user-designed IP,the SoC system integrator integrates the user-designed IP model with all the formal IP models that were specified through the SoC environment configurator. As soon as the whole SoC model is integrated,the user can formally verify the SoC using the SGM kernel against user-specified properties.The detailed functionalities of the SoC environment configurator,SoC system integrator,and the SGM kernel are described as follows.•SoC environment configurator:Through the SoC environment configurator,an IP designer can setup all the IPs that constitute an SoC environment for the designer’s own IP model.This configured environment information is stored for later use during the SoC integration phase.For example,a user may select two buses:PLB and OPB,two PLB masters,one bridge,two PLB slaves,and3OPB slaves as an SoC environment for an image-processing IPto be attached on the IBM CoreConnect bus architecture.•SoC system integrator:According to the information saved by SoC environment configurator, the SoC system integrator composes an SoC consisting of the user-designed IP model and all the user-specified formal IP models.Because the ETA model is a closed one,an external environment model is required,for which a formal bench(a-kind-of testbench)is generated by the SoC system integrator.•SGM kernel:The formal model of each IP in SoC is expressed as an ETA.The SGM kernel reads these automata sequentially and merges them one by one to generate the global system behavior of the SoC.The user can use CTL to specify the properties that they are interested in.SGM then uses symbolic model checking technology to verify if the set of ETA satisfiesa given CTL property.If the ETA does not satisfy a CTL property,a counterexample isproduced by SGM.The user can then analyze the counterexample to locate design problems.The verificationflow of FVP is shown in Figure 2.There are three stages in the verification flow of FVP:configuration stage,modeling and integration stage,and verification stage.In the configuration stage,an FVP user begins by specifying his/her SoC environment.After an SoC environment is specified,the SoC environment configurator will check if there is any conflict among the IPs in the assigned SoC.Before integrating the SoC in the beginning of modeling and integration stage,lint checking is provided to avoid any syntax error in the user-designed IP model and to avoid any inappropriate interactions of the user IP model with the formal models.If lint checking fails because of syntax errors,the user must then modify his/her model.The user may also re-configure the SoC environment to correct any inappropriate use of the formal models.After lint checking is done,the SoC system integrator generates thefinal SoC models and a formal bench according to the configuration data,existing formal models,and the user-designed IP model.In the verification stage,the user can start verifying the whole SoC model using the SGM kernel.Either a wrong property specified in SGM,or a wrong configuration,or some bugs in the user-designed IP model may cause the formal verification to fail in SGM.If verification fails,the user must analyze counterexamples manually to decide how to re-formulate properties,to re-configure the SoC environment,or to modify the user-designed IP model.Figure2:Verification Flow in FVP3System Model,Property Definition,and Clock ModelsIn FVP,a system is described by a set of communication Extended Timed Automata(ETA)[10]and a property is specified by Computation Tree Logic(CTL)[11].The global system state-space is computed iteratively by composing one timed automaton at a time.3.1System ModelOur system model is a set of ETA,which have shared variables and synchronization labels and are formally defined as follows.Definition1Mode PredicateGiven a set C of clock variables and a set D of discrete variables,the syntax of a mode predicateηover C and D is defined as:η:=false|x∼c|x−y∼c|d∼c|η1∧η2|¬η1,where x,y∈C,∼∈{≤,<,=,≥,>},c∈N,the set of integers,d∈D,andη1,η2are mode predicates.2Let B(C,D)be the set of all mode predicates over C and D.Definition2Extended Timed AutomatonAn Extended Timed Automaton(ETA)is a tuple A i=(M i,m0i,C i,D i,L i,χi,E i,λi,τi,ρi)such that: M i is afinite set of modes,m0i∈M is the initial mode,C i is a set of clock variables,D i is a set of discrete variables,L i is a set of synchronization labels,χi:M i→B(C i,D i)is an invariance function that labels each mode with a condition true in that mode,E i⊆M i×M i is a set of transitions,λi:E i→L i associates a synchronization label with a transition,τi:E i→B(C i,D i)defines the transition triggering conditions,andρi:E i→2C i∪(D i×N)is an assignment function that maps each transition to a set of assignments such as resetting some clock variables and setting some discrete variables to specific integer values.2 Using the above ETA definition,our system model can be defined as follows.Definition3Hardware SystemA Hardware System is defined as a set of hardware and clock components.Each component is modeled by one or more timed automata.A system is modeled by a network of communicating timed automata.If a system S has a set of hardware components{H1,H2,...,H n}and a set of clock components{C1,C2,...,C m},then S=H1 H2 ... H n C1 C2 ... C m,where is a parallel composition operator resulting in the concurrent behavior of its two operands.If H i is modeled byan ETA A Hi ,1≤i≤n,and C j is modeled by an ETA A Cj,1≤j≤m,then the ETA defined byA S=A H1×...×A H n×A C1×...×A C m is an ETA model for system S,where×is the state-graph merge operation in SGM and concurrency semantics is defined as follows:•two concurrent transitions with the same synchronization label are represented by a single synchronized transition in the product automaton,and•two concurrent transitions without any synchronization label are represented by interleaving them,resulting in possibly two different paths(computations).23.2Property DefinitionProperties are the precise descriptions of the features or behaviors that we want to verify against a user designed system.In FVP,properties are specified in Computation Tree Logic(CTL),which is defined as follows.X = 5CLK_A := 0X:=0X = 5X:=0Y= 10CLK_B := 0Y :=0Y = 10Y := 0TimedAutomaton A Timed Automaton BFigure 3:Multi-rate Bus Clock ETA ModelsX = 5CLK_G := 0X:=0X = 5 && G = 1CLK_G := 1X:=0CLK_G :=0G := 1X := 0X = 5 && G = 0CLK_G := 0X:=0Figure 4:Gated Clock ETA ModelDe finition 4:Computation Tree Logic FormulaA computation tree logic formula has the following syntax:φ::=η|∃ φ |∃2φ |∃φ U φ |¬φ |φ ∨φ .(1)Here,ηis a mode predicate in B (∪n i =1C i ,∪n i =1D i ).∃ φ means there exists a computation such thatφ is true in the next mode.∃2φ means there exists a computation,from the current state,along which φ is always true.∃φ U φ means there exists a computation,from the current state,along which φ is true until φ becomes true,within the time constraint of ∼c .Traditional shorthands like ∃ ,∀ ,∃3,∀2,∀3,∀U ,∧,and →can all be de fined as in [11].23.3Clock ModelsThe details of modeling hardware systems with complex clock synchronization is given in [12].Here,we show how we handle system models with multiple bus clocks and a gated clock.Figure 3illustrates an example of modeling two bus clocks.We use clock variables X and Y to represent the progress of time in the two bus clocks,and register variables CLK A and CLK B to represent the signal outputs of the two bus clocks.In the timed automata A and B ,A0(B0)and A1(B1)represent the states of the bus clocks driven low and high,respectively.The transitions from A0(B0)to A1(B1)represent the change of bus clock level from low to high,which is the positive edge of the bus clock signal.Similarly,the transitions from A1(B1)to A0(B0)represent the negative edge of the bus clock.The different rates of multiple bus clocks in hardware system can be modeled by setting different values to the clock variables X and Y on the transitions.For example,the rate of clock CLK B is twice that of clock CLK A in Figure 3.The initialization of bus clocks can be modeled by setting the initial state of the automata.If transitions in some hardware component models need to be triggered at the positive edge of CLK A ,then the user can synchronize these transitions withthe clock transition from A0to A1in order to guarantee that these transitions will be triggered at the same time.Figure4is a gated clock model.Gated clock is a common technique for low power design in hardware.Register variable G is a control signal that enables/disables the clock.When G is one, the clock operates normally.When G becomes zero,the timed automata will eventually stay in Low-power mode until G becomes one,which represents the gated condition of a clock.4Formal Verification Platform for IBM CoreConnectCoreConnect[7]is an on-chip bus architecture proposed by IBM.It defines a standard for on-chip communications in an SoC design.There are three buses that are defined in the CoreConnect speci-fication:Processor Local Bus(PLB),On-Chip Peripheral Bus(OPB),and Device Control Register Bus(DCR).The PLB is designed for high-performance,high clock frequency system modules.The OPB is designed for high-performance system modules.The DCR is designed for data transfer between CPU’s registers and control/statue registers in the devices.In our current work only PLB and OPB are modeled in our platform.4.1Modeling CoreConnect PlatformTo ensure that the CoreConnect-based formal verification platform is correct,we model it gradually. Thus,thefirst of our CoreConnect platform supports only single bus transactions in PLB and in OPB.Currently,we modeled six CoreConnect components in thefirst version of the platform, including a generic PLB master,a generic PLB slave,a simple PLB arbiter,a PLB bridge,a simple OPB arbiter,and a generic OPB slave.Two bus clock models,PCLK and OCLK,are used to provide synchronizations in the PLB and in the OPB,respectively.Some abstractions are used to reduce the number of states in the CoreConnect component models,without compensating verification correctness or capability.These abstractions are listed as follows.1.Address abstraction:We use a register variable instead of a set of bits in address bus so thataddress decoding is abstracted.When a PLB master decides to access a PLB slave or an OPB slave,it will assign address to let slaves(including PLB bridge)know which slave is chosen by the PLB master.2.Data abstraction:Our focus in verification is on a the intercommunications among IPs onPLB_M1Err = 1M1_rqeuest := 0Figure5:Read Transfer in PLB Master ETA ModelCoreConnect rather than data accuracy.Thus,we do not model data bus in thefirst version of our CoreConnect platform.Figure5is a formal model for a read transfer in a generic PLB master.The timing diagram for a single read transfer is shown in Figure6.The PLB address cycle consists of three phases:request, transfer,and termination.A PLB master will assert Mn request,Mn priority,and Mn busLock signals to get the ownership of the bus in the request phase.A PLB slave will receive address and transfer qualifier in the transfer phase once the PLB arbiter grants the bus to the PLB master by asserting PLB PAValid signal.The maximum length of the transfer phase is controlled by the slave’s SI wait signal and by the PLB arbiter address cycle time-out mechanism.The conditions of the termination phase are either a bus slave asserts SI addrAck,or SI rearbitrate,or a bus master asserts Mn abort,or a bus arbiter deletes a transaction time-out.A normal read transfer will end with receiving the PLB MnrDAck signal.If there is time-out in the read transfer,the PLB master will also receive PLB MnErr in the terminate phase.If the PLB master decides to abort transfer,it can assert Mn abort asynchronously.Thus,we do not synchronize the transition from M1to M21with PCLK,in our model.Figure6:Timing Diagram of Read Transfer in PLB4.2Verifying ourfirst CoreConnect PlatformWe have created a CoreConnect-based SoC environment manually such that the behaviors repre-sented by our models are consistent with the CoreConnect specification[7].The SoC environment is composed by two generic PLB masters,two generic PLB slaves,a PLB bus arbiter,a PLB bridge, an OPB arbiter,and two OPB slaves.For convenience,we assign each PLB slave and each OPB slave a unique address.PLB slaves are assigned to address1or2.OPB slaves are assigned to address3or4.The verificationflow for the platform is shown in Figure7.We begin the verification process by verifying interactions in PLB formal models and in OPB formal models individually.Then, we verify the integration of the whole SoC environment.Some CTL properties checked in our verification process are listed below.•∀2((M1ABus=1∩M1request=1)→∃3(PLB M1rDAck=1)):This property checksthat the PLB slave1willfinish a bus transfer whenever an PLB master wants to access it.TheFigure7:Verification Flow of thefirst CoreConnect Platformformula means as long as PLB slave1is selected,the PLB M1rDAck signal will be asserted eventually if there is no time-out.•∀2((M1request1=1∩M2request=1)→∀ ((PLB PAValid=1)∩(PLB masterID=1))):This property is to verify the priorities in the PLB arbiter.The formula means if PLBmaster1and PLB master2both request a bus transfer at the same time,then the PLB arbiter will grant access to PLB master1in the next clock cycle.•∀2(O M2request=0→∀2O M1Grant=1):This property is to verify the park mecha-nism in the OPB.The bus is parking in OPB master1.Thus,if OPB master2does not makea request,the OPB arbiter will always grant the bus to OPB master1.5ConclusionThrough our experiences in modeling and verifying a formal verification platform for SoC design, we have shown how abstractions can be employed,how properties can be used to validate a platform, and how multi-rate clocks can be modeled and used for verification in an SoC formal verification platform.Our future work will include the design of a second version for our platform that considers burst transaction and other enhancements.Another future work will be the extension to other on-chip bus architectures.References[1]B.Chen,M.Yamazaki,and M.Fujita.Bug identification of a real chip design by symbolic model check-ing.In Proceedings of European Conference on Design Automation,pages132–136,February/March 1994.[2]T.A.Henzinger,X.Liu,S.Qadeer,and S.K.Rajamani.Formal specification and verification of adataflow processor array.In Proceedings of the IEEE/ACM International Conference on Computer-Aided Design(ICCAD’99),pages494–499,November1999.[3]H.Choi,B.Yun,Y.Lee,and H.Roh.Model checking of S3C2400X industrial embedded SoC product.In Proceedings of the38th Design Automation Conference,pages611–616,June2001.[4]P.Chauhan,E.M.Clarke,Y.Lu,and D.Wang.Verifying IP-core based system-on-chip designs.InProceedings of the12th IEEE International ASIC/SOC Conference,pages27–31,September1999. [5]B.Wang and Z.H.Lin.Formal verification of embedded SoC.In Proceedings of the4th InternationalASIC Conference,pages769–772,October2001.[6]ARM Company.AMBA Specification2.0.1999./arm/Tech Specs?OpenDocument.[7]IBM Company.CoreConnect Bus Architecture.2002./chips/techlib/techlib.nsf/productfamilies/CoreConnect Bus Architecture. [8]W.-S.Liao and P.-A.Hsiung.FVP:A formal verification platform for SoC.In Proceedings of the16thIEEE International SoC Conference,pages21–24,(Oregon,USA),September2003.IEEE CS Press. [9]F.Wang and P.-A.Hsiung.Efficient and user-friendly verification.IEEE Transactions on Computers,51(1):61–83,January2002.[10]R.Alur and D.L.Dill.A theory of timed automata.Theoretical Computer Science,126:183–235,April1994.[11]E.M.Clarke,O.Grumberg,and D.A.Peled.Model Checking.MIT Press,1999.[12]W.-S.Liao and P.-A.Hsiung.Modeling hardware systems with complex clock synchronizations inthe SGM formal verifier.In Proceedings of the14th VLSI Design/CAD Symposium,pages177–180, (Hwalien,Taiwan,ROC),August2003.。