KR102151779B1 - Apparatus for data conversion - Google Patents

Apparatus for data conversion Download PDF

Info

Publication number
KR102151779B1
KR102151779B1 KR1020190033538A KR20190033538A KR102151779B1 KR 102151779 B1 KR102151779 B1 KR 102151779B1 KR 1020190033538 A KR1020190033538 A KR 1020190033538A KR 20190033538 A KR20190033538 A KR 20190033538A KR 102151779 B1 KR102151779 B1 KR 102151779B1
Authority
KR
South Korea
Prior art keywords
data
operation unit
stored
format
value
Prior art date
Application number
KR1020190033538A
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 KR1020190033538A priority Critical patent/KR102151779B1/en
Priority to PCT/KR2019/010653 priority patent/WO2020197002A1/en
Application granted granted Critical
Publication of KR102151779B1 publication Critical patent/KR102151779B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising

Abstract

The present invention relates to a device for converting data input in a specific endian format into another endian format. According to an embodiment of the present invention, the data conversion device comprises: a receiving part that receives an address value and a length value from a master device; an operation part that obtains size information and order information of data corresponding to the address value by using a pre-stored help array, obtains conversion target data by using the size information and the order information, and generates conversion data by converting the storage format of the conversion target data from a first format to a second format; and a transmission part that transmits the converted data to the master device. According to the present invention, there is an advantage that a memory having a large storage capacity and a processor having a high processing speed are unnecessary even when storing various sizes of data in a device.

Description

데이터 변환 장치{APPARATUS FOR DATA CONVERSION}Data conversion device {APPARATUS FOR DATA CONVERSION}

본 발명은 데이터 변환 장치에 관한 것으로, 보다 상세하게는 제1 형식으로 입력되는 데이터를 제2 형식으로 변환하는 장치에 관한 것이다.The present invention relates to a data conversion apparatus, and more particularly, to an apparatus for converting data input in a first format into a second format.

엔디안은 컴퓨터의 메모리에 데이터를 저장하는 방식이다. 빅-엔디안 형식은 상위 비트를 낮은 번지에 저장하는 방식이다. 그리고 리틀-엔디안 형식은 상위 비트를 높은 번지에 저장하는 방식이다.Endianness is a way of storing data in a computer's memory. The big-endian format is a method of storing the upper bits in the lower address. And in the little-endian format, the high-order bit is stored in a high address.

제1 장치는 제1 형식, 예를 들어 빅-엔디안 형식으로 데이터를 저장할 수 있다. 반면, 제2 장치, 예를 들어 MCU(Micro Controller Unit)는 내부처리속도를 빠르게 하기 위해서 제2 형식, 예를 들어 리틀-엔디안 형식으로 데이터를 저장할 수 있다. 따라서 제2 장치가 제1 장치의 요청에 의해서 제1 장치로 데이터를 전송할 때, 제2 장치는 제2 형식으로 저장된 데이터를 제1 형식의 데이터로 변환해서 제1 장치에 전송해야 한다. The first device may store data in a first format, for example a big-endian format. On the other hand, the second device, for example, a micro controller unit (MCU), may store data in a second format, for example, a little-endian format to speed up the internal processing speed. Therefore, when the second device transmits data to the first device at the request of the first device, the second device needs to convert the data stored in the second format into data in the first format and transmit it to the first device.

종래에는 제2 장치는 데이터의 크기를 1 바이트, 2 바이트, 4 바이트 또는 8 바이트로 통일하여 저장한다. 그렇지 않으면, 제2 장치는 데이터의 크기를 1 바이트부터 8 바이트까지 다양하게 저장한 후, 제2 장치는 저장된 데이터의 크기에 맞게 일일이 저장 형식을 변환하여 전송한다.Conventionally, the second device unifies and stores the size of data as 1 byte, 2 bytes, 4 bytes, or 8 bytes. Otherwise, the second device variously stores the size of data from 1 byte to 8 bytes, and then the second device converts and transmits each storage format according to the size of the stored data.

개발자가 제2 장치의 내부에 저장한 데이터의 크기를 1 바이트부터 8 바이트까지 다양하게 하는 방식을 채택하면, 제2 장치는 엔디안 변환작업을 각각의 용량을 파악한 후 일일이 해야 한다. 그러므로 제2 장치는 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기를 구비해야 한다. 따라서 개발자가 제2 장치에 다양한 크기로 데이터를 저장하는 방식은 자주 사용하지 않는다.When a developer adopts a method of varying the size of data stored inside the second device from 1 byte to 8 bytes, the second device must perform endian conversion after grasping each capacity. Therefore, the second device must have a memory having a large storage capacity and a processor having a high processing speed. Therefore, the method of storing data in various sizes in the second device by the developer is not often used.

도 1은 종래 기술에 따른 데이터 저장 방식을 표현한 구조체(100)의 예시이다.1 is an example of a structure 100 representing a data storage method according to the prior art.

도 1을 참조하면, 장치는 구조체에 저장하는 모든 데이터를 실제 데이터의 크기와 무관하게 4 바이트의 크기를 가지는 unsigned integer 형태나 float 형태로 변환하여 저장한다. 도 1의 예시에서, 장치는 실제 데이터의 크기가 1 바이트인 TempCount라는 변수(110)나, 실제 데이터의 크기가 2 바이트인 FaultEventCount라는 변수(120)를 4 바이트의 크기를 가지는 unsigned integer 형태로 변환하여 저장한다. 그리고 장치는 4 바이트로 통일시켜서 저장하기 위해 실제 데이터의 크기가 8 바이트인 Life라는 변수(130,140)를 4 바이트의 크기를 가지는 Life_1이라는 변수(130) 및 Life_2라는 변수(140)로 나누어서 unsigned integer 형태로 변환하여 저장한다.Referring to FIG. 1, the device converts all data stored in a structure into an unsigned integer type or a float type having a size of 4 bytes and stores it regardless of the size of the actual data. In the example of FIG. 1, the device converts a variable 110 called TempCount whose size of actual data is 1 byte or a variable called FaultEventCount whose size of actual data is 2 bytes to an unsigned integer type having a size of 4 bytes. And save it. In order to unify and store the data into 4 bytes, the device divides the variable Life_1 (130,140) whose actual data size is 8 bytes into a variable called Life_1 (130) and a variable called Life_2 (140) having a size of 4 bytes, and is in the form of an unsigned integer. And save it.

장치가 데이터의 크기를 4 바이트로 통일시켜 저장하면, 장치는 1 바이트나 2 바이트의 크기를 가지는 데이터를 4 바이트의 크기를 가지는 데이터로 확장시켜 저장한다. 따라서 장치는 실제로 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하는 문제를 가진다.When the device unifies the size of data into 4 bytes and stores it, the device expands and stores data having a size of 1 or 2 bytes into data having a size of 4 bytes. Therefore, the device has a problem of storing data in a memory space larger than the memory space required for actual storage.

또한, 장치는 8 바이트의 크기를 가지는 데이터를 4 바이트의 크기를 가지는 데이터 2개로 분할하여 저장한다. 따라서 장치는 메모리 맵에 별도로 데이터의 크기에 관한 언급해야 하는 문제를 가진다.Also, the device divides and stores data having a size of 8 bytes into two pieces of data having a size of 4 bytes. Therefore, the device has a problem of having to separately mention the size of the data in the memory map.

마지막으로, 장치가 데이터를 통일된 크기로 저장하면, 다른 장치는 데이터를 통일된 크기에 맞추어서 요청해야 한다. 따라서 장치가 다른 장치에도 제약 조건을 발생시키는 문제를 가진다.Finally, if the device stores data in a uniform size, other devices must request the data in a uniform size. Therefore, the device has a problem of creating a constraint condition on other devices.

본 발명은 장치에 데이터의 크기를 다양하게 저장해도 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기가 불필요한 데이터 변환 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a data conversion apparatus that does not require a memory having a large storage capacity and a processor having a high processing speed even when various sizes of data are stored in the apparatus.

또한 본 발명은 장치에 데이터의 크기를 통일시켜 저장하지 않아도 실제로 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하는 문제를 해결하는 데이터 변환 장치를 제공하는 것을 목적으로 한다.Another object of the present invention is to provide a data conversion device that solves the problem of storing data in a memory space larger than a memory space required for actual storage without unifying and storing data in the device.

또한 본 발명은 장치에 데이터의 크기를 통일시켜 저장하지 않아도 메모리 맵에 별도로 데이터의 크기에 관한 언급이 불필요한 데이터 변환 장치를 제공하는 것을 목적으로 한다.Another object of the present invention is to provide a data conversion device that does not require a separate reference to the size of data in a memory map even if the size of data is not unified and stored in the device.

또한 본 발명은 장치에 데이터의 크기를 통일시켜 저장하지 않아도 다른 장치에 데이터를 통일된 크기에 맞추어서 요청해야 하는 제약 조건을 발생시키는 문제를 해결하는 데이터 변환 장치를 제공하는 것을 목적으로 한다. Another object of the present invention is to provide a data conversion device that solves the problem of generating a constraint condition in which data must be requested in accordance with the unified size to another device without unifying and storing the data in the device.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention that are not mentioned can be understood by the following description, and will be more clearly understood by examples of the present invention. In addition, it will be easily understood that the objects and advantages of the present invention can be realized by the means shown in the claims and combinations thereof.

본 발명의 일 실시예에 따른 데이터 변환 장치는, 마스터 장치로부터 주소값 및 길이값을 수신하는 수신부, 미리 저장된 도움 배열을 이용하여 상기 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득하고, 상기 크기 정보 및 상기 순서 정보를 이용하여 변환 대상 데이터를 획득하고, 상기 변환 대상 데이터의 저장 형식을 제1 형식에서 제2 형식으로 변환하여 변환 데이터를 생성하는 연산부, 상기 변환 데이터를 상기 마스터 장치로 송신하는 송신부를 포함한다.A data conversion apparatus according to an embodiment of the present invention acquires size information and order information of data corresponding to the address value by using a receiver for receiving an address value and a length value from a master device, and a pre-stored help array, An operation unit that obtains conversion target data using the size information and the order information, converts a storage format of the conversion target data from a first format to a second format to generate conversion data, and transfers the converted data to the master device. It includes a transmitting unit that transmits.

본 발명의 일 실시예에서, 상기 도움 배열은 각 데이터의 크기 정보 및 순서 정보를 포함하는 2차원 배열일 수 있다.In an embodiment of the present invention, the help arrangement may be a two-dimensional arrangement including size information and order information of each data.

또한 본 발명의 일 실시예에서, 상기 연산부는 상기 주소값 및 상기 길이값을 참조하여 상기 변환 대상 데이터의 시작 데이터 및 종료 데이터를 결정하고, 상기 시작 데이터의 순서 정보를 참조하여 상기 시작 데이터를 변경하고, 상기 종료 데이터의 크기 정보 및 순서 정보를 참조하여 상기 종료 데이터를 변경한다.In addition, in an embodiment of the present invention, the operation unit determines start data and end data of the conversion target data by referring to the address value and the length value, and changes the start data by referring to order information of the start data. Then, the end data is changed by referring to size information and order information of the end data.

또한 본 발명의 일 실시예에서, 상기 연산부는 상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트인 경우, 상기 변환 대상 데이터의 저장 형식을 변경하지 않는다.In addition, in an embodiment of the present invention, when the size information stored in the help array of the conversion target data is 1 byte, the operation unit does not change the storage format of the conversion target data.

또한 본 발명의 일 실시예에서, 상기 연산부는 상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트가 아닌 경우, 상기 변환 대상 데이터가 제1 형식으로 저장될 때의 주소값과 상기 변환 대상 데이터가 제2 형식으로 저장될 때의 주소값의 차이값을 계산하고, 상기 차이값에 기초하여 상기 변환 대상 데이터의 저장 형식을 변경한다.Further, in an embodiment of the present invention, when the size information stored in the help array of the conversion target data is not 1 byte, the conversion target data is stored in the first format and the address value and the conversion target data The difference value of the address value when is stored in the second format is calculated, and the storage format of the converted data is changed based on the difference value.

본 발명에 따르면 장치에 데이터의 크기를 다양하게 저장해도 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기가 불필요한 장점이 있다.According to the present invention, a memory having a large storage capacity and a processor having a high processing speed are unnecessary even when various sizes of data are stored in a device.

또한 본 발명에 따르면 장치에 데이터의 크기를 통일시켜 저장하지 않아도 실제로 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하지 않는 장점이 있다.In addition, according to the present invention, there is an advantage in that data is not stored in a memory space larger than a memory space required for actual storage even if the size of data is not unified and stored in the device.

또한 본 발명에 따르면 장치에 데이터의 크기를 통일시켜 저장하지 않아도 메모리 맵에 별도로 데이터의 크기에 관한 언급이 불필요한 장점이 있다.In addition, according to the present invention, even if the size of data is not unified and stored in the device, there is an advantage that it is unnecessary to mention the size of data separately in the memory map.

또한 본 발명에 따르면 장치에 데이터의 크기를 통일시켜 저장하지 않아도 다른 장치에 데이터를 통일된 크기에 맞추어서 요청해야 하는 제약 조건을 발생시키지 않는 장점이 있다.In addition, according to the present invention, even if the size of the data is not unified and stored in the device, there is an advantage in that a constraint condition in which data must be requested in accordance with the unified size of another device is not generated.

도 1은 종래 기술의 일 실시예에 따른 보편적인 데이터 저장 방식을 표현한 구조체이다.도 1은 종래 기술에 따른 데이터 저장 방식을 표현한 구조체이다.
도 2는 본 발명의 일 실시예에 따른 데이터 변환 장치 및 데이터 변환 장치의 마스터 장치와의 관계를 나타낸다.
도 3은 본 발명의 일 실시예에 따른 데이터 저장 방식을 표현한 구조체 및 도움 배열이다.
도 4는 본 발명의 일 실시예에 따른 데이터 변환 과정을 나타낸 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 변환 대상 데이터를 설정하는 과정을 나타낸 흐름도이다.
도 6은 본 발명의 일 실시예에 따른 도움 배열의 크기 정보 값에 따라 데이터의 저장 형식을 변경하는 과정을 나타낸 흐름도이다.
도 7은 본 발명의 일 실시예에 따른 전체적인 데이터 변환 장치의 동작을 설명하기 위한 모식도이다.
1 is a structure representing a general data storage method according to an embodiment of the prior art. FIG. 1 is a structure representing a data storage method according to the prior art.
2 illustrates a relationship between a data conversion device and a master device of the data conversion device according to an embodiment of the present invention.
3 is a structure and a help arrangement representing a data storage method according to an embodiment of the present invention.
4 is a flowchart showing a data conversion process according to an embodiment of the present invention.
5 is a flowchart illustrating a process of setting data to be converted according to an embodiment of the present invention.
6 is a flowchart illustrating a process of changing a data storage format according to a size information value of a help array according to an embodiment of the present invention.
7 is a schematic diagram for explaining the operation of the overall data conversion apparatus according to an embodiment of the present invention.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.The above-described objects, features, and advantages will be described later in detail with reference to the accompanying drawings, and accordingly, one of ordinary skill in the art to which the present invention pertains will be able to easily implement the technical idea of the present invention. In describing the present invention, if it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the subject matter of the present invention, a detailed description will be omitted. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to indicate the same or similar elements.

도 2는 본 발명의 일 실시예에 따른 데이터 변환 장치 및 데이터 변환 장치의 마스터 장치와의 관계를 나타낸다.2 illustrates a relationship between a data conversion device and a master device of the data conversion device according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 일 실시예에 따른 데이터 변환 장치(210)는 수신부(220), 연산부(230) 및 송신부(240)를 포함한다. 또한 데이터 변환 장치(210)는 마스터 장치(200)와 통신을 통해 데이터를 주고 받는다.Referring to FIG. 2, a data conversion apparatus 210 according to an embodiment of the present invention includes a reception unit 220, an operation unit 230, and a transmission unit 240. In addition, the data conversion device 210 exchanges data with the master device 200 through communication.

참고로 이하에서는 마스터 장치(200)가 데이터 변환 장치(210)에 빅-엔디안 형식의 데이터 송신을 요청하고, 데이터 변환 장치(210)는 리틀-엔디안 형식으로 저장된 데이터를 빅-엔디안 형식으로 변환하는 실시예를 기초로 본 발명의 구성이 설명된다. 그러나 본 발명의 다른 실시예에서는 마스터 장치(200)가 데이터 변환 장치(210)에 리틀-엔디안 형식의 데이터 송신을 요청하고, 데이터 변환 장치(210)는 빅-엔디안 형식으로 저장된 데이터를 리틀-엔디안 형식으로 변환할 수 있다.For reference, hereinafter, the master device 200 requests the data conversion device 210 to transmit data in a big-endian format, and the data conversion device 210 converts the data stored in the little-endian format into a big-endian format. The configuration of the present invention will be described on the basis of examples. However, in another embodiment of the present invention, the master device 200 requests the data conversion device 210 to transmit data in a little-endian format, and the data conversion device 210 stores data stored in a big-endian format in a little-endian format. Can be converted to format.

마스터 장치(200)는 데이터 변환 장치(210)에 주소값과 길이값을 이용하여 데이터를 요청한다. 그리고 마스터 장치(200)는 데이터 변환 장치(210)로부터 요청한 데이터를 받는다.The master device 200 requests data from the data conversion device 210 using an address value and a length value. In addition, the master device 200 receives the requested data from the data conversion device 210.

수신부(220)는 마스터 장치(200)로부터 필요한 데이터에 관한 주소값 및 길이값을 수신한다. The receiving unit 220 receives an address value and a length value for required data from the master device 200.

연산부(230)는 수신부(220)로부터 마스터 장치(200)가 요청한 데이터에 관한 정보인 주소값과 길이값을 받는다. 또한, 연산부(230)는 마스터 장치(200)로 송신할 데이터를 생성한다.The operation unit 230 receives an address value and a length value, which are information about data requested by the master device 200 from the receiving unit 220. In addition, the operation unit 230 generates data to be transmitted to the master device 200.

상세히, 연산부(230)는 데이터와 함께 미리 저장되어 있는 도움 배열을 이용하여 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득한다. 그 후, 연산부(230)는 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 획득한다. 그 후, 연산부(230)는 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환하여서 마스터 장치(200)에 송신할 변환 데이터를 생성한다.In detail, the operation unit 230 obtains size information and order information of data corresponding to the address value by using the help array previously stored together with the data. Thereafter, the operation unit 230 obtains the data to be converted using size information and order information. Thereafter, the operation unit 230 converts the storage format of the data to be converted into a big-endian format to generate converted data to be transmitted to the master device 200.

송신부(240)는 연산부(230)로부터 마스터 장치(200)가 요청한 데이터를 받아서 마스터 장치(200)로 송신한다.The transmission unit 240 receives data requested by the master device 200 from the operation unit 230 and transmits the data to the master device 200.

도 3은 본 발명의 일 실시예에 따른 데이터 저장 방식을 표현한 구조체(300) 및 도움 배열(310)이다.3 is a structure 300 and a help arrangement 310 representing a data storage method according to an embodiment of the present invention.

도 3을 참조하면, 구조체(300)는 1 바이트 크기를 가지는 TempCount(340), 2 바이트 크기를 가지는 FaultEventCount(350), 4 바이트 크기를 가지는 OpDuration(360), 4 바이트 크기를 가지는 IA(370) 및 8 바이트 크기를 가지는 Life(380)에 관한 데이터를 가진다.Referring to FIG. 3, the structure 300 includes TempCount 340 having a size of 1 byte, FaultEventCount 350 having a size of 2 bytes, OpDuration 360 having a size of 4 bytes, and IA 370 having a size of 4 bytes. And data on Life 380 having a size of 8 bytes.

여기서 TempCount(340), FaultEventCount(350), OpDuration(360) 등과 같이 하나의 자료가 여러 개의 주소에 나뉘어서 저장되기 전의 데이터 전체를 데이터 묶음이라고 정의한다.Here, the entire data before the data is divided into several addresses such as TempCount (340), FaultEventCount (350), and OpDuration (360) is defined as a data bundle.

구조체(300)와 대응되는 도움 배열(310)은 구조체(300)에 저장된 데이터의 크기 정보 및 순서 정보를 가진다. 즉, 도움 배열(310)은 2차원 배열의 형태를 가진다.The help arrangement 310 corresponding to the structure 300 has size information and order information of data stored in the structure 300. That is, the help arrangement 310 has a form of a two-dimensional arrangement.

상세히, 1 바이트의 크기인 TempCount(340)에 관하여 도움 배열(310)은 {_UINT8_W, 0}(341)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.In detail, with respect to the TempCount 340 which is a size of 1 byte, the help array 310 has size information and order information in 1-byte units, such as {_UINT8_W, 0} (341).

2 바이트의 크기인 FaultEventCount(350)에 관하여 도움배열(310)은 {_UINT16_W, 0}(351) 및 {_UINT16_W, 1}(352)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.With respect to the FaultEventCount 350, which is a size of 2 bytes, the help array 310 has size information and order information in units of 1 byte, such as {_UINT16_W, 0} (351) and {_UINT16_W, 1} (352).

4 바이트의 크기인 OpDuration(360) 에 관하여 도움배열(310)은 {_UINT32_W, 0}(361), {_UINT32_W, 1}(362), {_UINT32_W, 2}(363) 및 {_UINT32_W, 3}(364)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.For OpDuration(360), which is 4 bytes in size, the help array 310 is {_UINT32_W, 0}(361), {_UINT32_W, 1}(362), {_UINT32_W, 2}(363) and {_UINT32_W, 3}( 364), it has size information and order information in 1 byte unit.

마찬가지로 4 바이트의 크기인 IA(370) 에 관하여 도움배열(310)은 {_UINT32_W, 0}(371), {_UINT32_W, 1}(372), {_UINT32_W, 2}(373) 및 {_UINT32_W, 3}(374)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.Similarly, for IA(370), which is 4 bytes in size, the help array 310 is {_UINT32_W, 0}(371), {_UINT32_W, 1}(372), {_UINT32_W, 2}(373) and {_UINT32_W, 3} Like (374), it has size information and order information in 1 byte unit.

마지막으로 8 바이트의 크기인 Life(380) 에 관하여 도움배열(310)은 {_UINT64_W, 0}(371), {_UINT64_W, 1}(372), {_UINT64_W, 2}(373), {_UINT64_W, 3}(374){_UINT64_W, 4}(375), {_UINT64_W, 5}(376), {_UINT64_W, 6}(377) 및 {_UINT64_W, 7}(378)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.Finally, for Life(380), which is 8 bytes, the help array 310 is {_UINT64_W, 0}(371), {_UINT64_W, 1}(372), {_UINT64_W, 2}(373), {_UINT64_W, 3 Size and order information in 1-byte units, such as }(374){_UINT64_W, 4}(375), {_UINT64_W, 5}(376), {_UINT64_W, 6}(377) and {_UINT64_W, 7}(378) Have.

또한 도움 배열에 대한 정보를 주는 구조체(320)에는 도움 배열(310)이 가지고 있는 데이터의 크기 정보(321)와 순서 정보(322)가 선언된다.In addition, the size information 321 and order information 322 of the data contained in the help array 310 are declared in the structure 320 giving information on the help array.

또한 열거형(330)에는 도움 배열(310)에 저장될 크기 정보에 대한 값이 1 바이트는 0, 2 바이트는 1, 4 바이트는 2 및 8 바이트는 3과 같이 선언된다.In addition, in the enumerated type 330, the value of the size information to be stored in the help array 310 is declared as 0 for 1 byte, 1 for 2 bytes, 2 for 4 bytes, and 3 for 8 bytes.

도 4는 본 발명의 일 실시예에 따른 데이터 변환 과정을 나타낸 흐름도이다.4 is a flowchart showing a data conversion process according to an embodiment of the present invention.

도 4를 참조하면, 마스터 장치(200)가 데이터 변환 장치(210)로 데이터의 주소값 및 길이값을 보낸다. 수신부(220)는 데이터의 주소값 및 길이값을 수신한다(400).Referring to FIG. 4, the master device 200 transmits an address value and a length value of data to the data conversion device 210. The receiver 220 receives an address value and a length value of data (400).

그리고 나서, 연산부(230)는 수신부(220)로부터 데이터의 주소값 및 길이값을 받는다. 연산부(230)는 도움 배열(310)을 이용하여 주소값에 대응하는 데이터의 크기 정보 및 순서 정보를 획득한다(410).Then, the calculating unit 230 receives the address value and the length value of the data from the receiving unit 220. The operation unit 230 obtains size information and order information of data corresponding to the address value by using the help array 310 (410).

그리고 나서, 연산부(230)는 데이터의 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 획득한다(420). 연산부(230)는 마스터 장치(200)로부터 수신한 주소값 및 길이값을 참조하여 시작 데이터 및 종료 데이터를 결정한다. 그 후, 연산부(230)는 시작 데이터의 순서 정보가 0인지를 판단한다. 연산부(230)는 상기 판단 결과를 이용하여 시작 데이터를 설정한다. 그 후, 연산부(230)는 종료 데이터의 크기 정보가 가질 수 있는 순서 정보의 최대값을 구한다. 연산부(230)는 상기 최대값과 종료 데이터의 순서 정보를 비교하여 종료 데이터를 설정한다. 그 후, 연산부(230)는 설정된 시작 데이터와 종료 데이터를 이용하여 변환 대상 데이터를 설정한다.Then, the operation unit 230 obtains the data to be converted by using the size information and order information of the data (420). The operation unit 230 determines start data and end data by referring to the address value and length value received from the master device 200. After that, the operation unit 230 determines whether the order information of the start data is 0. The calculation unit 230 sets start data using the determination result. After that, the operation unit 230 obtains a maximum value of order information that the size information of the end data can have. The operation unit 230 compares the maximum value and order information of the end data to set end data. After that, the operation unit 230 sets the conversion target data using the set start data and end data.

연산부(230)가 변환 대상 데이터를 설정하는 과정은 도 5에 상세히 도시되어 있는 바, 아래에서 상술하도록 한다.The process of setting the data to be converted by the operation unit 230 is shown in detail in FIG. 5 and will be described in detail below.

그리고 나서, 연산부(230)는 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환한다(430). 연산부(230)는 변환 대상 데이터의 도움 배열에 저장된 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 변환한다.Then, the operation unit 230 converts the storage format of the data to be converted into a big-endian format (430). The operation unit 230 converts the data to be converted using size information and order information stored in the help array of the data to be converted.

연산부(230)가 변환 대상 데이터를 변환하는 과정은 도 6에 상세히 도시되어 있는 바, 아래에서 상술하도록 한다.The process of converting the data to be converted by the operation unit 230 is illustrated in detail in FIG. 6, and will be described in detail below.

마지막으로, 데이터 변환 장치(210)는 연산부(230)가 변환한 데이터를 송신부(240)를 이용하여 마스터 장치(200)로 송신한다(440).Finally, the data conversion device 210 transmits the data converted by the calculation unit 230 to the master device 200 using the transmission unit 240 (440).

도 5는 본 발명의 일 실시예에 따른 변환 대상 데이터를 설정하는 과정(420)을 나타낸 흐름도이다.5 is a flowchart illustrating a process 420 of setting data to be converted according to an embodiment of the present invention.

도 5를 참조하면, 연산부(230)는 마스터 장치(200)로부터 받은 주소값 및 길이값을 이용하여 시작 데이터 및 종료 데이터를 설정한다(500). 구체적으로, 연산부(230)는 마스터 장치(200)로부터 받은 주소값에 저장된 데이터를 시작 데이터로 설정한다. 또한 연산부(230)는 시작 데이터의 주소값에 길이값을 더한 후, 상기 주소값에 -1을 더한 주소값에 저장된 데이터를 종료 데이터로 설정한다.Referring to FIG. 5, the operation unit 230 sets start data and end data using an address value and a length value received from the master device 200 (500 ). Specifically, the operation unit 230 sets the data stored in the address value received from the master device 200 as start data. In addition, the operation unit 230 adds a length value to the address value of the start data, and then sets data stored in the address value obtained by adding -1 to the address value as the end data.

만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 -1을 더하는 것이 아니라 상기 주소값의 차이만큼의 음수 값을 더한 값을 종료 데이터로 설정한다.If the address value difference between the stored data and the next stored data is not 1, the operation unit 230 does not add -1 to the address value, but sets a value obtained by adding a negative value equal to the difference between the address value as the end data. do.

그리고 나서, 연산부(230)는 시작 데이터에 대응되는 도움 배열(310)에 저장된 시작 데이터의 순서 정보가 0인지를 확인한다(510). 시작 데이터의 순서 정보가 0이면, 시작 데이터는 저장된 데이터가 몇 바이트의 데이터 묶음에 포함되는 지와 관계없이 데이터 묶음의 가장 처음 저장된 데이터이다. 따라서 연산부(230)는 시작 데이터의 변경 없이 다음 단계(520)로 넘어간다.Then, the operation unit 230 checks whether the order information of the start data stored in the help array 310 corresponding to the start data is 0 (510). If the sequence information of the start data is 0, the start data is the first stored data of the data bundle regardless of how many bytes of the stored data are included in the data bundle. Therefore, the operation unit 230 proceeds to the next step 520 without changing the start data.

만일, 시작 데이터의 순서 정보가 0이 아니면, 시작 데이터는 데이터 묶음의 가장 처음 저장된 데이터가 아니다. 따라서 연산부(230)는 시작 데이터의 재설정을 한다. 그 방법으로, 연산부(230)는 시작 데이터의 주소값에 -1을 더한다(511). 그리고 나서 연산부(230)는 주소값에 저장된 데이터를 시작 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 시작 데이터가 올바른 값인지 확인하는 단계(510)를 반복한다.If the order information of the start data is not 0, the start data is not the first data stored in the data bundle. Therefore, the operation unit 230 resets the start data. In that way, the operation unit 230 adds -1 to the address value of the start data (511). Then, the operation unit 230 sets the data stored in the address value as start data. Thereafter, the operation unit 230 repeats step 510 of checking whether the reset start data is a correct value.

만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 -1을 더하는 것이 아니라 상기 주소값의 차이만큼의 음수 값을 더한 값을 시작 데이터로 설정한다.If the difference in the address value between the stored data and the next stored data is not 1, the operation unit 230 does not add -1 to the address value, but sets a value obtained by adding a negative value equal to the difference between the address value as the start data. do.

그리고 나서 연산부(230)는 종료 데이터에 대응되는 도움 배열(310)에 저장된 종료 데이터의 크기 정보를 확인한다. 그리고 나서 연산부(230)는 크기 정보와 같이 저장된 순서 정보가 가질 수 있는 최대값(A)을 구한다. 그 후, 연산부(230)는 최대값(A)이 종료 데이터에 대응되는 도움 배열(310)에 저장된 종료 데이터의 순서 정보(B)와 동일한지 여부를 판단한다(520). 연산부(230)가 판단한 결과 A와 B가 동일하면, 종료 데이터는 저장된 데이터가 몇 바이트의 데이터 묶음에 포함되는 지와 관계없이 데이터 묶음의 가장 마지막 저장된 데이터이다. 따라서 연산부(230)는 종료 데이터의 변경 없이 다음 단계(530)로 넘어간다.Then, the operation unit 230 checks the size information of the end data stored in the help array 310 corresponding to the end data. Then, the operation unit 230 obtains the maximum value A that the stored order information, such as size information, can have. Thereafter, the operation unit 230 determines whether the maximum value A is the same as the order information B of the end data stored in the help array 310 corresponding to the end data (520). If the calculation unit 230 determines that A and B are the same, the end data is the last stored data of the data bundle, regardless of how many bytes of the stored data are included in the data bundle. Therefore, the operation unit 230 proceeds to the next step 530 without changing the end data.

만일, 연산부(230)가 판단한 결과 A와 B가 동일하지 않으면, 종료 데이터는 데이터 묶음의 가장 마지막에 저장된 데이터가 아니다. 따라서 연산부(230)는 종료 데이터의 재설정을 한다. 그 방법으로, 연산부(230)는 종료 데이터의 주소값에 1을 더한다(521). 그리고 나서 연산부(230)는 주소값에 저장된 데이터를 종료 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 종료 데이터가 올바른 값인지 확인하는 단계(520)를 반복한다.If, as a result of the determination by the operation unit 230, A and B are not the same, the end data is not the last data stored in the data bundle. Therefore, the operation unit 230 resets the end data. In that way, the operation unit 230 adds 1 to the address value of the end data (521). Then, the operation unit 230 sets the data stored in the address value as end data. Thereafter, the operation unit 230 repeats step 520 of checking whether the reset end data is a correct value.

만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 1을 더하는 것이 아니라 상기 주소값의 차이만큼의 값을 더한 값을 종료 데이터로 설정한다.If the difference in the address value between the stored data and the next stored data is not 1, the operation unit 230 does not add 1 to the address value, but sets a value obtained by adding a value equal to the difference between the address value as the end data.

마지막으로, 연산부(230)는 설정된 시작 데이터 및 종료 데이터를 양 끝으로 하는 변환 대상 데이터를 설정한다(530).Finally, the operation unit 230 sets conversion target data including the set start data and end data as both ends (530).

도 6은 본 발명의 일 실시예에 따른 도움 배열의 크기 정보 값에 따라 데이터의 저장 형식을 변경하는 과정(430)을 나타낸 흐름도이다.6 is a flowchart illustrating a process 430 of changing a data storage format according to a size information value of a help array according to an embodiment of the present invention.

도 6을 참조하면, 연산부(230)는 변환 대상 데이터에 대응 되는 도움 배열(310)에 저장된 크기 정보를 이용하여 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환한다. 연산부(230)는 변환 대상 데이터의 시작 데이터부터 종료 데이터까지 1 바이트씩 변환한다. 참고로, 크기 정보에 저장되는 값은 도 3의 열거체(330)를 통해 선언된 값이다.Referring to FIG. 6, the operation unit 230 converts the storage format of the conversion target data into a big-endian format using size information stored in the help array 310 corresponding to the conversion target data. The operation unit 230 converts the conversion target data from start data to end data by 1 byte. For reference, a value stored in the size information is a value declared through the enum 330 of FIG. 3.

첫 단계로, 연산부(230)는 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 0인지를 확인한다(600). 크기 정보가 0이면, 연산부(230)는 데이터를 1 바이트 크기인 데이터로 인식한다. 1 바이트 데이터는 저장 형식이 리틀-엔디안 형식인지 빅-엔디안 형식인지와 무관하게 저장되는 방법이 같다. 따라서 연산부(230)는 데이터의 저장형식을 변경하지 않는다(601).As a first step, the operation unit 230 checks whether the size information stored in the help array 310 of the data to be converted is 0 (600). If the size information is 0, the operation unit 230 recognizes the data as data having a size of 1 byte. One-byte data is stored in the same way regardless of whether the storage format is a little-endian format or a big-endian format. Accordingly, the operation unit 230 does not change the data storage format (601).

만일, 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 0이 아니면, 연산부(230)는 다음 단계(610)로 넘어간다. 연산부(230)는 변환하려는 데이터의 도움 배열(310)의 크기 정보가 1인지를 확인한다(610). 크기 정보가 1이면, 데이터는 전체 크기가 2 바이트인 데이터 묶음 중 1 바이트이다. 2 바이트 데이터가 리틀-엔디안 형식으로 저장되는 경우와 빅-엔디안 형식으로 저장되는 경우를 비교하면, 2 바이트 데이터는 저장되는 순서가 다르다. 따라서 연산부(230)는 변환하려는 데이터가 포함되는 데이터 묶음을 파악한다. 그 후, 연산부(230)는 도움 배열(310)의 순서 정보를 확인한다. 변환하려는 데이터의 순서 정보가 0이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 1인 데이터가 가진 값으로 변경한다. 만일, 변환하려는 데이터의 순서 정보가 1이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 0인 데이터가 가진 값으로 변경한다 (611).If the size information stored in the help array 310 of the data to be converted is not 0, the operation unit 230 proceeds to the next step 610. The operation unit 230 checks whether the size information of the help array 310 of the data to be converted is 1 (610). If the size information is 1, the data is 1 byte in a data bundle having a total size of 2 bytes. Comparing the case where 2-byte data is stored in the little-endian format and the case where it is stored in the big-endian format, the order in which 2-byte data is stored is different. Accordingly, the operation unit 230 identifies a data bundle containing the data to be converted. After that, the operation unit 230 checks the order information of the help arrangement 310. If the order information of the data to be converted is 0, the operation unit 230 changes the stored value to a value of the data having the order information of 1 in the data bundle. If the order information of the data to be converted is 1, the operation unit 230 changes the stored value to a value of the data whose order information is 0 in the data bundle (611).

만일, 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 1이 아니면, 연산부(230)는 다음 단계(620)로 넘어간다. 연산부(230)는 변환하려는 데이터의 도움 배열(310)의 크기 정보가 2인지를 확인한다. 크기 정보가 2이면, 데이터는 전체 크기가 4 바이트인 데이터 묶음 중 1 바이트이다. 4 바이트 데이터가 리틀-엔디안 형식으로 저장되는 경우와 빅-엔디안 형식으로 저장되는 경우를 비교하면, 4 바이트 데이터는 저장되는 순서가 다르다. 따라서 연산부(230)는 변환하려는 데이터가 포함되는 데이터 묶음을 파악한다. 그 후, 연산부(230)는 도움 배열(310)의 순서 정보를 확인한다. 변환하려는 데이터의 순서 정보가 0이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 3인 데이터가 가진 값으로 변경한다. 만일, 변환하려는 데이터의 순서 정보가 1이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 2인 데이터가 가진 값으로 변경한다. 만일, 변환하려는 데이터의 순서 정보가 2이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 1인 데이터가 가진 값으로 변경한다. 만일, 변환하려는 데이터의 순서 정보가 3이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 0인 데이터가 가진 값으로 변경한다 (621).If the size information stored in the help array 310 of the data to be converted is not 1, the operation unit 230 proceeds to the next step 620. The operation unit 230 checks whether the size information of the help array 310 of the data to be converted is 2. If the size information is 2, the data is 1 byte of a data bundle having a total size of 4 bytes. Comparing the case where 4-byte data is stored in the little-endian format and the case where it is stored in the big-endian format, the order in which 4-byte data is stored is different. Accordingly, the operation unit 230 identifies a data bundle containing the data to be converted. After that, the operation unit 230 checks the order information of the help arrangement 310. If the order information of the data to be converted is 0, the operation unit 230 changes the stored value to a value of the data having order information of 3 in the data bundle. If the order information of the data to be converted is 1, the operation unit 230 changes the stored value to a value of the data whose order information is 2 in the data bundle. If the order information of the data to be converted is 2, the operation unit 230 changes the stored value to a value of the data whose order information is 1 in the data bundle. If the order information of the data to be converted is 3, the operation unit 230 changes the stored value to a value of the data whose order information is 0 in the data bundle (621).

도 6은 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 2인 때까지만 도시한다. 만일, 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 2 이상이면, 연산부(230)는 다음 단계(미도시)로 넘어간다. 연산부(230)는 생략된 단계에서도 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보 및 순서 정보를 이용하여 데이터의 저장 형식을 변경한다.6 shows only until the size information stored in the help array 310 of the data to be converted is 2. If the size information stored in the help array 310 of the data to be converted is 2 or more, the operation unit 230 proceeds to the next step (not shown). Even in an omitted step, the operation unit 230 changes the storage format of the data by using the size information and order information stored in the help array 310 of the data to be converted.

도 7은 본 발명의 일 실시예에 따른 전체적인 데이터 변환 장치의 동작을 설명하기 위한 모식도이다.7 is a schematic diagram for explaining the operation of the overall data conversion apparatus according to an embodiment of the present invention.

도 7을 참조하면, 마스터 장치(200)가 주소값을 a+1, 길이값을 5로 하여 데이터 변환 장치(210)에 데이터를 요청한다(700).Referring to FIG. 7, the master device 200 requests data from the data conversion device 210 with an address value of a+1 and a length value of 5 (700).

그 후, 수신부(220)는 주소값인 a+1 및 길이값인 5를 수신한다.After that, the receiver 220 receives the address value a+1 and the length value 5.

그 후, 연산부(230)는 주소값인 a+1에 해당되는 데이터에 대응되는 도움 배열(310)의 크기 정보인 2 및 순서 정보인 1을 획득한다. 연산부(230)는 주소값인 a+1에서 다음 주소로 넘어가면서 수신한 길이값에 해당하는 횟수인 5회동안 반복한다. 즉, 연산부(230)는 주소값이 a+5가 될 때까지 반복한다. After that, the operation unit 230 obtains 2 which is size information of the help array 310 and 1 which is order information corresponding to the data corresponding to the address value a+1. The operation unit 230 repeats 5 times, which is the number of times corresponding to the received length value while passing from the address value a+1 to the next address. That is, the operation unit 230 repeats until the address value becomes a+5.

그 후, 연산부(230)는 주소값 a+1에 저장된 값인 0D를 초기 설정 시작 데이터(712)로 설정한다. 그리고 나서 연산부(230)는 주소값 a+5에 저장된 값인 07을 초기 설정 종료 데이터(713)로 설정한다.Thereafter, the operation unit 230 sets 0D, which is a value stored in the address value a+1, as the initial setting start data 712. Then, the calculation unit 230 sets 07, which is the value stored in the address value a+5, as the initial setting end data 713.

초기 설정 시작 데이터(712) 및 초기 설정 종료 데이터(713)의 순서 정보 및 크기 정보를 이용하여 변경된 시작 데이터 및 종료 데이터를 설정한다.The changed start data and end data are set using order information and size information of the initial setting start data 712 and the initial setting end data 713.

상세히, 초기 설정 시작 데이터(712)의 순서 정보는 1이다. 따라서 연산부(230)는 초기 설정 시작 데이터(712)가 데이터 묶음 내에서 가장 처음 데이터가 아니라고 판단한다. 그 결과, 연산부(230)는 시작 데이터의 재설정을 한다. 연산부(230)는 초기 설정 시작 데이터(712)의 주소값에 -1을 더한다. 그 후, 연산부(230)는 -1을 더한 주소값인 a에 저장된 데이터(711)를 시작 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 시작 데이터(711)가 올바른 값인지 판단한다. 재설정된 시작 데이터(711)는 순서 정보가 0이다. 따라서 연산부(230)는 재설정된 시작 데이터(711)가 데이터 묶음 내에서 가장 처음 저장된 데이터라고 판단한다. 그 후, 연산부(230)는 재설정된 시작 데이터(711)를 변경된 시작 데이터로 설정한다.In detail, the order information of the initial setting start data 712 is 1. Therefore, the calculation unit 230 determines that the initial setting start data 712 is not the first data in the data bundle. As a result, the operation unit 230 resets the start data. The operation unit 230 adds -1 to the address value of the initial setting start data 712. Thereafter, the operation unit 230 sets the data 711 stored in the address value a plus -1 as the start data. After that, the operation unit 230 determines whether the reset start data 711 is a correct value. The order information of the reset start data 711 is 0. Therefore, the operation unit 230 determines that the reset start data 711 is the first data stored in the data bundle. Thereafter, the operation unit 230 sets the reset start data 711 as the changed start data.

또한, 초기 설정 종료 데이터(713)의 크기 정보는 1이다. 따라서 초기 설정 종료 데이터(713)는 2 바이트의 크기를 가지는 데이터 묶음의 일부이다.Also, the size information of the initial setting end data 713 is 1. Therefore, the initial setting end data 713 is a part of a data bundle having a size of 2 bytes.

또한, 초기 설정 종료 데이터(713)의 순서 정보는 0이다. 따럿 연산부(230)는 초기 설정 종료 데이터(713)가 데이터 묶음 내에서 가장 마지막에 저장된 데이터가 아니라고 판단한다. 그 결과, 연산부(230)는 종료 데이터의 재설정을 한다. 연산부(230)는 초기 설정 종료 데이터(713)의 주소값에 1을 더한다. 그 후, 연산부(230)는 1을 더한 주소값인 a+6에 저장된 데이터(714)를 종료 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 종료 데이터(714)가 올바른 값인지 판단한다. 재설정된 종료 데이터(714)는 순서 정보가 1이다. 따라서 연산부(230)는 재설정된 종료 데이터(714)가 데이터 묶음 내에서 가장 마지막에 저장된 데이터라고 판단한다. 그 후, 연산부(230)는 재설정된 종료 데이터(714)를 변경된 종료 데이터로 설정한다.Further, the order information of the initial setting end data 713 is 0. In addition, the calculation unit 230 determines that the initial setting end data 713 is not the last data stored in the data bundle. As a result, the operation unit 230 resets the end data. The operation unit 230 adds 1 to the address value of the initial setting end data 713. After that, the operation unit 230 sets the data 714 stored in the address value a+6 to which 1 is added to the end data. After that, the operation unit 230 determines whether the reset end data 714 is a correct value. The order information of the reset end data 714 is 1. Accordingly, the operation unit 230 determines that the reset end data 714 is the last data stored in the data bundle. After that, the operation unit 230 sets the reset end data 714 as the changed end data.

그 후, 연산부(230)는 변경된 시작 데이터(711) 및 변경된 종료 데이터(714)를 양 끝으로 하는 최종 변환 대상 데이터(730)를 획득한다.After that, the operation unit 230 obtains the final conversion target data 730 having the changed start data 711 and the changed end data 714 as both ends.

그리고 나서, 연산부(230)는 변환 대상 데이터(730)를 빅-엔디안 데이터로 변환한다. 변환 대상 데이터(730)의 시작 데이터(711)는 크기 정보가 2 이므로, 변환 대상 데이터(730)의 시작 데이터(711)는 4 바이트 데이터 묶음의 일부이다. 변환 대상 데이터(730)의 시작 데이터(711)는 순서 정보가 0 이므로, 변환 대상 데이터(730)의 시작 데이터(711)는 4 바이트 데이터 묶음의 맨 처음 데이터이다. 연산부(230)는 주소값 a에 저장된 값을 같은 데이터 묶음 내에서 순서 정보가 3인 주소값 a+3에 저장된 데이터로 변경한다. 마찬가지로, 연산부(230)는 주소값 a+1에 저장된 데이터를 주소값 a+2에 저장된 데이터로 변경한다. 마찬가지로, 연산부(230)는 주소값 a+2에 저장된 데이터를 주소값 a+1에 저장된 데이터로 변경한다. 마지막으로, 연산부(230)는 주소값 a+3에 저장된 데이터를 주소값 a에 저장된 데이터로 변경한다.Then, the operation unit 230 converts the data to be converted 730 into big-endian data. Since the size information of the start data 711 of the conversion target data 730 is 2, the start data 711 of the conversion target data 730 is a part of a 4-byte data bundle. Since the start data 711 of the conversion target data 730 has order information of 0, the start data 711 of the conversion target data 730 is the first data of a 4-byte data bundle. The operation unit 230 changes the value stored in the address value a into data stored in the address value a+3 having order information of 3 in the same data bundle. Similarly, the operation unit 230 changes the data stored in the address value a+1 to the data stored in the address value a+2. Similarly, the operation unit 230 changes the data stored in the address value a+2 to the data stored in the address value a+1. Finally, the operation unit 230 changes the data stored in the address value a+3 into the data stored in the address value a.

그 후, 주소값 a+4에 저장된 데이터는 크기 정보가 0이므로, 연산부(230)는 1 바이트 데이터라고 판단한다. 즉, 주소값 a+4에 저장된 데이터는 빅-엔디안 형식으로 저장 형식을 변환을 하지 않아도 값이 동일하다., 따라서 연산부(230)는 주소값 a+4에 저장된 데이터는 변경을 하지 않는다.Thereafter, since the size information of the data stored in the address value a+4 is 0, the operation unit 230 determines that it is 1-byte data. That is, the data stored in the address value a+4 has the same value even if the storage format is not converted into a big-endian format. Therefore, the operation unit 230 does not change the data stored in the address value a+4.

그 후, 주소값 a+5에 저장된 데이터는 크기 정보가 1이므로, 연산부(230)는 2 바이트 데이터 묶음의 일부라고 판단한다. 주소값 a+5에 저장된 데이터의 순서 정보는 0 이므로, 연산부(230)는 순서 정보가 1인 a+6에 저장된 데이터와 변경한다. 연산부(230)는 주소값 a+6에 저장된 데이터를 주소값 a+5에 저장된 데이터로 변경한다.Thereafter, since the size information of the data stored in the address value a+5 is 1, the operation unit 230 determines that it is a part of the 2-byte data bundle. Since the order information of the data stored in the address value a+5 is 0, the operation unit 230 changes the order information with the data stored in a+6 where the order information is 1. The operation unit 230 changes the data stored in the address value a+6 into the data stored in the address value a+5.

연산부(230)는 상기 과정을 통하여 빅-엔디안 형식으로 변경된 최종 데이터(740)를 생성한다.The operation unit 230 generates the final data 740 changed in a big-endian format through the above process.

마지막으로, 송신부(240)는 최종 데이터(740)를 마스터 장치(200)로 송신한다.Finally, the transmission unit 240 transmits the final data 740 to the master device 200.

이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.As described above with reference to the drawings illustrated for the present invention, the present invention is not limited by the embodiments and drawings disclosed in the present specification, and various by a person skilled in the art within the scope of the technical idea of the present invention. It is obvious that transformation can be made. In addition, even if not explicitly described and described the effects of the configuration of the present invention while describing the embodiments of the present invention, it is natural that the predictable effects of the configuration should also be recognized.

Claims (5)

마스터 장치로부터 주소값 및 길이값을 수신하는 수신부;
미리 저장된 도움 배열을 이용하여 상기 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득하고, 상기 크기 정보 및 상기 순서 정보를 이용하여 변환 대상 데이터를 획득하고, 상기 변환 대상 데이터의 저장 형식을 제1 형식에서 제2 형식으로 변환하여 변환 데이터를 생성하는 연산부; 및
상기 변환 데이터를 상기 마스터 장치로 송신하는 송신부를 포함하고,
상기 연산부는
상기 주소값 및 상기 길이값을 참조하여 상기 변환 대상 데이터의 시작 데이터 및 종료 데이터를 결정하고, 상기 시작 데이터의 순서 정보를 참조하여 상기 시작 데이터를 변경하고, 상기 종료 데이터의 크기 정보 및 순서 정보를 참조하여 상기 종료 데이터를 변경하는
데이터 변환 장치.
A receiver configured to receive an address value and a length value from the master device;
Obtaining size information and order information of data corresponding to the address value using a pre-stored help array, obtaining conversion target data using the size information and the order information, and determining a storage format of the conversion target data An operation unit converting from one format to a second format to generate converted data; And
And a transmission unit for transmitting the converted data to the master device,
The operation unit
The start data and end data of the conversion target data are determined with reference to the address value and the length value, the start data is changed with reference to the order information of the start data, and size information and order information of the end data To change the end data by reference
Data conversion device.
제1항에 있어서,
상기 도움 배열은
데이터의 크기 정보 및 순서 정보를 포함하는 2차원 배열인
데이터 변환 장치.
The method of claim 1,
The above help arrangement is
A two-dimensional array containing information about the size and order of data
Data conversion device.
삭제delete 제1항에 있어서,
상기 연산부는
상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트인 경우, 상기 변환 대상 데이터의 저장 형식을 변경하지 않는
데이터 변환 장치.
The method of claim 1,
The operation unit
If the size information stored in the help array of the conversion target data is 1 byte, do not change the storage format of the conversion target data
Data conversion device.
제1항에 있어서,
상기 연산부는
상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트가 아닌 경우, 상기 변환 대상 데이터가 제1 형식으로 저장될 때의 주소값과 상기 변환 대상 데이터가 제2 형식으로 저장될 때의 주소값의 차이값을 계산하고, 상기 차이값에 기초하여 상기 변환 대상 데이터의 저장 형식을 변경하는
데이터 변환 장치.
The method of claim 1,
The operation unit
If the size information stored in the help array of the conversion target data is not 1 byte, the address value when the conversion target data is stored in the first format and the address value when the conversion target data is stored in the second format Computing a difference value and changing the storage format of the conversion target data based on the difference value
Data conversion device.
KR1020190033538A 2019-03-25 2019-03-25 Apparatus for data conversion KR102151779B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190033538A KR102151779B1 (en) 2019-03-25 2019-03-25 Apparatus for data conversion
PCT/KR2019/010653 WO2020197002A1 (en) 2019-03-25 2019-08-21 Data conversion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190033538A KR102151779B1 (en) 2019-03-25 2019-03-25 Apparatus for data conversion

Publications (1)

Publication Number Publication Date
KR102151779B1 true KR102151779B1 (en) 2020-09-03

Family

ID=72469481

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190033538A KR102151779B1 (en) 2019-03-25 2019-03-25 Apparatus for data conversion

Country Status (2)

Country Link
KR (1) KR102151779B1 (en)
WO (1) WO2020197002A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5524246A (en) * 1993-08-23 1996-06-04 At&T Corp. Method and apparatus for configuring computer programs from available subprograms
JPH0983783A (en) * 1995-07-11 1997-03-28 Canon Inc Data converting device and image recording device
KR20050082760A (en) * 2004-02-20 2005-08-24 삼성전자주식회사 Apparatus and method for converting data between different endian formats and system having the apparatus
US7203636B2 (en) * 1998-10-10 2007-04-10 Transitive Limited Endian transformation
JP5733385B2 (en) * 2011-03-18 2015-06-10 富士通株式会社 Endian conversion method and system
KR101870355B1 (en) * 2017-01-31 2018-06-22 서울대학교병원 Image processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5590658A (en) * 1978-12-22 1980-07-09 Aoki Senkakushiyo Kk Production of flexible nonwoven fabric containing collagen fiber
US5524256A (en) * 1993-05-07 1996-06-04 Apple Computer, Inc. Method and system for reordering bytes in a data stream
JPH11149363A (en) * 1997-11-19 1999-06-02 Toshiba Corp Data controller

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5524246A (en) * 1993-08-23 1996-06-04 At&T Corp. Method and apparatus for configuring computer programs from available subprograms
JPH0983783A (en) * 1995-07-11 1997-03-28 Canon Inc Data converting device and image recording device
US7203636B2 (en) * 1998-10-10 2007-04-10 Transitive Limited Endian transformation
KR20050082760A (en) * 2004-02-20 2005-08-24 삼성전자주식회사 Apparatus and method for converting data between different endian formats and system having the apparatus
JP5733385B2 (en) * 2011-03-18 2015-06-10 富士通株式会社 Endian conversion method and system
KR101870355B1 (en) * 2017-01-31 2018-06-22 서울대학교병원 Image processing method

Also Published As

Publication number Publication date
WO2020197002A1 (en) 2020-10-01

Similar Documents

Publication Publication Date Title
US11010303B2 (en) Deploying a smart contract
US20020087596A1 (en) Compact tree representation of markup languages
US10015200B2 (en) Communication with accessories
US20110271059A1 (en) Reducing remote reads of memory in a hybrid computing environment
CN110392084B (en) Method, apparatus and computer program product for managing addresses in a distributed system
US20100115126A1 (en) Automated conversion of versioned data collections
CN106648817B (en) Cross-platform data object transmission method
JP5482230B2 (en) COMMUNICATION DEVICE, INFORMATION PROCESSING DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND CONTROL PROGRAM
US9941899B1 (en) Elastic data packer
KR102151779B1 (en) Apparatus for data conversion
CN115733832A (en) Computing device, message receiving method, programmable network card and storage medium
US8978048B2 (en) Information processing system, control method, and non-transitory computer readable medium storing program
US20200296183A1 (en) Methods and apparatus to improve interprocess communication
CN105491082A (en) Remote resource access method and switch equipment
US7181562B1 (en) Wired endian method and apparatus for performing the same
CN115604070A (en) Message transmission method, device, equipment and medium based on MCTP (Multi-function peripheral protocol)
CN110647355B (en) Data processor and data processing method
EP1528467A2 (en) Method and system for delivery of data objects to components in a distributed system, using multiple data type representations
CN111712805A (en) Address extension device, system and movable platform
JP2006209417A (en) Transmitting system for updating data, transmission side device, reception side device and transmitting method for updating data
US5636375A (en) Emulator for high speed, continuous and discontinuous instruction fetches
CN110545108B (en) Data processing method and device, electronic equipment and computer readable storage medium
US11301238B2 (en) Firmware updating method and firmware updating system
WO2022257533A1 (en) Data transmission method and apparatus, and storage medium and electronic apparatus
CN115037514A (en) Hash algorithm-based efficient data integrity checking method

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant