KR101136122B1 - Break point analysis method for unit test of DSP software - Google Patents

Break point analysis method for unit test of DSP software Download PDF

Info

Publication number
KR101136122B1
KR101136122B1 KR1020100077421A KR20100077421A KR101136122B1 KR 101136122 B1 KR101136122 B1 KR 101136122B1 KR 1020100077421 A KR1020100077421 A KR 1020100077421A KR 20100077421 A KR20100077421 A KR 20100077421A KR 101136122 B1 KR101136122 B1 KR 101136122B1
Authority
KR
South Korea
Prior art keywords
unit test
branch
instruction
software
analyzing
Prior art date
Application number
KR1020100077421A
Other languages
Korean (ko)
Other versions
KR20120015145A (en
Inventor
신선영
Original Assignee
한국항공우주산업 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국항공우주산업 주식회사 filed Critical 한국항공우주산업 주식회사
Priority to KR1020100077421A priority Critical patent/KR101136122B1/en
Publication of KR20120015145A publication Critical patent/KR20120015145A/en
Application granted granted Critical
Publication of KR101136122B1 publication Critical patent/KR101136122B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 C6000계열의 DSP 탑재 소프트웨어의 결함을 분석하기 위한 단위시험에 관한 것으로, 소프트웨어의 구현 단계에서 실시하는 검증 작업인 일반적인 단위시험 방법과 다르게 모든 코드 라인을 검증해야하는 안전중시 임베디드 소프트웨어 개발 시 적용되는 방법이다. 안전중시 임베디드 소프트웨어의 개발 특성상 실행코드가 실제 탑재되는 타겟에서 원하는 동작을 수행하는지 보장이 필요한데, 실제 타겟 환경과 동일한 시뮬레이션 환경에서 분기 패턴 분석으로 100% 커버리지 시험을 할 수 있도록 한 것이다.
본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법은 컴파일러 최적화 레벨인 1단계로 설정하여, 개발 코드의 단위시험 구현의 기준으로 적용하는 CPU 아키텍처 분석 단계 및 분기하는 시점(break point)의 어셈블리 언어 패턴을 분석하는 분기점 분석 단계를 포함하는 것을 기술적 특징으로 하며, 개발 코드에서 발생 가능한 오류를 최소화할 수 있는 단위시험 방법을 제공하는 것을 기술적 목적으로 한다.
The present invention relates to unit testing for analyzing defects in C6000-based DSP-equipped software, and is applicable to the development of safety-focused embedded software that must verify all code lines, unlike the general unit test method, which is a verification operation performed at the software implementation stage. That's how it is. Due to the development of safety-critical embedded software, it is necessary to ensure that the execution code performs the desired operation on the target on which it is actually mounted. It is to enable 100% coverage test by branch pattern analysis in the same simulation environment as the actual target environment.
The break point analysis method for the DPS-equipped software unit test according to the present invention is set to the compiler optimization level of step 1, and the CPU architecture analysis step and branching point (break point) to be applied as the basis of the unit test implementation of the development code. Its technical features include a step analysis step for analyzing assembly language patterns, and its technical purpose is to provide a unit test method that can minimize errors that can occur in development code.

Description

디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법{Break point analysis method for unit test of DSP software}Break point analysis method for unit test of DSP software

본 발명은 DSP 탑재 소프트웨어의 결함을 분석하기 위한 단위시험에 관한 것으로, 더 자세히는 DSP TMSC6000 계열의 개발 코드와 코드 컴파일에 의해 생성되는 어셈블리어를 분석하여, 브레이크 포인트(break point)를 추출하여, 단위 시험을 수행하는 분석 방법에 관한 것이다.The present invention relates to unit tests for analyzing defects in DSP-embedded software, and more specifically, to analyze breakdowns generated by DSP TMSC6000 series development code and code compilation, extracting break points, and It relates to an analytical method of performing a test.

일반적으로, 임베디드 소프트웨어 개발 단계는 개발단계와 테스트 단계를 구분되며, 상기 테스트 단계에서 발생한 결함은 해당 개발 단계로 돌아가 결함을 수정해나가는 V모델(V-model)을 적용하고 있다. 이러한 V모델에 있어, 각 단계의 잠재적인 결함을 찾아서 해결하는 일은 소프트웨어 전체의 신뢰성 향상뿐만 아니라 소프트웨어 개발 비용에 밀접한 연관을 갖게 된다.In general, the embedded software development phase is divided into a development phase and a test phase, and a defect generated in the test phase is applied to a V-model (V-model) that returns to the development phase and corrects the defect. In this V model, finding and resolving potential defects at each stage is closely tied to the cost of software development as well as improving the overall reliability of the software.

즉, 개발 단계에서 결함을 발견할 경우, 소스 코드의 수정만으로 끝나게 되지만 테스트 단계에서 결함을 발견할 경우, 소스 코드 수정 이외에 패키징 작업, 테스트 팀으로 릴리즈하는 작업, 테스트 작업, 결함 리포트 작업, 디버깅 작업 등 부가적인 작업을 수행해야하는 문제점이 있다.In other words, if you find a defect in the development stage, you end up with only modifications to the source code, but if you find a defect in the testing stage, in addition to modifying the source code, you can do packaging work, release to the test team, test work, defect report work, and debug work. There is a problem that needs to be performed.

또한, 출시되어 사용자 이용 단계에서 결함을 발견할 경우, 소트코드, 수정 과 테스트 단계에 버그 발생으로 수행했던 작업 이외에 업그레이드를 위한 릴리즈 작어, 업그레이드 작업 등 더 많은 부가 작업을 필요로 하는 문제점이 발생하는 것이다.In addition, when a defect is found in the user use stage, a problem that requires more additional work, such as a release code for an upgrade and an upgrade operation, in addition to the work performed as a bug occurrence in the sort code, the fix and the test stage, may occur. will be.

따라서 이러한 부가 작업을 수행 시, 소프트웨어 품질을 떨어뜨리며, 소프트웨어 개발 비용이 증가함과 동시에 사용자로부터 소프트웨어에 대한 신뢰도를 떨어뜨리는 문제점이 발생하게 된다.Therefore, when performing such additional work, the quality of software is decreased, and the cost of software development is increased, and at the same time, there is a problem of decreasing the reliability of the software from the user.

그러므로 소프트웨어의 개발단계에서 시행하는 단위시험은 그 중요성이 높으며, 종래, 단위시험 방법으로는 Statement Coverage, Branch Coverage, Decision Coverage, Condition Coverage, Condition/Decision Coverage 및 Modified Condition/ Decision Coverage 등이 있으며, 테스터의 테스트 목적이나 개발 코드의 복잡도 등을 고려하여, 테스트 방법을 선택하게 되고, 상기 테스트 방법에 따라 테스트 툴의 선정 기준도 달라진다. Therefore, unit tests conducted at the software development stage are of high importance. Conventional unit test methods include statement coverage, branch coverage, decision coverage, condition coverage, condition / decision coverage, and modified condition / decision coverage. The test method is selected in consideration of the test purpose, the complexity of the development code, and the like, and selection criteria of the test tool also vary according to the test method.

하지만 이러한 종래의 단위시험 방법은 대부분 상용 툴 하나에 최대한 많은 소프트웨어 테스트를 적용함에 따라 개발 코드가 적용될 임베디드 시스템을 고려가지 않은 획일화된 단위시험 방법을 시행하여, 단위시험의 질이 현저히 떨어지며, 코드가 실제 탑재되는 타겟에서 원하는 동작을 수행하는지 보장할 수 없는 문제점이 있는 것이다. However, in the conventional unit test method, as most software tests are applied to one commercial tool, a uniform unit test method that does not consider an embedded system to which a development code is applied is implemented. There is a problem that can not guarantee whether to perform the desired operation on the target actually mounted.

본 발명은 상기와 같은 종래의 문제점을 해결하기 위하여 제안된 것으로,The present invention has been proposed to solve the above conventional problems,

본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 목적은 컴파일러 최적화 레벨에서의 어셈블러 언어 패턴 분석으로, 분기점(break point)에서 추출하고, 실행되는 명령어 실행여부를 확인하여, 발생 가능한 오류를 최소화할 수 있는 단위시험 방법을 제공하는데 있다.The purpose of the breakpoint analysis method for the DPS-equipped software unit test in accordance with the present invention is an assembler language pattern analysis at the compiler optimization level, extracting from the break point, and checking whether the instruction to be executed is executed, and possible errors To provide a unit test method that can minimize the

다른 목적은, 어셈블러 언어의 패턴을 분석하여, 입력 값에 따른 적정 출력 값을 도출하는지 확인하여, 단위 시험의 신뢰도를 향상시키는데 있다.Another object is to improve the reliability of the unit test by analyzing the pattern of the assembler language, confirming that a proper output value is derived according to the input value.

또 다른 목적은, 분기 명령어 패턴과 개발 코드의 분기점의 일치여부를 분석하여, 분기 발생 시점의 정확성을 높이는데 있다.Another goal is to improve the accuracy of branching points by analyzing the branch instruction pattern and the branching point of development code.

또 다른 목적은, 분기 명령어 이외의 분기 발생에 따라 분기 명령 패턴을 추가하고, 예외 상황을 기록하는데 있다.Another purpose is to add branch instruction patterns according to branch occurrences other than branch instructions, and record exceptions.

또 다른 목적은, 어셈블리어 분기문을 추출하기 위해, 명령어의 분류뿐만 아니라 목적 레지스터가 조건 레지스터의 조건을 성립하여, 분석하는데 있다. Another purpose is to extract the assembly language branch statement, as well as the classification of the instructions, the destination register establishes the conditions of the condition register, to analyze.

또 다른 목적은, 딜레이 슬롯 분석을 통해, 각각의 명령어별로 반영되는 시점을 분석하는데 있다.Another purpose is to analyze the time points reflected for each instruction through delay slot analysis.

또 다른 목적은, 병렬 수행을 통해, 명령어의 결과 반영시점을 분석하는데 있다.Another purpose is to analyze when the result of the instruction is reflected through parallel execution.

또 다른 목적은, 딜레이 슬롯 및 병렬 수행의 중첩 시, 명령어별로 분기점의 실행여부를 확인하여, 분석하는데 있다.Another purpose is to check and analyze whether branch points are executed for each instruction when overlapping delay slots and parallel executions.

또 다른 목적은, TMSC6000 CPU 기반으로 개발된 코드를 단위시험하기 적합한 방법을 제공하는데 있다.Another object is to provide a suitable method for unit testing code developed on the TMSC6000 CPU.

또 다른 목적은, 단위시험 알고리즘을 시뮬레이터 제어 언어인 GEL 코드로 구현하여, 시뮬레이터를 효율적으로 활용하는데 있다. Another purpose is to implement the unit test algorithm in GEL code, which is a simulator control language, to effectively utilize the simulator.

본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법은 컴파일러 최적화 레벨인 1단계로 설정하여, 개발 코드의 단위시험 구현의 기준으로 적용하는 CPU 아키텍처 분석 단계 및 분기하는 시점의 어셈블리 언어 패턴을 분석하는 분기점 분석 단계를 포함하는 것을 특징으로 한다.The breakpoint analysis method for the DPS-equipped software unit test according to the present invention is set to the compiler optimization level of step 1, and the CPU language analysis step and the assembly language pattern at the time of branching are applied to the unit test implementation standard of the development code. It characterized in that it comprises a branch point analysis step of analyzing.

또한, 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 분기점 분석 단계는 분기 명령어 패턴을 추출하는 단계, 개발 코드를 대입하는 단계 및 상기 분기 명령어 패턴과 상기 개발 코드의 분기점을 비교 분석하는 단계를 포함하는 것을 특징으로 한다.In addition, the branch point analysis step of the break point analysis method for the DPS-equipped software unit test according to the present invention is the step of extracting the branch instruction pattern, the step of inserting the development code and the comparative analysis of the branch instruction pattern and the branch point of the development code Characterized in that it comprises a step.

또한, 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 단위시험 알고리즘을 적용하는 단계는 소스 오퍼랜드(source operand) 가 리드(read) 된 후에 결과(result)가 나올 때까지 필요한 사이클인 딜레이 슬롯(delay slot)을 분석하는 단계를 더 포함하는 것을 특징으로 한다.In addition, applying the unit test algorithm of the breakpoint analysis method for the DS-equipped software unit test is a delay slot which is a necessary cycle until a result is output after the source operand is read. and analyzing the slot).

또한, 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 비트 포맷(bit format)에서 가장 하위비트(0 bit) 값이 1일 경우에 병렬 수행하고, 명령어의 결과 반응 시점을 분석하는 병렬 수행(parallel execution) 분석 단계를 더 포함하는 것을 특징으로 한다.In addition, when the lowest bit (0 bit) value is 1 in the bit format of the breakpoint analysis method for the DPS-equipped software unit test, parallel execution is performed to analyze the response time of the result of the instruction. execution) characterized in that it further comprises a step of analysis.

또한, 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 단위시험 알고리즘을 적용하는 단계는 딜레이 슬롯 및 상기 병렬 수행이 복합적으로 나타나는 경우의 명령어의 결과가 반영되는 시점을 분석하는 딜레이 슬롯 및 병렬 수행의 중첩 분석 단계를 더 포함하는 것을 특징으로 한다.In addition, applying the unit test algorithm of the break point analysis method for the DS-equipped software unit test is a delay slot and parallel execution to analyze the time when the delay slot and the result of the instruction when the parallel execution appears in combination It further comprises the step of overlap analysis.

이상에서 설명한 바와 같이, 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법은 컴파일러 최적화 레벨에서의 어셈블리 언어 패턴 분석을 수행을 통해, 분기점(break point)을 추출하고 실행되는 명령어 실행여부를 확인함으로써, 발생 가능한 오류를 최소화할 수 있는 단위시험 방법을 제공할 수 있는 효과가 있으며, 나아가 소프트웨어 개발 효율 및 신뢰성을 향상시키고, 개발 비용의 증가를 방지할 수 있는 효과가 있다.As described above, the break point analysis method for the DPS-equipped software unit test according to the present invention performs the assembly language pattern analysis at the compiler optimization level, whether to extract the break point and execute the instruction executed By verifying, there is an effect that can provide a unit test method that can minimize the possible errors, further improve the software development efficiency and reliability, and prevent the increase in development costs.

또한, 어셈블리 언어의 패턴을 분석함으로써, 입력 값에 따른 적정 출력 값을 도출하는지 확인하여, 단위 시험의 신뢰도를 향상시킬 수 있는 효과가 있다.In addition, by analyzing the pattern of the assembly language, it is possible to determine whether to derive an appropriate output value according to the input value, thereby improving the reliability of the unit test.

또한, 분기 명령어 패턴과 개발 코드의 분기점의 일치여부를 분석함으로써, 분기 발생 시점의 정확성을 높일 수 있는 효과가 있다.Also, by analyzing whether the branch instruction pattern coincides with the branch point of the development code, it is possible to increase the accuracy of the branch occurrence time.

또한, 분기 명령어 이외의 분기 발생에 따라 분기 명령 패턴을 추가하고, 예외 상황을 기록할 수 있는 효과가 있다.In addition, according to the occurrence of branches other than the branch instruction, the branch instruction pattern may be added, and an exception situation may be recorded.

또한, 어셈블리어 분기문을 추출하기 위해, 명령어의 분류뿐만 아니라 목적 레지스터가 조건 레지스터의 조건을 성립하여, 분석할 수 있는 효과가 있다. In addition, in order to extract the assembly language branch statement, not only the classification of the instruction but also the target register establishes a condition of the condition register and has an effect that can be analyzed.

또한, 딜레이 슬롯 분석을 통해, 각각의 명령어별로 반영되는 시점을 분석할 수 있는 효과가 있다.In addition, through the delay slot analysis, it is possible to analyze the time points reflected for each instruction.

또한, 병렬 수행을 통해, 명령어의 결과 반영시점을 분석할 수 있는 효과가 있다.In addition, through parallel execution, it is possible to analyze the timing of reflecting the result of the instruction.

또한, 딜레이 슬롯 및 병렬 수행의 중첩 시, 명령어별로 분기점의 실행여부를 확인하여, 분석할 수 있는 효과가 있다.In addition, when overlapping the delay slot and parallel execution, it is possible to check and analyze whether the branch point is executed for each instruction.

또한, TMSC6000 CPU 기반으로 개발된 코드를 단위시험하기 적합한 방법을 제공할 수 있는 효과가 있다.In addition, there is an effect that can provide a suitable method for unit testing the code developed based on the TMSC6000 CPU.

또한, 단위시험 알고리즘을 시뮬레이터 제어 언어인 GEL 코드로 구현하여, 시뮬레이터를 효율적으로 활용할 수 있는 효과가 있다. In addition, by implementing the unit test algorithm in the simulator control language GEL code, there is an effect that can effectively utilize the simulator.

도 1은 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 전체 흐름도.
도 2는 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 S20 단계의 일실시예를 나타내는 도면.
도 3은 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 딜레이 슬롯을 분석하는 단계의 일실시예를 나타내는 도면.
도 4는 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 병렬 수행을 나타내는 개념도.
도 5는 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 병렬 수행여부를 나타내는 실시예들.
도 6은 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 딜레이 슬롯 및 병렬 수행의 중첩 분석을 나타내는 일실시예.
1 is a whole flow diagram of a break point analysis method for a DS-equipped software unit test according to the present invention.
Figure 2 is a view showing an embodiment of step S20 of the break point analysis method for the DPS-equipped software unit test according to the present invention.
Figure 3 is a view showing an embodiment of the step of analyzing the delay slot of the break point analysis method for the DPS-equipped software unit test according to the present invention.
Figure 4 is a conceptual diagram showing the parallel execution of the break point analysis method for the DS-equipped software unit test in accordance with the present invention.
Figure 5 is an embodiment showing whether or not parallel execution of the break point analysis method for the DPS-equipped software unit test according to the present invention.
Figure 6 is an embodiment showing the overlap analysis of the delay slot and parallel execution of the break point analysis method for the DS-equipped software unit test in accordance with the present invention.

이하, 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법을 실시하기 위한 구체적인 내용을 설명하면 다음과 같다.
Hereinafter, a detailed description of the breakpoint analysis method for the DPS-equipped software unit test according to the present invention will be described.

[도 1]은 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법의 흐름도를 나타내는 도면으로, 먼저, CPU 아키텍처 분석 단계를 수행한다.(S10)1 is a diagram illustrating a flowchart of a breakpoint analysis method for a DS-loaded software unit test according to the present invention. First, a CPU architecture analysis step is performed.

본 발명에 따른 개발 코드는 TMSC6000을 기반으로 개발한 것으로, 이를 테스트하기 위해, 시뮬레이터 제어 언어를 C언어와 유사한 GEL 코드로 구현한다.The development code according to the present invention is developed based on the TMSC6000. To test this, the simulator control language is implemented with GEL code similar to the C language.

또한, 단위시험을 위해서는 테스트의 범위를 정립하고, 테스트 목적에 부합하는 방향으로 진행하여야 하는데 상기 S10 단계는 상기 테스트 목적에 따라 컴파일러의 최적화 레벨을 선정하는 것이 바람직하다. 이를 위해서 본 발명에 따른 상기 최적화 레벨은 유닛내에서 최적화가 일어나는 1단계로 설정하고, 적용하였다.In addition, in order to perform the unit test, the scope of the test should be established and proceeded in accordance with the test purpose. In step S10, it is preferable to select an optimization level of the compiler according to the test purpose. To this end, the optimization level according to the present invention is set and applied to one stage in which optimization occurs in the unit.

다음으로, 분기점(break point)을 분석하는 단계를 수행하는데, 상기 분기점을 분석하는 상세 흐름을 설명하면, 분기 명령어 패턴을 추출하는 단계를 수행한다.(S20)Next, a step of analyzing a break point is performed, and a detailed flow of analyzing the break point is described, and a step of extracting a branch instruction pattern is performed.

본 발명에 따른 상기 S20 단계는 낮은 레벨 언어인 어셈블리 언어를 분석하여, 분기하는 시점의 명령어 패턴을 분석하여, 테스트하는 방식이라 할 수 있다.The step S20 according to the present invention may be referred to as a method of analyzing an assembly language which is a low level language, analyzing an instruction pattern at a branching point, and testing the same.

본 발명에 따른 분기 명령어 패턴은 CMP 관련 타입, LDW 관련 타입, EXTU 관련 타입, MV 관련타입, OR 관련타입, ZERO 관련 타입, MVK 관련 타입으로 분석된다.The branch instruction pattern according to the present invention is analyzed as CMP related type, LDW related type, EXTU related type, MV related type, OR related type, ZERO related type, and MVK related type.

먼저 제1타입인 CMP 관련 타입은 CMP 관련 명령어이면서 목적 레지스터가 조건 레지스터인 경우를 말하며, 상기 CMP 관련 명령어는 CMPGT, CMPLT, CMPEQ, CMPEQDP, CMPEQSP, CMPGTDP, CMPGTSP, CMPLTDP, CMPLTSP 등이 있다.First, the CMP-related type, which is the first type, refers to a case in which a CMP-related instruction and a destination register are conditional registers.

[도 2]는 상기 제1타입의 실시예를 나타내는 도면으로, 코드에서 보이는 세 개의 분기점(if)문은 CMPGT, CMPGTU의 어셈블리어 명령어로 컴파일되어 있다. 또한 상기 명령어의 결과 값을 저장하는 레지스터가 각각 A1, A1, B0 로써 이는 C6000 계열 프로세서에서 조건 레지스터로 지정해둔 레지스터이다. FIG. 2 is a diagram illustrating an embodiment of the first type, in which three branch point (if) statements shown in the code are compiled into assembly language instructions of CMPGT and CMPGTU. In addition, the registers storing the result value of the instruction are A1, A1 and B0, respectively, which are designated as condition registers in the C6000 series processor.

이와 같은 경우에 분기점(break point)이 생성되었다고 할 수 있으므로, 이 경우를 분기 명령어 패턴으로 추출하게 되는 것이다.In this case, the break point is generated, so this case is extracted as the branch instruction pattern.

또한, 제2타입인 LDW 관련 타입은 LDW 관련 명령어이면서 목적 레지스터가 조건 레지스터인 경우를 말하며, 상기 LDW 관련 명령어는 LDB, LDH, LDW 등이 있다.In addition, the LDW related type, which is the second type, refers to a case in which an LDW related instruction and a destination register are condition registers. The LDW related instructions include LDB, LDH, LDW, and the like.

또한 제3타입인 EXTU 관련 타입은 EXTU 관련 명령어이면서, 목적 레지스터가 조건 레지스터인 경우를 말하며, 또한, 제4타입인 MV 관련 타입은 MV 관련 명령어이면서, 목적 레지스터가 조건 레지스터인 경우를 말한다.In addition, the third type of EXTU-related type refers to the case where the destination register is a conditional register while the instruction related to EXTU-related instructions. In addition, the type of MV related to the fourth type refers to the case where the destination register is a conditional register while it is an MV-related instruction.

또한, 제5타입인 OR 관련 타입은 OR 관련 명령어이면서, 목적 레지스터가 조건 레지스터인 경우를 말하며, 상기 OR 관련 명령어는 OR, XOR, AND 등이 있다.In addition, the fifth type OR related type refers to a case in which the destination register is a condition register while the OR related command is used. The OR related commands include OR, XOR, and AND.

또한, 제6타입인 ZERO 관련 타입은 ZERO 관련 명령어이면서, 목적 레지스터가 조건 레지스터인 경우를 말하며, 제7타입인 MVK 관련 타입은 MVK 관련 명령어이면서 목적 레지스터가 조건 레지스터인 경우를 말한다.In addition, the sixth type of ZERO-related type refers to the case where the object register is a ZERO-related instruction and the condition register, and the seventh type of MVK-related type refers to the case where the object register is an MVK-related instruction and the destination register is a condition register.

이때 조건 레지스터는 성능향상을 위해 적용된 기법으로 각각의 명령어 라인에 조건 레지스터가 표기되어 있을 경우에 그 값에 의한 명령어의 실행여부를 판단하는 것이다. 종래의 분기를 통한 실행여부 판단 방법보다 자원과 시간의 낭비를 개선한 부분이라 할 수 있다.In this case, the condition register is a technique applied to improve the performance. When the condition register is indicated on each command line, it is determined whether the instruction is executed by the value. It can be said that the waste of resources and time is improved compared to the conventional method of determining whether to execute through a branch.

다음으로, 개발 코드를 대입하는 단계를 수행한다.(S30)Next, a step of assigning development code is performed (S30).

다음으로, 상기 분기 명령어 패턴과 상기 개발 코드의 분기점을 비교 분석하는 단계를 수행한다.(S40)Next, a step of comparing and analyzing the branch instruction pattern and the branch point of the development code is performed.

상기 S40단계에서 상기 분기 명령어 패턴과 상기 개발 코드의 분기점이 불일치하면, 분기명령어 이외의 분기 발생 시점을 분석하는 단계를 수행한다.(S60)If the branch instruction pattern and the branch point of the development code does not match in step S40, the step of analyzing the branch occurrence time other than the branch instruction is performed (S60).

다음으로, 상기 S60 단계에서 분기 명령어 이외의 분기 발생 시점이 규칙적인 패턴으로 발생하는 것인지 판단하는 단계(S70)를 수행하고, 상기 S70 단계에서 상기 분기 명령어 이외의 분기 발생 시점이 규칙적인 패턴이라면 분기 명령어 패턴을 추가 반영하는 단계(S90)를 수행하고, 상기 S90 단계 후, 상기 S20 단계로 돌아가 재수행하게 된다.Next, in operation S60, a step S70 of determining whether a branch occurrence point other than the branch instruction occurs in a regular pattern is performed, and in step S70, if the branch occurrence point other than the branch instruction is a regular pattern, branching is performed. The step S90 of further reflecting the command pattern is performed, and after the step S90, the process returns to the step S20 to be performed again.

또한, 상기 S70 단계에서 상기 분기 명령어 이외의 분기 발생 시점이 불규칙적인 패턴이라면, 상기 불규칙적이 코드 분석 결과와 예외 상황을 기록하는 단계를 수행한다.(S80)
In addition, if a branch occurrence time other than the branch instruction is an irregular pattern in step S70, the irregular code analysis result and an exception situation are recorded.

상기 S40단계에서 상기 분기 명령어 패턴과 상기 개발 코드의 분기점이 일치하면, 분기점을 추출을 완료하고, 단위시험 알고리즘을 적용하는 단계를 수행한다.(S50)When the branch instruction pattern and the branch point of the development code coincide in step S40, the branch point is extracted, and a unit test algorithm is applied.

본 발명에 따른 상기 S50 단계는 상기 단위시험 알고리즘은 소스 오퍼랜드(source operand) 가 리드(read) 된 후에 결과(result)가 나올 때까지 필요한 사이클인 딜레이 슬롯(delay slot)을 분석하는 것이 바람직하다.In the step S50 according to the present invention, it is preferable that the unit test algorithm analyzes a delay slot, which is a cycle required until a result is obtained after a source operand is read.

즉, 참(True), 거짓(False) 값으로 제대로 분기했는지 확인하기 위해, 명령어가 반영되는 시점을 분석하게 되는 것으로, [도 3]에 도시된 바와 같이, 각각의 명령어별로 각기 다른 딜레이 슬롯을 가지고 있는 것을 확인할 수 있다.
That is, in order to check whether the instruction is properly reflected to a true or false value, the time when the instruction is reflected is analyzed. As shown in FIG. 3, different delay slots are provided for each instruction. You can see what you have.

또한, 본 발명에 따른 단위시험 알고리즘은 비트 포맷(bit format)에서 가장 하위비트(0 bit) 값이 1일 경우에 병렬 수행하고, 명령어의 결과 반응 시점을 분석하는 병렬 수행(parallel execution) 분석이 반영되는 것이 바람직하다.In addition, the unit test algorithm according to the present invention performs parallel execution when the lowest bit (0 bit) value is 1 in the bit format, and parallel execution analysis for analyzing the response time of the result of the instruction is performed. It is desirable to be reflected.

즉, C6000 계열은 [도 4]에 도시된 바와 같이, 성능 향상을 위해 8개의 명령어가 동시에 패치(fetch)가능하도록 설계되어 있으므로 이에 따른 명령어 결과 반영 시점도 분석해야 하는 것이다.That is, the C6000 series is designed to fetch eight instructions at the same time to improve performance, as shown in FIG.

따라서 병렬 수행을 확인할 수 있는 방법은 [도 5]에 도시된 바와 같이, 가장 하위비트 값이 1일 경우에는 병렬 수행하고, 0일 경우에는 병렬 수행하지 않는다.
Therefore, as shown in FIG. 5, a method for confirming parallel performance is performed in the case where the lowest bit value is 1, and in the case of 0, the parallel operation is not performed.

또한, 본 발명에 따른 단위 시험 알고리즘은, 상기 딜레이 슬롯 및 상기 병렬 수행이 복합적으로 나타나는 경우의 명령어의 결과가 반영되는 시점을 분석하는 딜레이 슬롯 및 병렬 수행의 중첩 분석하는 방법을 적용하는 것이 바람직하다.In addition, in the unit test algorithm according to the present invention, it is preferable to apply a method of overlapping the delay slot and the parallel execution, which analyzes the time point at which the result of the instruction when the delay slot and the parallel execution appear in combination is reflected. .

즉, 딜레이 슬롯과 병렬 수행이 맞물리게 되면 명령어의 정확한 패치 시점을 찾기가 어려워져 알고리즘의 복잡도가 증가하게 되는데, [도 6]에 도시된 바와 같이, OR 명령어의 딜레이 슬롯은 0이므로 다음 PC에서 B0 레지스터 값이 변경되어야 하나 병렬 수행에 의해, 3카운트를 더 나아가야 레지스터 값을 알게 되는 것이다.That is, when the delay slot and the parallel execution are engaged, it becomes difficult to find the exact patch time point of the instruction, which increases the complexity of the algorithm. As shown in FIG. 6, since the delay slot of the OR instruction is 0, the next PC is B0. The register value must be changed, but by parallel execution, the register value must be advanced three more counts.

따라서 딜레이 슬롯과 병렬 수행이 중첩되는 경우에 코드를 진행하는 과정에서 각 명령어별로 주어진 딜레이 슬롯에 의해 결과를 도출할 수 있는 시점임에도 불구하고, 프로세서에서 명령어의 병렬 수행을 하는 과정이 중첩되면서 명령어의 결과가 반영되는 시점이 병렬 수행이 끝나는 시점으로 늦추어지게 된다. Therefore, even when delay slots and parallel execution overlap, it is a point in time where a result can be obtained by a given delay slot for each instruction in the course of code. The time when the result is reflected is delayed to the end of parallel execution.

본 발명에서는 이러한 딜레이 슬롯과 병렬 수행이 중첩되는 경우의 분기점의 실행여부를 단위시험 알고리즘에 반영하는 것이 바람직한 것이다.
In the present invention, it is preferable to reflect the execution of the branch point in the unit test algorithm when the delay slot and the parallel execution overlap.

이상에서 설명한 바와 같이, 본 발명에 따른 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법은 컴파일된 결과물 코드를 분석하여, 실질적인 분기 패턴을 추출하고, 코드의 분기점(break point)의 실질적 실행여부를 확인함으로써, 발생 가능한 오류를 최소화할 수 있는 단위시험 방법을 제공할 수 있는 효과가 있으며, 나아가 소프트웨어 개발 효율 및 신뢰성을 향상시키고, 개발 비용의 증가를 방지할 수 있는 효과를 누릴 수 있는 것이다.
As described above, the breakpoint analysis method for the DPS-equipped software unit test according to the present invention analyzes the compiled result code, extracts the actual branching pattern, and confirms whether the breakpoint of the code is actually executed. By doing so, there is an effect of providing a unit test method that can minimize the possible errors, and furthermore, it is possible to improve the software development efficiency and reliability, and to prevent the increase in development costs.

이상 본 발명의 실시예로 설명하였으나 본 발명의 기술적 사상이 상기 실시예로 한정되는 것은 아니며, 본 발명의 기술적 사상을 벗어나지 않는 범주에서 다양한 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법으로 구현할 수 있다. Although the embodiments of the present invention have been described above, the technical idea of the present invention is not limited to the above embodiments, and may be implemented as a break point analysis method for various DPS-equipped software unit tests in a range that does not depart from the technical idea of the present invention. .

Claims (10)

디에스피 시뮬레이터를 컴파일러 최적화 레벨인 1단계로 설정하여, 개발 코드의 단위시험 구현의 기준으로 적용하는 CPU 아키텍처 분석 단계 및
분기하는 시점(분기점)에서 발생하는 분기 명령어 패턴을 분석하는 분기점 분석 단계를 포함하며,
상기 분기점 분석 단계는,
분기점에서 어셈블리 언어의 명령어가 반복적으로 발생 시, 반복되는 상기 명령어의 형태를 추출하는 분기 명령어 패턴 추출 단계;
개발 코드를 대입하는 단계 및
상기 분기 명령어 패턴과 상기 개발 코드의 분기점을 비교 분석하는 단계를 포함하며,
상기 분기 명령어 패턴과 상기 개발 코드의 분기점을 비교 분석하는 단계에서,
상기 분기 명령어 패턴과 상기 개발 코드의 분기점이 일치하면, 분기점을 추출을 완료하고, 단위시험 알고리즘을 적용하는 단계를 포함하고,
상기 분기 명령어 패턴과 상기 개발 코드의 분기점이 불일치하면, 분기 명령어 이외의 추가 분기 발생 시점을 분석하는 단계를 포함하며,
상기 단위시험 알고리즘을 적용하는 단계는,
소스 오퍼랜드(source operand) 가 리드(read) 된 후에 결과(result)가 나올때까지 필요한 사이클인 딜레이 슬롯(delay slot)을 분석하는 단계를 더 포함하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
CPU architecture analysis step that sets DSP simulator to compiler optimization level 1, and applies it as a basis for unit test implementation of development code, and
A branch point analysis step of analyzing a branch instruction pattern occurring at a branching point (branch point),
The branch point analysis step,
A branch instruction pattern extraction step of extracting a form of the instruction to be repeated when an instruction of an assembly language is repeatedly generated at a branch point;
Assigning development code and
Comparing and analyzing the branch instruction pattern and the branch point of the development code,
In the step of comparing and analyzing the branch instruction pattern and the branch point of the development code,
If the branch instruction pattern and the branch point of the development code coincide, extracting the branch point, and applying a unit test algorithm,
If the branch point of the branch instruction pattern and the development code is inconsistent, analyzing the additional branch occurrence time other than the branch instruction;
Applying the unit test algorithm,
A breakpoint for a DPS-equipped software unit test, further comprising analyzing a delay slot, which is a cycle required until a result is obtained after the source operand is read. Analytical Method.
삭제delete 삭제delete 제1항에 있어서,
상기 분기 명령어 이외의 추가 분기 발생 시점을 분석하는 단계에서,
추가 분기 시점에서 어셈블리 언어의 명령어가 규칙적인 형태로 발생 시, 규칙적으로 반복되는 상기 명령어의 형태를 추출하여, 분기 명령어 패턴을 추가 반영하는 단계를 더 포함하고,
상기 추가 분기 발생 지점이 불규칙적인 패턴으로 발생 시, 코드분석 및 예외 상황의 기록을 남기는 단계를 더 포함하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 1,
In a step of analyzing an additional branch occurrence time other than the branch instruction,
If the instruction in the assembly language occurs in a regular form at the additional branch time, further comprising the step of extracting the form of the instruction to be repeated regularly, further reflecting the branch instruction pattern,
Break point analysis method for a unit test for the DPS-mounted software, characterized in that further comprising the step of leaving a record of code analysis and an exception when the additional branch occurrence point occurs in an irregular pattern.
제1항에 있어서,
상기 분기 명령어 패턴은,
CMP 관련 타입, LDW 관련 타입, EXTU 관련 타입, MV 관련타입, OR 관련타입, ZERO 관련 타입, MVK 관련 타입 중 적어도 하나 이상을 포함하며, 각 명령어가 목적 레지스터가 조건 레지스터인 것을 특징으로 하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 1,
The branch instruction pattern is,
It includes at least one of CMP related type, LDW related type, EXTU related type, MV related type, OR related type, ZERO related type, MVK related type, and each instruction is characterized in that the destination register is a condition register. Breakpoint analysis method for unit test of DSP-equipped software.
삭제delete 제1항에 있어서,
상기 단위시험 알고리즘을 적용하는 단계는,
비트 포맷(bit format)에서 가장 하위비트(0 bit) 값이 1일 경우에 병렬 수행하고, 명령어의 결과 반응 시점을 분석하는 병렬 수행(parallel execution) 분석 단계를 더 포함하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 1,
Applying the unit test algorithm,
Parallel execution if the lowest bit (0 bit) value in the bit format (1 bit), and parallel execution (parallel execution) analysis step of analyzing the response time of the result of the instruction is equipped with a DSP Breakpoint analysis method for software unit tests.
제7항에 있어서,
상기 단위시험 알고리즘을 적용하는 단계는,
상기 딜레이 슬롯 및 상기 병렬 수행이 복합적으로 나타나는 경우의 명령어의 결과가 반영되는 시점을 분석하는 딜레이 슬롯 및 병렬 수행의 중첩 분석 단계를 더 포함하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 7, wherein
Applying the unit test algorithm,
Break point analysis for the DS-equipped software unit test, characterized in that it further comprises a step of overlapping the delay slot and parallel execution to analyze the time when the result of the instruction when the delay slot and the parallel execution appears in combination Way.
제1항에 있어서,
상기 개발 코드는,
TMSC6000 CPU를 기반으로 개발된 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 1,
The development code is
Breakpoint analysis method for unit test of DS-equipped software, which is developed based on TMSC6000 CPU.
제1항에 있어서,
상기 단위시험 알고리즘은,
시뮬레이터 제어 언어인 GEL 코드로 구현하는 것을 특징으로 하는 디에스피 탑재 소프트웨어 단위시험을 위한 브레이크 포인트 분석 방법.
The method of claim 1,
The unit test algorithm,
A breakpoint analysis method for unit test of a DPS-equipped software, which is implemented by GEL code which is a simulator control language.
KR1020100077421A 2010-08-11 2010-08-11 Break point analysis method for unit test of DSP software KR101136122B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100077421A KR101136122B1 (en) 2010-08-11 2010-08-11 Break point analysis method for unit test of DSP software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100077421A KR101136122B1 (en) 2010-08-11 2010-08-11 Break point analysis method for unit test of DSP software

Publications (2)

Publication Number Publication Date
KR20120015145A KR20120015145A (en) 2012-02-21
KR101136122B1 true KR101136122B1 (en) 2012-04-17

Family

ID=45837990

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100077421A KR101136122B1 (en) 2010-08-11 2010-08-11 Break point analysis method for unit test of DSP software

Country Status (1)

Country Link
KR (1) KR101136122B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102126960B1 (en) 2020-04-24 2020-06-25 한화시스템 주식회사 Reliability testing integrated-platform of weapon system software for next-generation naval ship

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001229046A (en) * 2000-02-14 2001-08-24 Oki Electric Ind Co Ltd Test circuit
KR100669242B1 (en) * 2004-12-15 2007-01-15 한국전자통신연구원 Apparatus and method for optimizing and analyzing embedded software in cross development environment
KR100788913B1 (en) * 2005-11-18 2007-12-27 주식회사디아이 Pre-Branch Pattern Generator for Test System of Semiconductor Apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001229046A (en) * 2000-02-14 2001-08-24 Oki Electric Ind Co Ltd Test circuit
KR100669242B1 (en) * 2004-12-15 2007-01-15 한국전자통신연구원 Apparatus and method for optimizing and analyzing embedded software in cross development environment
KR100788913B1 (en) * 2005-11-18 2007-12-27 주식회사디아이 Pre-Branch Pattern Generator for Test System of Semiconductor Apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102126960B1 (en) 2020-04-24 2020-06-25 한화시스템 주식회사 Reliability testing integrated-platform of weapon system software for next-generation naval ship

Also Published As

Publication number Publication date
KR20120015145A (en) 2012-02-21

Similar Documents

Publication Publication Date Title
US10296447B2 (en) Automated software program repair
US8898647B2 (en) Method and apparatus for test coverage analysis
US20170060735A1 (en) Software program repair
CN111859388A (en) Multi-level mixed vulnerability automatic mining method
JP2006185211A (en) Program analysis system, test execution device, and analysis method and program thereof
US20200065226A1 (en) Automated software program repair of similar code snippets
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
JP2019096292A (en) Automated selection of software program repair candidate
CN110419031B (en) Code coverage tracking for microcontroller programs
CN104156311A (en) Embedded type C language target code level unit testing method based on CPU simulator
Fezzardi et al. Trace-based automated logical debugging for high-level synthesis generated circuits
Chinnaiyan et al. An Experimental Study on Reliability Estimation of GNU Compiler Components- A Review
KR20190054938A (en) Simulation device, simulation system, simulation method, and simulation program
KR101136122B1 (en) Break point analysis method for unit test of DSP software
CN109101355B (en) Processor debugging method for extracting error site characteristic test excitation
CN110955605A (en) Method for verifying single step dynamic execution by CPU
CN109977019B (en) Compiler optimization sequence test method based on incremental sampling
CN115168131A (en) Fault injection CPU abnormal function verification method
CN115034165A (en) Chip simulation verification method, system, equipment and storage medium
CN113742252B (en) Method and device for detecting memory disorder
CN112445528B (en) Result self-checking instruction sequence filling method based on pipeline constraint
El-Ashry et al. A functional coverage approach for direct testing: An industrial IP as a case study
CN113535545A (en) Binary pile inserting method for program dynamic analysis
JP6723483B2 (en) Test case generation device, test case generation method, and test case generation program
US20100251213A1 (en) Method for executing debug commands

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20160405

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20170406

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180405

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190327

Year of fee payment: 8