An Approach to the State Explosion Problem: SOPC Case Study
Abstract
:1. Introduction
- (1)
- A modeling method using SOPC architecture is proposed to solve the problem of multi-form IPs not being recognized by formal tools.
- (2)
- A variable reduction method for the SOPC system is proposed, which can greatly reduce the number of states.
- (3)
- A branch relation reduction method based on the verification property is proposed for the SOPC system. Through the reduction in branch relations, the state quantity and state transition relations of the model state space can be reduced.
- (4)
- The experiment of property verification is carried out for the reduced SOPC model. The experiment result shows that the reduced model can greatly shorten the verification time.
2. Related Work
3. Analysis of SOPC Software
4. Preliminaries
4.1. Temproal Logic
4.2. Basic Definition
4.3. State Space Explosion Problem
5. Modeling and Verification of the SOPC System
5.1. Modeling of SOPC System
5.2. Property Verification
6. Our Approach to State Space Reduction
6.1. State and State Transition Analysis
6.2. Variable Reduction Based on RTL Code
6.3. Transform Relations Reduction Based on Property
- Root node variable selection
- 2
- Control branch search
- 3
- Assignment branch search
6.4. SOPC Reduced State Space Algorithm
Algorithm 1: The formal verification framework for the SOPC software |
INPUT: Design of an SOPC, A OUTPUT: SOPC reduced model, D_fomal /Step 1: SOPC design model construction*/ M = Identify_need_model(A) FOR m ∈ M do If m ∈ CPU then m_formal = m = (s0, s, I, O, f, g); end else if m ∈ netlist then m_formal = m = (C, I, O, fc, g); end else if m ∈ black_box then m_formal = m = (I, O, g); end m_formal = m_formal ∪ M_no_need_model; /Step 2: reduced variable */ Rver = abstract_variables(property) reduced_ctrl_variable = Pc(reg_ctr, reg_state) = ϕ reduced_assign_variable = Pa(reg_assign, reg_state) = ϕ reduce_variable = reduced_ctrl_variable ∪ reduced_assgin_variable /Step 3: reduce transfer relation */ FOR {i = 1, i < n, i++} begin Net_ver_i_ctrl = DFS(ver_i) Net_ver_i_assgin = DFS(Ver_i) + BFS(Ver_i) Net_ver_i = Net_ver_i_ctrl ∪ Net_ver_i_assgin End D_fomal = convert_formal(Net_ver_1 ∪ Net_ver_2 ∪ … ∪ Net_ver_i) |
7. Experiment
7.1. Construction of SOPC System-Level Original Model
7.2. Formal Property Select
7.3. Model Checking Result Analysis
8. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Correction Statement
References
- Zynq 7000 SoC. Available online: https://www.xilinx.com/products/silicon-devices/soc/zynq-7000.html (accessed on 3 November 2023).
- Kintex 7 FPGA Family. Available online: https://www.xilinx.com/products/silicon-devices/fpga/kintex-7.html (accessed on 3 November 2023).
- M2S090TS-1FGG484M|Microsemi. Available online: https://www.microsemi.com/existing-parts/parts/143678#overview (accessed on 3 November 2023).
- Xiong, W.; Shi, W.; Dong, J.; Bai, Z.; Tian, D. Design of embedded automatic test system for radar transmitter. In Proceedings of the IEEE 2011 10th International Conference on Electronic Measurement & Instruments, Chengdu, China, 16–19 August 2011. [Google Scholar]
- Chen, S.; Zhou, Y.; Zhu, D.; Guo, S. Design of high-speed Boundary-scan master controller base on SOPC. In Proceedings of the 2011 Second International Conference on Mechanic Automation and Control Engineering, Inner Mongolia, China, 15–17 July 2011. [Google Scholar]
- Huang, Q.; Chang, S.; Peng, J.; Mao, X.; Zhou, Y.; Wang, H. Design of high-speed Boundary-scan master controller base on SOPC. IEEE Trans. Instrum. Meas. 2012, 61, 2469–2475. [Google Scholar] [CrossRef]
- Clarke, E.M.; Emerson, E.A.; Sistla, A.P. Automatic verification of finite-state concurrent systems using temporal logic specifications. ACM Trans. Program. Lang. Syst. (TOPLAS) 1986, 8, 244–263. [Google Scholar] [CrossRef]
- Emerson, E.A.; Halpern, J.Y. Decision procedures and expressiveness in the temporal logic of branching time. In Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing, San Francisco, CA, USA, 5–7 May 1982. [Google Scholar]
- Huth, M.; Ryan, M. Logic in Computer Science: Modelling and Reasoning About Systems; Cambridge University: Cambridge, UK, 2004. [Google Scholar]
- Phyo, Y.; Do, C.M.; Ogata, K. A support tool for the L+ 1-layer divide & conquer approach to leads-to model checking. In Proceedings of the 2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC), Madrid, Spain, 12–16 July 2021. [Google Scholar]
- Weyns, D.; Iftikhar, U.M. ActivFORMS: A formally founded model-based approach to engineer self-adaptive systems. ACM Trans. Softw. Eng. Methodol. 2023, 32, 1–48. [Google Scholar] [CrossRef]
- Billington, J.; Gallasch, G.E.; Kristensen, L.M.; Mailund, T. Exploiting equivalence reduction and the sweep-line method for detecting terminal states. IEEE Trans. Syst. Man Cybern.-Part A Syst. Hum. 2004, 34, 23–37. [Google Scholar] [CrossRef]
- Partabian, J.; Rafe, V.; Parvin, H.; Nejatian, S. An approach based on knowledge exploration for state space management in checking reachability of complex software systems. Soft Comput. 2020, 24, 7181–7196. [Google Scholar] [CrossRef]
- Kojima, H.; Yanai, N. A model checking method for secure routing protocols by SPIN with state space reduction. In Proceedings of the 2020 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW), New Orleans, LA, USA, 18 May 2020. [Google Scholar]
- Zhang, Y.; Chakrabarty, K.; Peng, Z.; Rezine, A.; Li, H.; Eles, P.; Jiang, J. Software-based self-testing using bounded model checking for out-of-order superscalar processors. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2020, 39, 714–730. [Google Scholar] [CrossRef]
- Wu, B.; Zhang, X.; Lin, H. Permissive supervisor synthesis for Markov decision processes through learning. IEEE Trans. Autom. Control 2019, 64, 3332–3342. [Google Scholar] [CrossRef]
- Wang, T.; Chen, T.; Liu, Y.; Wang, Y. Anti-chain based algorithms for timed/probabilistic refinement checking. Sci. China Inf. Sci. 2018, 61, 052105. [Google Scholar] [CrossRef]
- Shen, L.; Mu, D.; Cao, G.; Qin, M.; Zhu, J.; Hu, W. Accelerating hardware security verification and vulnerability detection through state space reduction. Comput. Secur. 2021, 103, 102167. [Google Scholar] [CrossRef]
- Han, P.; Zhai, Z.; Nielsen, B.; Nyman, U.; Kristjansen, M. Schedulability analysis of distributed multicore avionics systems with uppaal. J. Aerosp. Inf. Syst. 2019, 16, 473–499. [Google Scholar] [CrossRef]
- Bortolussi, L.; Lanciani, R. Schedulability Analysis of Distributed Multicore Avionics Model checking Markov population models by stochastic approximations. Inf. Comput. 2018, 262, 189–220. [Google Scholar] [CrossRef]
- Konnov, I.; Veith, H.; Widder, J. On the completeness of bounded model checking for threshold-based distributed algorithms: Reachability. Inf. Comput. 2017, 252, 95–109. [Google Scholar] [CrossRef]
- Chai, X.; Ribeiro, T.; Magnin, M.; Roux, O.; Inoue, K. Static analysis and stochastic search for reachability problem. Electron. Notes Theor. Comput. Sci. 2020, 350, 139–158. [Google Scholar] [CrossRef]
- Mikeev, L.; Neuhäußer, M.R.; Spieler, D.; Wolf, V. On-the-fly verification and optimization of DTA-properties for large Markov chains. Form. Methods Syst. Des. 2013, 43, 313–337. [Google Scholar] [CrossRef]
- Alagar, S.; Venkatesan, S. Techniques to tackle state explosion in global predicate detection. IEEE Trans. Softw. Eng. 2001, 27, 704–714. [Google Scholar] [CrossRef]
- Comert, F.; Ovatman, T. Attacking state space explosion problem in model checking embedded TV software. IEEE Trans. Consum. Electron. 2015, 61, 572–579. [Google Scholar] [CrossRef]
- Zheng, H. Compositional reachability analysis for efficient modular verification of asynchronous designs. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2010, 29, 329–340. [Google Scholar] [CrossRef]
- Xing, L.; Tannous, O.; Dugan, J.B. Reliability analysis of nonrepairable cold-standby systems using sequential binary decision diagrams. IEEE Trans. Syst. 2011, 42, 715–726. [Google Scholar] [CrossRef]
- Sozzo, E.D.; Conficconi, D.; Zeni, A.; Salaris, M.; Sciuto, D.; Santambrogio, M.D. Pushing the level of abstraction of digital system design: A survey on how to program FPGAs. ACM Comput. Surv. 2022, 55, 1–48. [Google Scholar] [CrossRef]
- Hu, J.; Chen, S.; Chen, D.; Kang, J.; Wang, H. Model-based Safety Analysis for an Aviation Software Specification. Int. J. Perform. Eng. 2020, 16, 238–254. [Google Scholar]
- Langenfeld, V.; Dietsch, D.; Westphal, B.; Hoenicke, J. Scalable Analysis of Real-Time Requirements. In Proceedings of the 2019 IEEE 27th International Requirements Engineering Conference (RE), Jeju Island, Republic of Korea, 23–27 September 2019. [Google Scholar]
- Beer, I.; Ben-David, S.; Eisner, C.; Fisman, D.; Gringauze, A.; Rodeh, Y. The Temporal Logic Sugar. In Proceedings of the Computer Aided Verification: 13th International Conference (CAV), Paris, France, 18–22 July 2001. [Google Scholar]
- Armoni, R.; Fix, L.; Flaisher, A.; Gerth, R.; Ginsburg, B.; Kanza, T.; Landver, A.; Mador-Haim, S.; Singerman, E.; Tiemeyer, A.; et al. The forspec temporal logic: A new temporal property-specific logic. In Proceedings of the 8th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Grenoble, France, 8–12 April 2002. [Google Scholar]
- OVL (Open Verification Language). Available online: https://www.eda.org/downloads/standards/ovl (accessed on 16 November 2023).
- PSL, Standard for Property Specification Language (PSL). Available online: https://www.eda.org/downloads/ieee (accessed on 16 November 2023).
- IEEE Standard for Systemverilog—Unified Hardware Design, Specification, and Verification Language. Available online: https://accellera.org/downloads/ieee (accessed on 16 November 2023).
- Ben-David, S.; Copty, F.; Fisman, D.; Ruah, S. Vacuity in practice: Temporal antecedent failure. Form. Methods Syst. Des. 2015, 46, 81–104. [Google Scholar] [CrossRef]
- Hopcroft, J.E.; Motwani, R.; Ullman, J.D. Introduction to Automata Theory, Languages, and Computation, 3rd ed.; Addison-Wesley Publishing Company: Boston, MA, USA, 2006. [Google Scholar]
- AveMC, a Formal Verification Platform. Available online: https://www.arcas-da.com/EN/html/products/AveMC.html (accessed on 26 November 2023).
- Ashenden, P.J. The Designer’s Guide to VHDL; Margan Kaufmann: San Francisco, CA, USA, 2002. [Google Scholar]
- Thomas, D.; Moorby, P. The Verilog® Hardware Description Language; Springer Science & Business Media: Berlin, Germany, 2008. [Google Scholar]
- Vijayaraghavan, S.; Ramanathan, M. A Practical Guide for SystemVerilog Assertions; Springer Science & Business Media: Berlin, Germany, 2005. [Google Scholar]
Model Checking | Traditional Test | |
---|---|---|
Test principle | Traverse all input paths | Limited testing case |
Advantage | Comprehensive verification for a property | Provide information on whether the software meets the requirements based on the limited testing case principle |
Disadvantage | Unable to obtain verification results when the code is complex |
|
SOPC test |
|
|
RTL Codes |
---|
Reg[4:0] rec_nstate; typedefenum logic [4:0] {SELFCHECK_TASK, RESET_TASK, DIR_TASK, SYN_TASK, TIME_TASK, REC_TASK} state_enum; always @(posedge clk or negedge rstn) if(!rstn) rec_nstate = SELFCHECK_TASK; else if(wr_en_in && (wr_cmd_data_in[31:24] == 8’h01)) rec_nstate = SELFCHECK_TASK; else if(wr_en_in && (wr_cmd_data_in[31:24] == 8’h02)) rec_nstate = RESET_TASK; else if(wr_en_in && (wr_cmd_data_in[31:24] == 8’h04)) rec_nstate = DIR_TASK; else if(wr_en_in && (wr_cmd_data_in[31:24] == 8’h08)) rec_nstate = SYN_TASK; else if(wr_en_in && (wr_cmd_data_in[31:24] == 8’h10)) rec_nstate = TIME_TASK; else rec_nstate = rec_nstate; |
An SVA Property Based on the RTL Code |
---|
Property reset_check ($fell(rstn)|-> rec_nstate= SELFCHECK_TASK Endproperty |
The RTL Codes |
---|
//**********************// //task_num //**********************// always @(posedge clk or negedge rstn) begin if(!rstn) begin task_num <= 8’d0; end else if(inn_rst) begin task_num <= 8’d0; end else if((rec_cnt == 32’d1) && wr_en_in) begin task_num <= wr_cmd_data_in[23:16]; end else begin task_num <= task_num; end end |
Type | Property |
---|---|
Software and hardware interaction area |
|
Type | Property Description | Property |
---|---|---|
Read_Write conflict | Does not read and write the same address of dual-port RAM at the same time. | !(Read&&write&&(Read_addr==Write_addr)) |
Two masters cannot write to the same address of shared storage at the same time. | !(master1_wr&&master2_wr&&(master1_wraddr==master2_wraddr)) | |
Does not read and write the same register at the same time. | !(Read&&write &&(rd_regaddr==wr_regaddr)) | |
The software reads the value of the updated logic register within N ms. | $changed(reg) |=> #[0:100] reg_read | |
Read_write interrupt conflict | The interrupt status register does not lose an interrupt. | //property Inter1_in&&no_other_inters |=>inter_status[1]; |
The time interval of the interrupt request shall not be less than 1 s. | Always @(posedge clk or posedge rst) If(!rst) counter<=0; Else if(int_req||counter ==TIME) counter<=0; Else counter <=counter +1; Assign flag = (count !=0) //property (int_req & flag) | |
The last interrupt ID is cleared before the next interrupt. | Always @(posedge clk or posedge rst) If(!rst) set_flag <=0; Else if(interruptid_clear) set_flag <=0; Else if(interruptid_set) set_flag <=1; //property (!set_flag)&&interrupt | |
One bit of interrupt register cannot be read and written at the same time. | assign rd_intr0=rd &intr_reg[0]; assign wr_intr0=wr &intr_reg[0]; //property !(rd_intr0&& wr_intr0) assign rd_intr1=rd &intr_re [1]; assign wr_intr1=wr &intr_reg[1]; //property !(rd_intr1&& wr_intr1) | |
The interrupt status register does not lose an interrupt. | Inter1_in&&noother_inters |=>inter_status[1]; |
Property | Pass * | Original Formal Design Model | Reduction Formal Design Model | ||
---|---|---|---|---|---|
Memory (MB) | Running Time (s) | Memory (MB) | Running Time (s) | ||
P1 | √ | NA | NA | 1056 | 2954 |
P2 | × | NA | NA | 1024 | 2410 |
P3 | √ | NA | NA | 1114 | 3202 |
P4 | √ | 274 | 810 | 124 | 44 |
P5 | √ | 214 | 702 | 122 | 40 |
P6 | × | 680 | 3450 | 685 | 211 |
P7 | √ | 1036 | 3228 | 780 | 130 |
P8 | × | NA | NA | 1024 | 3581 |
P9 | √ | 362 | 1012 | 178 | 68 |
Code Line | Property | Original States | Reduced Register (States) | Ratio |
---|---|---|---|---|
77,892 | P1 | 221,340 | 90,882 | 41% |
P2 | 77,468 | 35% | ||
P3 | 97,792 | 44% | ||
P4 | 11,079 | 5% | ||
P5 | 10,495 | 4.74% | ||
P6 | 34,773 | 15.7% | ||
P7 | 29,758 | 13.44% | ||
P8 | 79,984 | 36% | ||
P9 | 17,788 | 8% |
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
Zhou, S.; Wang, J.; Xue, P.; Wang, X.; Kong, L. An Approach to the State Explosion Problem: SOPC Case Study. Electronics 2023, 12, 4987. https://doi.org/10.3390/electronics12244987
Zhou S, Wang J, Xue P, Wang X, Kong L. An Approach to the State Explosion Problem: SOPC Case Study. Electronics. 2023; 12(24):4987. https://doi.org/10.3390/electronics12244987
Chicago/Turabian StyleZhou, Shan, Jinbo Wang, Panpan Xue, Xiangyang Wang, and Lu Kong. 2023. "An Approach to the State Explosion Problem: SOPC Case Study" Electronics 12, no. 24: 4987. https://doi.org/10.3390/electronics12244987
APA StyleZhou, S., Wang, J., Xue, P., Wang, X., & Kong, L. (2023). An Approach to the State Explosion Problem: SOPC Case Study. Electronics, 12(24), 4987. https://doi.org/10.3390/electronics12244987