Research on Cache Coherence Protocol Verification Method Based on Model Checking
Abstract
:1. Introduction
1.1. Background
1.2. Research Progress and Related Work
2. Principle
2.1. Multi-Core Processor
2.2. Multi-Core Shared Cache Structure and Cache Coherence Protocol
2.3. Model Checking Verification Principle
3. Method
3.1. Circuit State Machine
3.2. Model Construction
3.2.1. RTL Code Information Analysis
3.2.2. Behavioral Tracking of Key Variables
3.2.3. Normalized Output
3.3. Generation of Attribute Library to Be Verified
- 1
- State reachability: for every state in the formal model, there exists at least one path that enables the model to reach that state. This property is mandated by the verification system and is one of the properties that the verifier expects to pass, so it can be described as a “whitelisted” property based on the content of the property. All states in the model are reachable, corresponding to the formal language format of Equation (18), where k represents the state number, which is the same as the number of states in the model:
- 2
- No deadlock: For the whole formal model system, there cannot exist any inescapable path loop or single state, so that the model cannot reach any state other than this loop path state under any condition, resulting in the circuit being trapped in a dead loop and unable to operate normally. This property is definitely expressed as a dead loop, which is not expected by the verifier, and can therefore be described as a “blacklist” property according to its content: if the formal model may enter any inescapable path loop or single state, then there is a risk that the model will enter a dead loop, and the circuit will not function properly. The function is also at some risk of being paralyzed. Because of the importance of the absence of dead cycles to the model, there is a property description Formula (21) in the CTL formal language system specifically for dead cycles:
- 3
- Functional completeness: For all validation targets of the formal model, their passes are consistent with the design goals of the circuit system, and can satisfy all relevant functions expected from the circuit. All verification attributes describing the expected functionality are expected to be passed by the verifier, and therefore, the functional verification attributes can be included in the “whitelist” attribute library. Such functional goal-oriented verification attributes are more targeted and efficient in the verification process, and unnecessary paths can be discarded. However, the state and condition descriptions in such verification attributes are usually relative to the whole model, and can be refined and generalized in the actual analysis process. As shown in the figure, suppose there are n states in the formal model, which are denoted as , …, then the formal linguistic representation of the entire state machine set S of the formal model is as in Equation (22):
- ①
- Initial state induction: There may exist certain sets of states in the formal model, and there exists a certain condition that enables the model to enter a certain state from a set of states. For example, there exists a set of states denoted as S1, which contains the sub-states s1 and s2, respectively, and so the formal linguistic expression for the set of states S1 is as in Equation (24):
- ②
- Transfer condition induction: There exist certain sets of state transfer conditions in a formal model, any one of which can enable the model to move from one state to another. For example, there exists a set of state transfer conditions denoted as , which contains the sub-state transfer conditions and , respectively, whereupon the formal linguistic expression for the set of state transfer conditions is expressed as Equation (26):
3.4. The Whole Process Automation
4. Experimental Results and Analysis
4.1. Model Construction Results Based on Cache Consistency
4.2. Verification Result of MESI Function Based on White List
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Harika, J.; Baleeshwar, P.; Navya, K.; Shanmugasundaram, H. A review on artificial intelligence with deep human reasoning. In Proceedings of the 2022 International Conference on Applied Artificial Intelligence and Computing (ICAAIC), Salem, India, 9–11 May 2022; pp. 81–84. [Google Scholar]
- Bhari, S.; Quraishi, S.J. Blockchain and cloud computing-a review. In Proceedings of the 2022 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COM-IT-CON), Faridabad, India, 26–27 May 2022; Volume 1, pp. 766–770. [Google Scholar]
- Rahman, M.M. Process synchronization in multiprocessor and multi-core processor. In Proceedings of the 2012 International Conference on Informatics, Electronics & Vision (ICIEV), Dhaka, Bangladesh, 18–19 May 2012; pp. 554–559. [Google Scholar]
- Kostadinov, A.N.; Kouzaev, G.A. A novel processor for artificial intelligence acceleration. WSEAS Trans. Circuits Syst. 2022. Available online: https://api.semanticscholar.org/CorpusID:250237892 (accessed on 15 October 2022).
- Chen, W.-H.; Dou, C.; Li, K.-X.; Lin, W.-Y.; Li, P.-Y.; Huang, J.-H.; Wang, J.-H.; Wei, W.-C.; Xue, C.-X.; Chiu, Y.-C.; et al. Cmos-integrated memristive non-volatile computing-in-memory for ai edge processors. Nat. Electron. 2019, 2, 420–428. Available online: https://api.semanticscholar.org/CorpusID:202771829 (accessed on 14 October 2022). [CrossRef]
- Hammond, L.; Hubbert, B.; Siu, M.; Prabhu, M.; Chen, M.; Olukolun, K. The stanford hydra cmp. IEEE Micro 2000, 20, 71–84. [Google Scholar] [CrossRef] [Green Version]
- Beamonte, R.; Ezzati-Jivan, N.; Dagenais, M.R. Execution trace-based model verification to analyze multicore and real-time systems. Concurr. Comput. Pract. Exp. 2022, 34, e6974. Available online: https://api.semanticscholar.org/CorpusID:248591680 (accessed on 4 January 2023). [CrossRef]
- Grevtsev, N.A.; Chibisov, P.A. Multicore processor models verification in the early stages. Probl. Adv. Micro-Nanoelectron. Syst. Dev. 2019. Available online: https://api.semanticscholar.org/CorpusID:201881161 (accessed on 7 October 2022).
- Kayamuro, K.; Sasaki, T.; Fukazawa, Y.; Kondo, T. A rapid verification framework for developing multi-core processor. In Proceedings of the 2016 Fourth International Symposium on Computing and Networking (CANDAR), Hiroshima, Japan, 22–25 November 2016; pp. 388–394. [Google Scholar]
- Agarwal, A.; Simoni, R.; Hennessy, J.; Horowitz, M. An evaluation of directory schemes for cache coherence. ACM Sigarch Comput. Archit. News 1988, 16, 280–298. [Google Scholar] [CrossRef]
- Shield, J.; Diguet, J.-P.; Gogniat, G. Asymmetric cache coherency: Policy modifications to improve multicore performance. ACM Trans. Reconfigurable Technol. Syst. 2012, 5, 3. [Google Scholar] [CrossRef]
- Joshi, A.D.; Ramasubramanian, N. cComparison of significant issues in multicore cache coherence. In Proceedings of the 2015 International Conference on Green Computing and Internet of Things (ICGCIOT), Greater Noida, India, 8–10 October 2015; pp. 108–112. [Google Scholar]
- Nair, A.S.; Pai, A.V.; Raveendran, B.K.; Patil, G. Moesil: A cache coherency protocol for locked mixed criticality l1 data cache. In Proceedings of the 2021 IEEE/ACM 25th International Symposium on Distributed Simulation and Real Time Applications (DS-RT 2021), Valencia, Spain, 27–29 September 2021; Cecilia, J., Martinez, F., Eds.; IEEE ACM International Symposium on Distributed Simulation and Real-Time Applications. IEEE: Piscataway Township, NJ, USA, 2021. [Google Scholar]
- Derebasoglu, E.; Kadayif, I.; Ozturk, O. Coherency traffic reduction in manycore systems. In Proceedings of the 2022 25th Euromicro Conference on Digital System Design (DSD), Maspalomas, Spain, 31 August–2 September 2022; Fabelo, H., Ortega, S., Skavhaug, A., Eds.; EUROMICRO Conference Proceedings. IEEE: Piscataway Township, NJ, USA, 2022; pp. 262–267. [Google Scholar]
- Alkhamisi, K. Cache coherence issues and solution: A review. Int. J. Inf. Syst. Comput. Technol. 2022, 1, 2. [Google Scholar] [CrossRef]
- Carter, W.; Joyner, W.; Brand, D. Symbolic simulation for correct machine design. In Proceedings of the 16th Design Automation Conference, San Diego, CA, USA, 25–27 June 1979; pp. 280–286. [Google Scholar]
- Singh, A. Equivalence checking of non-binary combinational netlists. In Proceedings of the 2022 35th International Conference on VLSI Design and 2022 21st International Conference on Embedded Systems (VLSID), Bangalore, India, 26 February–2 March 2022; pp. 22–27. [Google Scholar]
- Borek, M.; Stenzel, K.; Katkalov, K.; Reif, W. Abstracting security-critical applications for model checking in a model-driven approach. In Proceedings of the 2015 6th IEEE International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 23–25 September 2015; pp. 11–14. [Google Scholar]
- Liu, Y.; He, C. A heuristics-based incremental probabilistic model checking at runtime. In Proceedings of the 2020 IEEE 11th International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 16–18 October 2020; pp. 355–358. [Google Scholar]
- Adesina, O.; Lethbridge, T.C.; Somé, S. Optimizing hierarchical, concurrent state machines in umple for model checking. In Proceedings of the 2019 ACM/IEEE 22nd International Conference on Model Driven Engineering Languages and Systems Companion (MODELS-C), Munich, Germany, 15–20 September 2019; pp. 524–532. [Google Scholar]
- Zhu, W. Model checking for alphacode-generated programs. In Proceedings of the 2022 7th International Conference on Intelligent Computing and Signal Processing (ICSP), Xi’an, China, 15–17 April 2022; pp. 794–798. [Google Scholar]
- Xin, L.; Wandong, C. A program vulnerabilities detection frame by static code analysis and model checking. In Proceedings of the 2011 IEEE 3rd International Conference on Communication Software and Networks, Xi’an, China, 27–29 May 2011; pp. 130–134. [Google Scholar]
- Zhu, W.; Feng, P.; Deng, M. An approximate ctl model checking approach. In Proceedings of the 2019 IEEE 10th International Conference on Software Engineering and Service Science (ICSESS), Beijing, China, 18–20 October 2019; pp. 646–648. [Google Scholar]
- Gholami, S.; Sarjoughian, H.S. Unified property evaluations of constrained-devs models for simulation and model checking. In Proceedings of the 2021 Annual Modeling and Simulation Conference (ANNSIM), Fairfax, VA, USA, 19–22 July 2021; pp. 1–12. [Google Scholar]
- Dai, W.; Chen, L.; Wu, A.; Ali, M.L. Dasc: A privacy-protected data access system with cache mechanism for smartphones. In Proceedings of the 2020 29th Wireless and Optical Communications Conference (WOCC), Newark, NJ, USA, 1–2 May 2020; pp. 1–6. [Google Scholar]
- Ivanov, L.; Nunna, R. Modeling and verification of cache coherence protocols. In Proceedings of the ISCAS 2001. The 2001 IEEE International Symposium on Circuits and Systems (Cat. No.01CH37196), Sydney, NSW, Australia, 6–9 May 2001; Volume 5, pp. 129–132. [Google Scholar]
- Jadon, S.; Yadav, R.S. Multicore processor: Internal structure, architecture, issues, challenges, scheduling strategies and performance. In Proceedings of the 2016 11th International Conference on Industrial and Information Systems (ICIIS), Roorkee, India, 3–4 December 2016; pp. 381–386. [Google Scholar]
- Kazempour, V.; Fedorova, A.; Alagheband, P. Performance implications of cache affinity on multicore processors. In Euro-Par 2008 Parallel Processing, Proceedings of the 14th International Euro-Par Conference, Las Palmas de Gran Canaria, Spain, 26–29 August 2008; Luque, E., Margalef, T., Benitez, D., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5168, pp. 151–161. [Google Scholar]
- Al-Waisi, Z.; Agyeman, M.O. An overview of on-chip cache coherence protocols. In Proceedings of the 2017 Intelligent Systems Conference (IntelliSys), London, UK, 7–8 September 2017; pp. 304–309. [Google Scholar]
- Sandell, M.; Raza, U.; Uchida, D. Solicit: Synchronous listen, code, and transmit protocol for wireless control applications. IEEE Syst. J. 2023, 1–12. [Google Scholar] [CrossRef]
- Ahmed, R.E.; Dhodhi, M.K. Directory-based cache coherence protocol for power-aware chip-multiprocessors. In Proceedings of the 2011 24th Canadian Conference on Electrical and Computer Engineering (CCECE), Niagara Falls, ON, Canada, 8–11 May 2011; pp. 001 036–001 039. [Google Scholar]
- Sanchez, E.; SonzaReorda, M. On the functional test of mesi controllers. In Proceedings of the 2011 12th Latin American Test Workshop (LATW), Beach of Porto de Galinhas, Brazil, 27–30 March 2011; pp. 1–6. [Google Scholar]
- Galan, P. Finite-state machine for embedded systems. Control Eng. 2021, 68, 27–30. [Google Scholar]
- Shaomin, Z. Ring_Network-Based-Multicore-. 2016. Available online: https://github.com/zhaishaomin/ring_network-based-multicore- (accessed on 7 February 2022).
- Larsen, K.; Pettersson, P.; Yi, W. Compositional and symbolic model-checking of real-time systems. In Proceedings of the Proceedings 16th IEEE Real-Time Systems Symposium, Pisa, Italy, 5–7 December 1995; pp. 76–87. [Google Scholar]
Condition1 | Condition2 | |
---|---|---|
State1 | State2 | - |
State2 | - | - |
Initial State | End State | Transfer Condition |
---|---|---|
I or E | E | Local processor core read operation |
/ 1 | S | Check the same data reading operation with other processors locally. |
S | I | Other processor core writes operations |
/ | M | Local processor core writes operation |
M | E | Local processor core writeback operation |
/ | I | Empty operation |
Initial State | End State | Verification Result | Time (s) |
---|---|---|---|
I or E | E | PASS | 0.003 |
/ | S | PASS | 0.001 |
S | I | PASS | 0.002 |
/ | M | PASS | 0.002 |
M | E | PASS | 0.002 |
/ | I | PASS | 0.001 |
No deadlock | A[] not deadlock | Pass | 0.003 |
State reachability | A[] ((not P1.M) and (not P1.E) and (not P1.S) and (not P1. I)) | NOT PASS | 0.001 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhao, Y.; Shi, B.; Zhang, Q.; Yuan, Y.; He, J. Research on Cache Coherence Protocol Verification Method Based on Model Checking. Electronics 2023, 12, 3420. https://doi.org/10.3390/electronics12163420
Zhao Y, Shi B, Zhang Q, Yuan Y, He J. Research on Cache Coherence Protocol Verification Method Based on Model Checking. Electronics. 2023; 12(16):3420. https://doi.org/10.3390/electronics12163420
Chicago/Turabian StyleZhao, Yiqiang, Boning Shi, Qizhi Zhang, Yidong Yuan, and Jiaji He. 2023. "Research on Cache Coherence Protocol Verification Method Based on Model Checking" Electronics 12, no. 16: 3420. https://doi.org/10.3390/electronics12163420
APA StyleZhao, Y., Shi, B., Zhang, Q., Yuan, Y., & He, J. (2023). Research on Cache Coherence Protocol Verification Method Based on Model Checking. Electronics, 12(16), 3420. https://doi.org/10.3390/electronics12163420