KR20050039954A - Integer and short type memory setup method - Google Patents

Integer and short type memory setup method Download PDF

Info

Publication number
KR20050039954A
KR20050039954A KR1020030075043A KR20030075043A KR20050039954A KR 20050039954 A KR20050039954 A KR 20050039954A KR 1020030075043 A KR1020030075043 A KR 1020030075043A KR 20030075043 A KR20030075043 A KR 20030075043A KR 20050039954 A KR20050039954 A KR 20050039954A
Authority
KR
South Korea
Prior art keywords
memory
filled
value
copying
integer
Prior art date
Application number
KR1020030075043A
Other languages
Korean (ko)
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 KR1020030075043A priority Critical patent/KR20050039954A/en
Publication of KR20050039954A publication Critical patent/KR20050039954A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/04Addressing variable-length words or parts of words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • G06F9/30149Instruction analysis, e.g. decoding, instruction word fields of variable length instructions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

본 발명은 블록 단위의 입출력 명령어를 지원하는 CPU 기반 시스템에서 메모리의 특정 영역에 정수(int) 형이나 쇼트(short) 형의 특정 값을 보다 신속하고 효율적으로 채울 수 있도록 한 정수 및 쇼트 형 메모리 설정 방법에 관한 것이다.In the present invention, a CPU-based system that supports I / O instructions in block units sets up integer and short memories so that specific values of an integer type or a short type can be filled more quickly and efficiently in a specific area of the memory. It is about a method.

본 발명은 블록 단위 입출력 명령을 지원하는 CPU를 기반으로 하는 시스템에서 정수 형이나 쇼트 형의 값을 인수로 받아들일 수 있는 정수 및 쇼트 형 메모리 설정 함수를 구현함으로써, 해당되는 CPU에서 지원하는 블록 단위 입출력 명령 예컨대, ARM CPU의 STM 명령을 이용하여 정수 형이나 쇼트 형의 특정 값을 블록 단위로 메모리에 복사할 수 있게 됨에 따라 해당되는 메모리 설정 속도를 향상시킬 수 있게 되고, 시스템 성능 개선 및 시스템 이용자가 느끼는 동작 속도 향상 등의 효과를 얻을 수 있게 되며, 특히 ARM CPU를 이용하는 이동통신 단말기에 적용하는 경우 속도가 개선됨으로 인해 배터리의 소모량 감소 및 전화수신감도를 향상시킬 수 있게 되고, 화면출력 시간이 개선되므로 컨텐츠 다운로드시 통신 비용의 절감 효과를 얻을 수 있게 된다.The present invention implements an integer and short type memory setting function that can accept an integer type or a short type value as an argument in a CPU-based system that supports block unit input / output instructions, thereby supporting a block unit supported by a corresponding CPU. By using I / O instructions, for example, the STM instructions of the ARM CPU, specific values of integer type or short type can be copied to memory in block units, thereby improving the corresponding memory setting speed, improving system performance and system users. It is possible to obtain an effect such as improving the operation speed, and especially when applied to a mobile communication terminal using an ARM CPU, the speed is improved, thereby reducing battery consumption and improving phone reception sensitivity, and outputting time is increased. As a result, communication cost can be reduced when downloading contents.

Description

정수 및 쇼트 형 메모리 설정 방법{Integer And Short Type Memory Setup Method}Integer And Short Type Memory Setup Method

본 발명은 메모리에 특정 값을 설정하는 방법에 관한 것으로, 특히 블록 단위의 입출력 명령어를 지원하는 CPU(Central Processing Unit) 기반 시스템에서 메모리의 특정 영역에 정수(int) 형이나 쇼트(short) 형의 특정 값을 보다 신속하고 효율적으로 채울 수 있도록 한 정수 및 쇼트 형 메모리 설정 방법에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for setting a specific value in a memory. In particular, in a central processing unit (CPU) -based system that supports input / output instructions in a block unit, an integer type or a short type in a specific area of the memory The present invention relates to a constant and short type memory setting method that enables to fill a specific value more quickly and efficiently.

일반적으로, ARM(Advanced RISC Machines)은 전력을 조금만 소모한다는 특징으로 인해 이동통신 단말기와 같은 내장형 시스템(Embedded System)에서는 ARM CPU를 주로 탑재하고 있다.In general, ARM (Advanced RISC Machines) consumes a small amount of power, and thus an embedded system such as a mobile communication terminal mainly includes an ARM CPU.

그리고, 소프트웨어 공학에서 메모리의 특정 영역을 특정한 값으로 채우는 방법으로, 대부분 'for loop' 문에 의해 주소를 증가시키면서 연속적으로 해당 주소에 값을 기록하여 채우는 방식을 이용하고 있는데, 이때 특정 영역을 채우려는 값이 문자(char) 형이면 'for loop' 문 대신에 C 표준 라이브러리 함수인 'memset()' 함수를 이용할 수 있다. 즉, ARM CPU의 블록 단위 입출력 명령인 STM 명령(STore Multiple instruction)을 이용하는 'memset()' 함수를 이용하여 메모리의 특정 영역에 블록 단위로 값을 기록함으로써 처리 속도를 향상시킬 수 있다.In software engineering, a specific area of memory is filled with a specific value. In most cases, the address is incremented by using a 'for loop' statement, and the value is continuously written and filled. If the value is a char type, you can use the C standard library function 'memset ()' instead of the 'for loop' statement. In other words, by using a 'memset ()' function using a STM instruction (STOR multiple instruction), which is a block input / output instruction of an ARM CPU, a processing speed can be improved by writing a value in a block unit in a specific area of the memory.

그런데, 종래의 블록 단위 입출력 명령을 지원하는 ARM CPU를 기반으로 하는 시스템의 경우 전술한 'memset()' 함수에서 지원되는 STM 명령은 문자 형의 값만을 인수로 받아들이기 때문에 정수(int) 형이나 쇼트(short) 형의 값을 설정할 수 없다는 단점이 있으며, 이로 인해 메모리에 정수 형이나 쇼트 형의 값을 채우고자 하는 경우에는 STM 명령을 이용할 수 없으므로 처리 속도가 늦음에도 불구하고 불가피하게 'for loop' 문에 의한 반복 연산으로 해당되는 작업을 수행할 수 밖에 없다는 문제점이 있었다.However, in the case of a system based on the ARM CPU supporting the conventional block unit input / output instructions, the STM instruction supported by the aforementioned 'memset ()' function accepts only a character type as an argument, so There is a shortcoming in that short value cannot be set. Therefore, if you want to fill the memory with integer or short value, you cannot use STM instruction. There was a problem that the corresponding operation can only be performed by the iterative operation by the 'statement.

또한, 종래에는 전술한 이유로 인해 소프트웨어 작성시 빈번히 'for loop' 문을 만들어야 하므로 소스 코드(source code)의 길이가 길어지는 단점이 있었다. In addition, the prior art has a disadvantage in that the length of the source code (source code) is long because the 'for loop' statement must be frequently made when writing software for the above reason.

본 발명은 전술한 바와 같은 문제점을 해결하기 위한 것으로 그 목적은, 블록 단위 입출력 명령을 지원하는 CPU 기반 시스템에서 정수 형이나 쇼트 형의 값을 인수로 받아들일 수 있는 정수 및 쇼트 형 메모리 설정 함수를 구현하고, 이를 통해 CPU에서 지원하는 블록 단위 입출력 명령을 이용하여 정수 형이나 쇼트 형의 특정 값을 블록 단위로 메모리에 복사할 수 있도록 하는데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and an object thereof is to provide an integer and short type memory setting function that can accept an integer type or a short type value as an argument in a CPU-based system supporting a block unit input / output instruction. In this way, it is possible to copy certain values of integer type or short type into memory in block unit by using block unit I / O instruction supported by CPU.

본 발명의 다른 목적은, 정수 형이나 쇼트 형의 특정 값을 블록 단위로 메모리에 복사할 수 있도록 하여 메모리 설정 속도를 향상시킴으로써, 시스템 성능을 개선하고, 시스템 이용자가 느끼는 동작 속도를 향상시킬 수 있도록 하는데 있다. Another object of the present invention is to improve the performance of the system by improving the speed of memory setting by copying a specific value of the integer type or the short type into the memory in block units so that the system user can feel the operation speed It is.

상술한 바와 같은 목적을 해결하기 위한 본 발명의 특징은, 블록 단위 입출력 명령을 지원하는 CPU에서 정수 형이나 쇼트 형의 값을 인수로 포함하는 메모리 설정 함수를 호출한 후에 메모리 시작주소와 채울 값 및 채울 길이의 인수들을 입력받는 과정과; 상기 채울 길이에 채울 값의 바이트 수를 곱하여 얻은 복사할 길이를 임시 공간에 저장하고, 상기 채울 값을 복사 블록 크기 만큼의 레지스터에 복사하는 과정과; 상기 레지스터에 복사해 놓은 값을 블록 단위 입출력 명령을 이용하여 메모리 시작주소로부터 채울 길이 만큼 블록 단위로 차례로 복사하는 과정을 포함하는 정수 및 쇼트 형 메모리 설정 방법을 제공하는데 있다. A feature of the present invention for solving the above object is that after calling a memory setting function including an integer type or a short type value as an argument in a CPU supporting a block unit I / O instruction, Receiving arguments of a length to be filled; Storing the length to be copied obtained by multiplying the length to be filled by the number of bytes to be filled in a temporary space, and copying the value to be filled into a register equal to a copy block size; The present invention provides an integer and short type memory setting method including a step of sequentially copying a value copied to the register in block units by a length to be filled from a memory start address using a block unit input / output command.

여기서, 상기 메모리 설정 함수는, 정수 또는 쇼트 형의 특정 값을 채우고자 하는 메모리 시작주소와, 상기 메모리에 채우고자 하는 정수 또는 쇼트 형의 특정 값이 되는 채울 값과, 상기 메모리에 채우고자 하는 특정 영역의 길이를 해당되는 채울 값의 바이트 수로 나누어 얻은 메모리 길이가 되는 채울 길이를 인수로 포함하는 것을 특징으로 한다.Here, the memory setting function may include a memory start address for filling a specific value of an integer or short type, a value to be filled to be a specific value of an integer or short type to be filled in the memory, and a specific value to be filled in the memory. The length of the area is divided by the number of bytes of the corresponding fill value, and the length to fill the memory length is included as an argument.

그리고, 상기 채울 값을 복사 블록 크기 만큼의 레지스터에 복사하는 과정은, 16 바이트 블록 단위의 복사를 지원하는 명령을 이용하는 경우 4 바이트로 이루어진 4 개의 레지스터에 채울 값을 복사하는 것을 특징으로 한다.The copying of the value to be filled into a register corresponding to a copy block size may include copying a value to be filled into four registers of four bytes when using an instruction supporting copying of a 16-byte block.

또한, 상기 레지스터에 복사해 놓은 값을 블록 단위로 차례로 복사하는 과정은, 인수로 입력받은 메모리 시작주소를 현재 복사할 위치로 지정하는 단계와; 상기 블록 크기 만큼의 레지스터에 복사해 놓은 값을 상기 메모리 시작주소로부터 블록 크기 만큼 복사한 후, 현재 복사할 위치를 상기 복사한 블록 크기 만큼 증가시키는 단계와; 상기 복사할 위치를 증가시킨 후에 채울 길이 만큼 모두 복사했는지 확인하여, 상기 채울 길이 만큼 모두 복사하기까지 상기 블록 크기 만큼의 레지스터에 복사해 놓은 값을 복사 블록 단위로 차례로 복사하는 단계를 포함하는 것을 특징으로 한다. The copying of the values copied to the registers in block units may include: specifying a memory start address received as an argument as a current copying position; Copying a value copied to the register equal to the block size from the memory start address by a block size, and then increasing a current copy position by the copied block size; Checking whether all the copies are copied by the length to be filled after increasing the copy position, and sequentially copying the values copied to the registers corresponding to the block size until copying by the fill length, in the order of copy blocks. It is done.

이하, 본 발명에 따른 실시예를 첨부한 도면을 참조하여 상세하게 설명하면 다음과 같다.Hereinafter, an embodiment according to the present invention will be described in detail with reference to the accompanying drawings.

본 발명에서는 블록 단위 입출력 명령을 지원하는 CPU를 기반으로 하는 시스템에서 메모리의 특정 영역에 특정 값을 채우는데 있어, 정수(int) 형이나 쇼트(short) 형의 값을 인수로 받아들일 수 있는 어셈블리 함수(assembly function)를 새로 구현하고, 해당되는 CPU에서 지원하는 블록 단위 입출력 명령 예컨대, ARM CPU의 STM 명령을 이용하여 블록 단위(16 바이트)로 특정 값을 메모리의 특정 영역에 복사하도록 함으로써 메모리 설정 속도를 향상시키고자 하는데, 이를 위한 정수 및 쇼트 형 메모리 설정 함수는 '함수명(a, b, c)'의 형식으로 구현된다. In the present invention, in order to fill a specific value in a specific area of memory in a CPU-based system supporting a block I / O instruction, an assembly that can accept an integer type or a short type value as an argument. Memory configuration by newly implementing an assembly function and copying a specific value to a specific area of memory in block units (16 bytes) using a block unit I / O instruction supported by a corresponding CPU, for example, an STM instruction of an ARM CPU. In order to improve speed, integer and short type memory setting functions are implemented in the form of 'function name (a, b, c)'.

여기서, 메모리 설정 함수에서 이용되는 각 인수를 설명하면, 'a'는 특정 값을 채우고자 하는 메모리 시작주소를 나타내고, 'b'는 채울 값으로서 메모리에 채우고자 하는 정수 또는 쇼트 형의 특정 값을 나타내며, 'c'는 채울 길이로서 메모리에 채우고자 하는 특정 영역의 길이를 해당되는 채울 값의 바이트 수(정수 형의 값인 경우 4 바이트, 쇼트 형의 값인 경우 2 바이트)로 나누어 얻은 메모리 길이를 나타낸다.Here, when describing each argument used in the memory setting function, 'a' represents the memory starting address to fill a specific value, 'b' is a value to fill the specific value of the integer or short type to fill the memory. 'C' is the length to fill, and indicates the memory length obtained by dividing the length of a specific area to be filled into the memory by the number of bytes of the corresponding value (4 bytes for the integer type value and 2 bytes for the short type value). .

한편, 본 발명의 실시예에 따른 ARM CPU 기반 시스템에서 상술한 메모리 설정 함수를 이용한 정수 및 쇼트 형 메모리 설정 동작을 첨부한 도면 도 1을 참조하여 설명하면 다음과 같다.On the other hand, in the ARM CPU based system according to an embodiment of the present invention will be described with reference to Figure 1 attached to the integer and short-type memory setting operation using the above-described memory setting function as follows.

먼저, 메모리의 특정 영역에 정수 형이나 쇼트 형의 특정 값을 채우고자 하는 경우 APM CPU에서는 해당되는 메모리 설정 함수를 호출한 후, 그 메모리 설정 함수에 필요한 인수 즉, 메모리 시작주소와 채울 값 및 채울 길이 정보를 입력받게 된다(스텝 S11). First, if you want to fill a specific value of integer type or short type in a specific area of memory, the APM CPU calls the corresponding memory setting function, and then the arguments necessary for the memory setting function, that is, the memory start address and the value to fill and fill Length information is input (step S11).

그리고, 앞에서 입력받은 채울 값이 정수 형인지, 쇼트 형인지에 따라 채울 길이에 해당되는 채울 값의 바이트 수를 곱하여 얻은 복사할 길이를 임시 공간에 저장하게 되는데(스텝 S12), 이때 채울 값이 정수 형인 경우에는 바이트 수가 '4' 이므로 복사할 길이는 '채울 길이*4'가 되고, 채울 값이 쇼트 형인 경우에는 바이트 수가 '2' 이므로 복사할 길이는 '채울 길이*2'가 된다.Then, depending on whether the value to be filled in is an integer type or a short type, the length to be copied is obtained by multiplying the number of bytes corresponding to the length to be filled in the temporary space (step S12). In case of type, the number of bytes is '4', so the length to be copied is 'fill length * 4'. In case of short type, the number of bytes is '2', so the length to be copied is 'length to fill * 2'.

또한, 복사할 길이를 임시 공간에 저장한 후에는 앞에서 입력받은 채울 값을 블록 단위 입출력 명령인 STM 명령을 이용하여 복사하기 위해서 4 개의 레지스터에 해당되는 채울 값을 복사하게 된다(스텝 S13). 이때 1 개의 레지스터는 4 바이트로 이루어져 있으며, STM 명령을 이용하여 블록 단위로 복사하는 경우 한번에 16 바이트씩 복사하기 때문에 4 바이트로 이루어진 4 개의 레지스터에 채울 값을 복사하게 된다.In addition, after storing the length to be copied in the temporary space, the values to be filled corresponding to the four registers are copied to copy the previously input values to be filled using the STM instruction, which is a block input / output instruction (step S13). At this time, one register is composed of 4 bytes. When copying by block using STM instruction, 16 bytes are copied at one time. Therefore, the value to be filled in 4 registers of 4 bytes is copied.

이후, ARM CPU에서는 앞에서 입력받은 메모리 시작주소를 현재 복사할 위치로 지정한 후(스텝 S14), 4 개의 레지스터에 복사해 놓은 값을 지정된 위치로부터 16 바이트씩 차례로 복사하게 된다.After that, the ARM CPU designates the memory start address previously input as the current copy position (step S14), and then copies the values copied to the four registers in sequence of 16 bytes from the designated position.

즉, 4 개의 레지스터에 복사해 놓은 값을 메모리 시작주소로부터 16 바이트 만큼 복사한 후(스텝 S15), 현재 복사할 위치를 16 바이트 만큼 증가시켜서 다시 4 개의 레지스터에 복사해 놓은 값을 복사하는 동작을 반복 수행함으로써 4 개의 레지스터에 복사해 놓은 값을 16 바이트씩 메모리의 특정 영역에 차례로 복사하게 된다.That is, after copying the values copied to the four registers by 16 bytes from the memory start address (step S15), the operation to copy the values copied to the four registers by increasing the current copying position by 16 bytes is performed. By repeating, the values copied to four registers are copied to specific areas of memory in sequence of 16 bytes.

이때, 4 개의 레지스터에 복사해 놓은 값을 메모리에 16 바이트 만큼 복사한 후에는 현재 복사할 위치를 16 바이트 만큼 증가시키게 되며(스텝 S16), 이렇게 복사할 위치를 블록 크기인 16 바이트 만큼 증가시킨 후에는 앞에서 입력받은 채울 길이 만큼 모두 복사했는지를 확인하여(스텝 S17), 채울 길이 만큼 모두 복사하기까지 상술한 4 개의 레지스터에 복사해 놓은 값을 블록 단위(16 바이트)로 차례로 복사하는 스텝 S15 및 S16의 동작을 반복 수행하게 되며, 채울 길이 만큼 모두 복사한 후에는 해당되는 정수 또는 쇼트 형의 특정 값(채울 값)을 메모리의 특정 영역에 채우는 메모리 설정 동작을 종료하게 된다.At this time, after copying the values copied to the four registers into the memory by 16 bytes, the current copying position is increased by 16 bytes (step S16), and after this copying position is increased by the block size of 16 bytes Step S15 and S16 checks whether all the copies have been filled in as long as the input length (step S17), and then copies the values copied in the above four registers in block units (16 bytes) until copying all the fill lengths. After repeating all operations as much as the length to be filled, the memory setting operation of filling the specific area (memory value) of the corresponding integer or short type into the specific area of the memory is finished.

예를 들어, ARM CPU 기반 시스템에서 메모리의 '10000' 번지부터 '10048' 번지까지 쇼트 형의 특정 값인 '0x0102'를 채우고자 하는 경우 정수 및 쇼트 형 메모리 설정 함수를 호출한 후에는 메모리 시작주소 '10000', 채울 값 '0x0102', 채울 길이 '24'(즉, 48/2)를 인수로서 입력받게 되며, 이때 복사할 길이는 '48'이 된다.For example, if you want to fill a specific value of '0x0102' of short type from address' 10000 'to' 10048 'in memory on an ARM CPU-based system, the memory start address' 10000 ', the value to fill in' 0x0102 ', and the length to fill in' 24 '(that is, 48/2) are entered as arguments, and the length to copy is' 48'.

그리고, 앞에서 입력받은 채울 값인 '0x0102'를 첨부한 도면 도 2에 도시한 바와 같이 4 바이트로 이루어진 4 개의 레지스터(r0~r3)에 복사한 후, ARM CPU에서는 STM 명령을 이용하여 해당되는 4 개의 레지스터에 복사해 놓은 값을 메모리의 특정 영역에 16 바이트씩 차례로 복사하게 되는데, 이때 4 개의 레지스터에 복사해 놓은 값을 메모리의 특정 영역에 복사하기 이전의 메모리 상황은 첨부한 도면 도 3의 (가)와 같으며, 앞에서 입력받은 메모리 시작주소(10000)를 현재 복사할 위치로 지정한 후에 4 개의 레지스터에 복사해 놓은 값을 해당되는 메모리 시작주소로부터 한번 복사한 후의 메모리 상황은 도 3의 (나)와 같이 된다.After attaching '0x0102', which is the value to be filled in previously, as shown in FIG. 2, after copying it into four registers (r0 to r3) consisting of 4 bytes, the ARM CPU uses four STM instructions. The value copied to the register is copied to the specific area of the memory in order of 16 bytes. In this case, the memory condition before copying the value copied to the four registers to the specific area of the memory is shown in FIG. ), And the memory status after copying the value copied to the four registers once from the corresponding memory start address after designating the memory start address (10000) received as the current copy position is shown in FIG. Becomes

이후, 복사할 위치를 16 바이트씩 증가시키면서 4 개의 레지스터에 복사해 놓은 값을 메모리에 차례로 복사하는 동작을 반복 수행함으로써, 앞에서 입력받은 채울 길이 만큼 4 개의 레지스터에 복사해 놓은 값을 16 바이트씩 반복적으로 복사하게 되며, 이렇게 하여 채울 길이에 해당되는 메모리의 '10048' 번지까지 쇼트 형의 채울 값인 '0x0102'를 모두 복사한 후의 메모리 상황은 도 3의 (다)와 같이 된다.After that, by repeatedly copying the values copied to the four registers into the memory one by one, increasing the copying position by 16 bytes, the values copied to the four registers by the 16-byte length repeatedly are repeated by 16 bytes. In this way, the memory situation after copying all of the short-filled values '0x0102' to the '10048' address of the memory corresponding to the length to be filled is as shown in FIG.

이로써, ARM CPU에서 제공하는 STM 명령을 이용하여 메모리의 특정 영역에 쇼트 형의 특정 값을 복사할 수 있게 되며, 이와 동일한 방법으로 정수 형의 특정 값도 복사할 수 있게 된다.In this way, the specific value of the short type can be copied to a specific area of the memory using the STM instruction provided by the ARM CPU, and the specific value of the integer type can be copied in the same way.

또한, 본 발명에 따른 실시예는 상술한 것으로 한정되지 않고, 본 발명과 관련하여 통상의 지식을 가진자에게 자명한 범위내에서 여러 가지의 대안, 수정 및 변경하여 실시할 수 있는데, 예를 들어, 상술한 실시예에서는 ARM CPU 기반 시스템에서의 메모리 설정에 관하여 설명하고 있으나, ARM CPU가 아닌 다른 CPU를 탑재한 시스템의 경우에도 해당되는 CPU에서 블록 단위의 입출력 명령어를 지원하는 경우 상술한 바와 같은 방법으로 메모리의 특정 영역에 정수 형이나 쇼트 형의 특정 값을 블록 단위로 채울 수 있다. In addition, the embodiment according to the present invention is not limited to the above, and various alternatives, modifications and changes can be made within the scope apparent to those skilled in the art in connection with the present invention, for example In the above-described embodiment, the memory setting in the ARM CPU-based system has been described. However, even in a system equipped with a CPU other than the ARM CPU, the CPU supports the I / O instruction in units of blocks. In this way, a specific value of integer type or short type can be filled in a block unit in a specific area of the memory.

이상과 같이, 본 발명은 ARM CPU와 같이 블록 단위 입출력 명령을 지원하는 CPU를 기반으로 하는 시스템에서 정수 형이나 쇼트 형의 값을 인수로 받아들일 수 있는 정수 및 쇼트 형 메모리 설정 함수를 구현함으로써, 해당되는 CPU에서 지원하는 블록 단위 입출력 명령 예컨대, ARM CPU의 STM 명령을 이용하여 정수 형이나 쇼트 형의 특정 값을 블록 단위로 메모리에 복사할 수 있게 됨에 따라 해당되는 메모리 설정 속도를 향상시킬 수 있게 된다.As described above, the present invention implements an integer and short type memory setting function that can accept an integer type or a short type value as an argument in a system based on a CPU that supports block unit input / output instructions such as an ARM CPU. Block-based I / O instructions supported by the applicable CPU For example, using the STM instructions of the ARM CPU, certain values of integer type or short type can be copied to the memory in block units so that the corresponding memory setting speed can be improved. do.

또한, 본 발명은 정수 형이나 쇼트 형의 특정 값을 블록 단위로 메모리에 복사하여 메모리 설정 속도를 향상시킴으로써, 시스템 성능 개선 및 시스템 이용자가 느끼는 동작 속도 향상 등의 효과를 얻을 수 있게 된다.In addition, the present invention improves the system setting speed and the operation speed felt by the system user by copying a specific value of the integer type or the short type into the memory on a block basis to improve the memory setting speed.

특히, 본 발명은 ARM CPU를 이용하는 이동통신 단말기에 적용하는 경우 속도가 개선됨으로 인해 배터리의 소모량 감소 및 전화수신감도를 향상시킬 수 있게 되고, 또한 화면출력 시간이 개선되므로 이동통신 사업자로부터의 컨텐츠 다운로드 시간을 줄일 수 있어 통신 비용의 절감 효과를 얻을 수 있게 된다.In particular, when the present invention is applied to a mobile communication terminal using an ARM CPU, it is possible to reduce the battery consumption and call reception sensitivity due to the improved speed, and also to improve the screen output time, thereby downloading content from the mobile communication provider. The time can be reduced, thereby reducing the communication cost.

도 1은 본 발명의 실시예에 따른 ARM CPU 기반 시스템에서의 정수 및 쇼트 형 메모리 설정 동작을 도시한 순서도.1 is a flowchart illustrating an integer and short type memory setting operation in an ARM CPU based system according to an exemplary embodiment of the present invention.

도 2는 본 발명의 실시예에서 채울 값(0x0102)을 4 개의 레지스터에 복사한 상태를 예시한 도면.2 is a diagram illustrating a state in which values to be filled (0x0102) are copied into four registers in an embodiment of the present invention.

도 3은 도 2에 예시한 4 개의 레지스터에 복사해 놓은 값을 메모리에 복사하기 이전의 메모리 상황과, 한번 복사한 후의 메모리 상황 및 복사 완료한 후의 메모리 상황을 예시한 도면. FIG. 3 is a diagram illustrating a memory situation before copying values copied to four registers illustrated in FIG. 2 into a memory, a memory situation after one copy, and a memory situation after copying;

Claims (4)

블록 단위 입출력 명령을 지원하는 CPU에서 정수 형이나 쇼트 형의 값을 인수로 포함하는 메모리 설정 함수를 호출한 후에 메모리 시작주소와 채울 값 및 채울 길이의 인수들을 입력받는 과정과;Calling a memory setting function including an integer type or a short type value as an argument in a CPU supporting a block unit input / output instruction and receiving arguments of a memory start address, a value to be filled and a length to be filled; 상기 채울 길이에 채울 값의 바이트 수를 곱하여 얻은 복사할 길이를 임시 공간에 저장하고, 상기 채울 값을 복사 블록 크기 만큼의 레지스터에 복사하는 과정과;Storing the length to be copied obtained by multiplying the length to be filled by the number of bytes to be filled in a temporary space, and copying the value to be filled into a register equal to a copy block size; 상기 레지스터에 복사해 놓은 값을 블록 단위 입출력 명령을 이용하여 메모리 시작주소로부터 채울 길이 만큼 블록 단위로 차례로 복사하는 과정을 포함하는 것을 특징으로 하는 정수 및 쇼트 형 메모리 설정 방법. And copying the values copied to the registers in block units as long as the length to be filled from a memory start address using a block unit input / output command. 제 1항에 있어서,The method of claim 1, 상기 메모리 설정 함수는, 정수 또는 쇼트 형의 특정 값을 채우고자 하는 메모리 시작주소와, 상기 메모리에 채우고자 하는 정수 또는 쇼트 형의 특정 값이 되는 채울 값과, 상기 메모리에 채우고자 하는 특정 영역의 길이를 해당되는 채울 값의 바이트 수로 나누어 얻은 메모리 길이가 되는 채울 길이를 인수로 포함하는 것을 특징으로 하는 정수 및 쇼트 형 메모리 설정 방법. The memory setting function may include a memory start address to fill a specific value of an integer or short type, a value to be filled to be a specific value of an integer or short type to be filled in the memory, and a specific area to be filled in the memory. An integer and short type memory setting method comprising: a length to be filled which is a memory length obtained by dividing the length by the number of bytes of a corresponding value to be filled. 제 1항에 있어서,The method of claim 1, 상기 채울 값을 복사 블록 크기 만큼의 레지스터에 복사하는 과정은, 16 바이트 블록 단위의 복사를 지원하는 명령을 이용하는 경우 4 바이트로 이루어진 4 개의 레지스터에 채울 값을 복사하는 것을 특징으로 하는 정수 및 쇼트 형 메모리 설정 방법. The process of copying the value to be filled into a register corresponding to a copy block size includes copying the value to be filled into four registers of 4 bytes when using an instruction supporting copying of a 16 byte block unit. How to set up memory. 제 1항에 있어서,The method of claim 1, 상기 레지스터에 복사해 놓은 값을 블록 단위로 차례로 복사하는 과정은, 인수로 입력받은 메모리 시작주소를 현재 복사할 위치로 지정하는 단계와;Copying the values copied to the registers in block units may include: designating a memory start address received as an argument as a current copying position; 상기 블록 크기 만큼의 레지스터에 복사해 놓은 값을 상기 메모리 시작주소로부터 블록 크기 만큼 복사한 후, 현재 복사할 위치를 상기 복사한 블록 크기 만큼 증가시키는 단계와;Copying a value copied to the register equal to the block size from the memory start address by a block size, and then increasing a current copy position by the copied block size; 상기 복사할 위치를 증가시킨 후에 채울 길이 만큼 모두 복사했는지 확인하여, 상기 채울 길이 만큼 모두 복사하기까지 상기 블록 크기 만큼의 레지스터에 복사해 놓은 값을 복사 블록 단위로 차례로 복사하는 단계를 포함하는 것을 특징으로 하는 정수 및 쇼트 형 메모리 설정 방법.Checking whether all the copies are copied by the length to be filled after increasing the copy position, and sequentially copying the values copied to the registers corresponding to the block size until copying by the fill length, in the order of copy blocks. Constant and short memory setting method
KR1020030075043A 2003-10-27 2003-10-27 Integer and short type memory setup method KR20050039954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030075043A KR20050039954A (en) 2003-10-27 2003-10-27 Integer and short type memory setup method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030075043A KR20050039954A (en) 2003-10-27 2003-10-27 Integer and short type memory setup method

Publications (1)

Publication Number Publication Date
KR20050039954A true KR20050039954A (en) 2005-05-03

Family

ID=37241870

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030075043A KR20050039954A (en) 2003-10-27 2003-10-27 Integer and short type memory setup method

Country Status (1)

Country Link
KR (1) KR20050039954A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100658918B1 (en) * 2004-03-29 2006-12-15 주식회사 팬택앤큐리텔 Apparatus and method for initialization of system global variables using block input/output command

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100658918B1 (en) * 2004-03-29 2006-12-15 주식회사 팬택앤큐리텔 Apparatus and method for initialization of system global variables using block input/output command
US8627267B2 (en) 2004-03-29 2014-01-07 Pantech Co., Ltd. Apparatus and method for initializing system global variables by using multiple load/store instructions

Similar Documents

Publication Publication Date Title
US7246346B2 (en) System and method for persisting dynamically generated code in a directly addressable and executable storage medium
US20080119178A1 (en) Allocating Compression-Based Firmware Over the Air
JP4376181B2 (en) Program execution processing terminal device
US20050278543A1 (en) Mobile communication terminal and data access control method
JP2005157657A (en) Application data management method for portable terminal and portable terminal
CN107402792B (en) Integration method, device, equipment and storage medium of application software installation package
US20030208748A1 (en) Blocking access to selected APIs
US6560691B2 (en) Modulus address generator and method for determining a modulus address
JPWO2006035658A1 (en) Mobile communication device and application execution environment software for mobile communication device
CN110727469B (en) Terminal device control method and device, application program configuration file packaging method, terminal device and computer readable storage medium
CN110609687A (en) Compiling method, device, electronic equipment and storage medium
US9378002B2 (en) System, method, apparatus and computer program product for providing memory footprint reduction
KR20050039954A (en) Integer and short type memory setup method
KR100247057B1 (en) Apparatus of smart phone
US7590976B2 (en) Compiler program, a computer-readable storage medium storing a compiler program, a compiling method and a compiling unit
CN112035379B (en) Method and device for using storage space, storage medium and electronic device
JP2004030224A (en) Processor, method for retracting register and method for designating register
KR100658918B1 (en) Apparatus and method for initialization of system global variables using block input/output command
WO2018052718A1 (en) Method and apparatus for masking and transmitting data
CN114385174A (en) Compiling method, device, equipment and storage medium of functional module
KR100662291B1 (en) Module program realization method in mobile terminal
RU2390823C2 (en) Compact storage of program code on mobile terminals
CN113703869A (en) Component-based function calling method, device, equipment and storage medium
TW480445B (en) Method for downloading application programs on the compiler system platform of an electronic communication device
US7702890B2 (en) Information processing apparatus and program

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination