WO2020197002A1 - 데이터 변환 장치 - Google Patents
데이터 변환 장치 Download PDFInfo
- Publication number
- WO2020197002A1 WO2020197002A1 PCT/KR2019/010653 KR2019010653W WO2020197002A1 WO 2020197002 A1 WO2020197002 A1 WO 2020197002A1 KR 2019010653 W KR2019010653 W KR 2019010653W WO 2020197002 A1 WO2020197002 A1 WO 2020197002A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- operation unit
- stored
- format
- value
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F5/00—Methods or arrangements for data conversion without changing the order or content of the data handled
- G06F5/01—Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
Definitions
- 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.
- the high-order bit is stored in a high address.
- the first storage device may store data in a first format.
- the first format may be a big-endian format.
- the second storage device may store data in the second format in order to increase the internal processing speed.
- the second storage device may be a micro controller unit (MCU), and the second type may be a little-endian type. Therefore, when the second storage device transmits data to the first storage device at the request of the first storage device, the second storage device converts the data stored in the second format into data in the first format and transmits it to the first storage device. Should be.
- MCU micro controller unit
- the conventional second storage device unifies and stores the size of data into 1 byte, 2 bytes, 4 bytes, or 8 bytes. This is because if the second storage device stores data in various sizes from 1 byte to 8 bytes, the second storage device must convert the data storage format to fit the data size of the first storage device when transmitting data. to be.
- the second storage device must perform endian conversion work after grasping each capacity.
- the second storage device must have a memory having a large storage capacity and a processor having a high processing speed. Therefore, a method of storing data in various sizes in the second storage device is not preferred.
- FIG. 1 is an example of a structure 100 representing a data storage method according to the prior art.
- a storage 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.
- the storage device includes 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 in the form of an unsigned integer having a size of 4 bytes. Convert and save.
- variable 130 and 140 of Life whose actual data size is 8 bytes
- variable 130 and Life_2 variable 140 having a size of 4 bytes Divided by and converted to unsigned integer type and saved.
- the storage device has to unify the size of data into 4 bytes and store it, the storage device expands and stores data having a size of 1 byte or 2 bytes into data having a size of 4 bytes. Therefore, the storage device has a problem of storing data in a memory space larger than a memory space required to actually store data.
- the storage device must divide and store data having a size of 8 bytes into two pieces of data having a size of 4 bytes. Therefore, the storage device has a problem of having to separately mention the size of data in the memory map.
- An object of the present invention is to provide a data conversion device 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 a storage device.
- an 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, even without unifying and storing data in a storage 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 a storage device.
- an 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 in another storage device even if the size of data is not unified and stored in the storage device.
- a data conversion apparatus 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.
- the help arrangement may be a two-dimensional arrangement including size information and order information of each data.
- 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.
- the operation unit 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.
- the conversion target data 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.
- 1 is a structure representing a data storage method according to the prior art.
- FIG. 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.
- FIG. 3 is a structure and a help arrangement representing a data storage method according to an embodiment of the present invention.
- FIG. 4 is a flowchart showing a data conversion process according to an embodiment of the present invention.
- FIG. 5 is a flowchart illustrating a process of setting data to be converted according to an embodiment of the present invention.
- FIG. 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.
- FIG. 7 is a schematic diagram for explaining the operation of the overall data conversion apparatus according to an embodiment of the present invention.
- FIG. 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.
- a data conversion apparatus 210 includes a reception unit 220, an operation unit 230, and a transmission unit 240.
- the data conversion device 210 exchanges data with the master device 200 through communication.
- 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 is described on the basis of examples.
- 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.
- 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.
- the receiving unit 220 receives an address value and a length value for required data from the master device 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.
- 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.
- 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.
- FIG. 3 is a structure 300 and a help arrangement 310 representing a data storage method according to an embodiment of the present invention.
- 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
- 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.
- the help array 310 has size information and order information in 1-byte units, such as ⁇ _UINT8_W, 0 ⁇ (341).
- the help array 310 has size information and order information in 1-byte units, such as ⁇ _UINT16_W, 0 ⁇ (351) and ⁇ _UINT16_W, 1 ⁇ (352).
- 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.
- 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.
- 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.
- 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.
- 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.
- FIG. 4 is a flowchart showing a data conversion process according to an embodiment of the present invention.
- 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).
- 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).
- 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.
- 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.
- 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).
- FIG. 5 is a flowchart illustrating a process 420 of setting data to be converted according to an embodiment of the present invention.
- 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.
- 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.
- 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 order 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.
- the operation unit 230 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. 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.
- 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.
- 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.
- the operation unit 230 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. 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.
- 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.
- the operation unit 230 sets conversion target data including the set start data and end data as both ends (530).
- FIG. 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.
- 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.
- a value stored in the size information is a value declared through the enum 330 of FIG. 3.
- 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).
- 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.
- 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).
- 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 in 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.
- 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).
- 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.
- FIG. 7 is a schematic diagram for explaining the operation of the overall data conversion apparatus according to an embodiment of the present invention.
- 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).
- the receiver 220 receives the address value a+1 and the length value 5.
- 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.
- 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.
- 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.
- 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.
- 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.
- the order information of the initial setting end data 713 is 0. Therefore, 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.
- 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.
- 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.
- 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.
- 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.
- the operation unit 230 generates the final data 740 changed in a big-endian format through the above process.
- the transmission unit 240 transmits the final data 740 to the master device 200.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
본 발명은 특정 엔디안 형식으로 입력되는 데이터를 다른 엔디안 형식으로 변환하기 위한 장치에 관한 것이다. 본 발명의 일 실시예에 따른 데이터 변환 장치는, 마스터 장치로부터 주소값 및 길이값을 수신하는 수신부, 미리 저장된 도움 배열을 이용하여 상기 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득하고, 상기 크기 정보 및 상기 순서 정보를 이용하여 변환 대상 데이터를 획득하고, 상기 변환 대상 데이터의 저장 형식을 제1 형식에서 제2 형식으로 변환하여 변환 데이터를 생성하는 연산부, 상기 변환 데이터를 상기 마스터 장치로 송신하는 송신부를 포함한다. 본 발명에 따르면 저장 장치에 데이터의 크기를 다양하게 저장해도 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기가 불필요한 장점이 있다.
Description
본 발명은 데이터 변환 장치에 관한 것으로, 보다 상세하게는 제1 형식으로 입력되는 데이터를 제2 형식으로 변환하는 장치에 관한 것이다.
엔디안은 컴퓨터의 메모리에 데이터를 저장하는 방식이다. 빅-엔디안 형식은 상위 비트를 낮은 번지에 저장하는 방식이다. 그리고 리틀-엔디안 형식은 상위 비트를 높은 번지에 저장하는 방식이다.
제1 저장 장치는 제1 형식으로 데이터를 저장할 수 있다. 이때 제1 형식은 빅-엔디안 형식 일 수 있다. 반면, 제2 저장 장치는 내부처리속도를 빠르게 하기 위해서 제2 형식으로 데이터를 저장할 수 있다. 이때 제2 저장 장치는 MCU(Micro Controller Unit)이고, 제2 형식은 리틀-엔디안 형식 일 수 있다. 따라서 제2 저장 장치가 제1 저장 장치의 요청에 의해서 제1 저장 장치로 데이터를 전송할 때, 제2 저장 장치는 제2 형식으로 저장된 데이터를 제1 형식의 데이터로 변환해서 제1 저장 장치에 전송해야 한다.
종래의 제2 저장 장치는 데이터의 크기를 1 바이트, 2 바이트, 4 바이트 또는 8 바이트로 통일하여 저장한다. 이는 제2 저장 장치가 데이터의 크기를 1 바이트부터 8 바이트까지 다양하게 저장하면, 제2 저장 장치는 데이터를 전송할 때 제1 저장 장치의 데이터의 크기에 맞게 데이터의 저장 형식을 일일이 변환해야하기 때문이다.
또한 개발자가 제2 저장 장치의 내부에 저장한 데이터의 크기를 1 바이트부터 8 바이트까지 다양하게 하는 방식을 채택하면, 제2 저장 장치는 엔디안 변환작업을 각각의 용량을 파악한 후 일일이 해야 한다. 이를 위해서 제2 저장 장치는 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기를 구비해야 한다. 따라서 제2 저장 장치에 다양한 크기로 데이터를 저장하는 방식은 선호되지 않는다.
도 1은 종래 기술에 따른 데이터 저장 방식을 표현한 구조체(100)의 예시이다.
도 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 형태로 변환하여 저장한다.
이처럼 저장 장치가 데이터의 크기를 4 바이트로 통일시켜 저장해야 하면, 저장 장치는 1 바이트나 2 바이트의 크기를 가지는 데이터를 4 바이트의 크기를 가지는 데이터로 확장시켜 저장한다. 따라서 저장 장치는 실제로 데이터를 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하는 문제를 가진다.
또한, 저장 장치는 8 바이트의 크기를 가지는 데이터를 4 바이트의 크기를 가지는 데이터 2개로 분할하여 저장해야 한다. 따라서 저장 장치는 메모리 맵에 별도로 데이터의 크기에 관한 언급해야 하는 문제를 가진다.
마지막으로, 저장 장치가 데이터를 통일된 크기로 저장하면, 다른 저장 장치는 데이터를 통일된 크기에 맞추어서 요청해야 한다. 따라서 저장 장치가 다른 장치에도 제약 조건을 발생시키는 문제를 가진다.
본 발명은 저장 장치에 데이터의 크기를 다양하게 저장해도 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기가 불필요한 데이터 변환 장치를 제공하는 것을 목적으로 한다.
또한 본 발명은 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 실제로 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하는 문제를 해결하는 데이터 변환 장치를 제공하는 것을 목적으로 한다.
또한 본 발명은 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 메모리 맵에 별도로 데이터의 크기에 관한 언급이 불필요한 데이터 변환 장치를 제공하는 것을 목적으로 한다.
또한 본 발명은 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 다른 저장 장치에 데이터를 통일된 크기에 맞추어서 요청해야 하는 제약 조건을 발생시키는 문제를 해결하는 데이터 변환 장치를 제공하는 것을 목적으로 한다.
본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.
본 발명의 일 실시예에 따른 데이터 변환 장치는, 마스터 장치로부터 주소값 및 길이값을 수신하는 수신부, 미리 저장된 도움 배열을 이용하여 상기 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득하고, 상기 크기 정보 및 상기 순서 정보를 이용하여 변환 대상 데이터를 획득하고, 상기 변환 대상 데이터의 저장 형식을 제1 형식에서 제2 형식으로 변환하여 변환 데이터를 생성하는 연산부, 상기 변환 데이터를 상기 마스터 장치로 송신하는 송신부를 포함한다.
본 발명의 일 실시예에서, 상기 도움 배열은 각 데이터의 크기 정보 및 순서 정보를 포함하는 2차원 배열일 수 있다.
또한 본 발명의 일 실시예에서, 상기 연산부는 상기 주소값 및 상기 길이값을 참조하여 상기 변환 대상 데이터의 시작 데이터 및 종료 데이터를 결정하고, 상기 시작 데이터의 순서 정보를 참조하여 상기 시작 데이터를 변경하고, 상기 종료 데이터의 크기 정보 및 순서 정보를 참조하여 상기 종료 데이터를 변경한다.
또한 본 발명의 일 실시예에서, 상기 연산부는 상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트인 경우, 상기 변환 대상 데이터의 저장 형식을 변경하지 않는다.
또한 본 발명의 일 실시예에서, 상기 연산부는 상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트가 아닌 경우, 상기 변환 대상 데이터가 제1 형식으로 저장될 때의 주소값과 상기 변환 대상 데이터가 제2 형식으로 저장될 때의 주소값의 차이값을 계산하고, 상기 차이값에 기초하여 상기 변환 대상 데이터의 저장 형식을 변경한다.
본 발명에 따르면 저장 장치에 데이터의 크기를 다양하게 저장해도 큰 저장 용량을 갖는 메모리와 처리 속도가 빠른 처리기가 불필요한 장점이 있다.
또한 본 발명에 따르면 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 실제로 저장하기 위해 필요한 메모리 공간보다 큰 메모리 공간에 데이터를 저장하지 않는 장점이 있다.
또한 본 발명에 따르면 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 메모리 맵에 별도로 데이터의 크기에 관한 언급이 불필요한 장점이 있다.
또한 본 발명에 따르면 저장 장치에 데이터의 크기를 통일시켜 저장하지 않아도 다른 저장 장치에 데이터를 통일된 크기에 맞추어서 요청해야 하는 제약 조건을 발생시키지 않는 장점이 있다.
도 1은 종래 기술에 따른 데이터 저장 방식을 표현한 구조체이다.
도 2는 본 발명의 일 실시예에 따른 데이터 변환 장치 및 데이터 변환 장치의 마스터 장치와의 관계를 나타낸다.
도 3은 본 발명의 일 실시예에 따른 데이터 저장 방식을 표현한 구조체 및 도움 배열이다.
도 4는 본 발명의 일 실시예에 따른 데이터 변환 과정을 나타낸 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 변환 대상 데이터를 설정하는 과정을 나타낸 흐름도이다.
도 6은 본 발명의 일 실시예에 따른 도움 배열의 크기 정보 값에 따라 데이터의 저장 형식을 변경하는 과정을 나타낸 흐름도이다.
도 7은 본 발명의 일 실시예에 따른 전체적인 데이터 변환 장치의 동작을 설명하기 위한 모식도이다.
전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.
도 2는 본 발명의 일 실시예에 따른 데이터 변환 장치 및 데이터 변환 장치의 마스터 장치와의 관계를 나타낸다.
도 2를 참조하면, 본 발명의 일 실시예에 따른 데이터 변환 장치(210)는 수신부(220), 연산부(230) 및 송신부(240)를 포함한다. 또한 데이터 변환 장치(210)는 마스터 장치(200)와 통신을 통해 데이터를 주고 받는다.
참고로 이하에서는 마스터 장치(200)가 데이터 변환 장치(210)에 빅-엔디안 형식의 데이터 송신을 요청하고, 데이터 변환 장치(210)는 리틀-엔디안 형식으로 저장된 데이터를 빅-엔디안 형식으로 변환하는 실시예를 기초로 본 발명의 구성이 설명된다. 그러나 본 발명의 다른 실시예에서는 마스터 장치(200)가 데이터 변환 장치(210)에 리틀-엔디안 형식의 데이터 송신을 요청하고, 데이터 변환 장치(210)는 빅-엔디안 형식으로 저장된 데이터를 리틀-엔디안 형식으로 변환할 수 있다.
마스터 장치(200)는 데이터 변환 장치(210)에 주소값과 길이값을 이용하여 데이터를 요청한다. 그리고 마스터 장치(200)는 데이터 변환 장치(210)로부터 요청한 데이터를 받는다.
수신부(220)는 마스터 장치(200)로부터 필요한 데이터에 관한 주소값 및 길이값을 수신한다.
연산부(230)는 수신부(220)로부터 마스터 장치(200)가 요청한 데이터에 관한 정보인 주소값과 길이값을 받는다. 또한, 연산부(230)는 마스터 장치(200)로 송신할 데이터를 생성한다.
상세히, 연산부(230)는 데이터와 함께 미리 저장되어 있는 도움 배열을 이용하여 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득한다. 그 후, 연산부(230)는 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 획득한다. 그 후, 연산부(230)는 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환하여서 마스터 장치(200)에 송신할 변환 데이터를 생성한다.
송신부(240)는 연산부(230)로부터 마스터 장치(200)가 요청한 데이터를 받아서 마스터 장치(200)로 송신한다.
도 3은 본 발명의 일 실시예에 따른 데이터 저장 방식을 표현한 구조체(300) 및 도움 배열(310)이다.
도 3을 참조하면, 구조체(300)는 1 바이트 크기를 가지는 TempCount(340), 2 바이트 크기를 가지는 FaultEventCount(350), 4 바이트 크기를 가지는 OpDuration(360), 4 바이트 크기를 가지는 IA(370) 및 8 바이트 크기를 가지는 Life(380)에 관한 데이터를 가진다.
여기서 TempCount(340), FaultEventCount(350), OpDuration(360) 등과 같이 하나의 자료가 여러 개의 주소에 나뉘어서 저장되기 전의 데이터 전체를 데이터 묶음이라고 정의한다.
구조체(300)와 대응되는 도움 배열(310)은 구조체(300)에 저장된 데이터의 크기 정보 및 순서 정보를 가진다. 즉, 도움 배열(310)은 2차원 배열의 형태를 가진다.
상세히, 1 바이트의 크기인 TempCount(340)에 관하여 도움 배열(310)은 {_UINT8_W, 0}(341)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.
2 바이트의 크기인 FaultEventCount(350)에 관하여 도움배열(310)은 {_UINT16_W, 0}(351) 및 {_UINT16_W, 1}(352)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.
4 바이트의 크기인 OpDuration(360) 에 관하여 도움배열(310)은 {_UINT32_W, 0}(361), {_UINT32_W, 1}(362), {_UINT32_W, 2}(363) 및 {_UINT32_W, 3}(364)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.
마찬가지로 4 바이트의 크기인 IA(370) 에 관하여 도움배열(310)은 {_UINT32_W, 0}(371), {_UINT32_W, 1}(372), {_UINT32_W, 2}(373) 및 {_UINT32_W, 3}(374)과 같이 1 바이트 단위로 크기 정보 및 순서 정보를 가진다.
마지막으로 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 바이트 단위로 크기 정보 및 순서 정보를 가진다.
또한 도움 배열에 대한 정보를 주는 구조체(320)에는 도움 배열(310)이 가지고 있는 데이터의 크기 정보(321)와 순서 정보(322)가 선언된다.
또한 열거형(330)에는 도움 배열(310)에 저장될 크기 정보에 대한 값이 1 바이트는 0, 2 바이트는 1, 4 바이트는 2 및 8 바이트는 3과 같이 선언된다.
도 4는 본 발명의 일 실시예에 따른 데이터 변환 과정을 나타낸 흐름도이다.
도 4를 참조하면, 마스터 장치(200)가 데이터 변환 장치(210)로 데이터의 주소값 및 길이값을 보낸다. 수신부(220)는 데이터의 주소값 및 길이값을 수신한다(400).
그리고 나서, 연산부(230)는 수신부(220)로부터 데이터의 주소값 및 길이값을 받는다. 연산부(230)는 도움 배열(310)을 이용하여 주소값에 대응하는 데이터의 크기 정보 및 순서 정보를 획득한다(410).
그리고 나서, 연산부(230)는 데이터의 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 획득한다(420). 연산부(230)는 마스터 장치(200)로부터 수신한 주소값 및 길이값을 참조하여 시작 데이터 및 종료 데이터를 결정한다. 그 후, 연산부(230)는 시작 데이터의 순서 정보가 0인지를 판단한다. 연산부(230)는 상기 판단 결과를 이용하여 시작 데이터를 설정한다. 그 후, 연산부(230)는 종료 데이터의 크기 정보가 가질 수 있는 순서 정보의 최대값을 구한다. 연산부(230)는 상기 최대값과 종료 데이터의 순서 정보를 비교하여 종료 데이터를 설정한다. 그 후, 연산부(230)는 설정된 시작 데이터와 종료 데이터를 이용하여 변환 대상 데이터를 설정한다.
연산부(230)가 변환 대상 데이터를 설정하는 과정은 도 5에 상세히 도시되어 있는 바, 아래에서 상술하도록 한다.
그리고 나서, 연산부(230)는 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환한다(430). 연산부(230)는 변환 대상 데이터의 도움 배열에 저장된 크기 정보 및 순서 정보를 이용하여 변환 대상 데이터를 변환한다.
연산부(230)가 변환 대상 데이터를 변환하는 과정은 도 6에 상세히 도시되어 있는 바, 아래에서 상술하도록 한다.
마지막으로, 데이터 변환 장치(210)는 연산부(230)가 변환한 데이터를 송신부(240)를 이용하여 마스터 장치(200)로 송신한다(440).
도 5는 본 발명의 일 실시예에 따른 변환 대상 데이터를 설정하는 과정(420)을 나타낸 흐름도이다.
도 5를 참조하면, 연산부(230)는 마스터 장치(200)로부터 받은 주소값 및 길이값을 이용하여 시작 데이터 및 종료 데이터를 설정한다(500). 구체적으로, 연산부(230)는 마스터 장치(200)로부터 받은 주소값에 저장된 데이터를 시작 데이터로 설정한다. 또한 연산부(230)는 시작 데이터의 주소값에 길이값을 더한 후, 상기 주소값에 -1을 더한 주소값에 저장된 데이터를 종료 데이터로 설정한다.
만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 -1을 더하는 것이 아니라 상기 주소값의 차이만큼의 음수 값을 더한 값을 종료 데이터로 설정한다.
그리고 나서, 연산부(230)는 시작 데이터에 대응되는 도움 배열(310)에 저장된 시작 데이터의 순서 정보가 0인지를 확인한다(510). 시작 데이터의 순서 정보가 0이면, 시작 데이터는 저장된 데이터가 몇 바이트의 데이터 묶음에 포함되는 지와 관계없이 데이터 묶음의 가장 처음 저장된 데이터인 것이다. 따라서 연산부(230)는 시작 데이터의 변경 없이 다음 단계(520)로 넘어간다.
만일, 시작 데이터의 순서 정보가 0이 아니면, 시작 데이터는 데이터 묶음의 가장 처음 저장된 데이터가 아닌 것이다. 따라서 연산부(230)는 시작 데이터의 재설정을 한다. 연산부(230)는 시작 데이터의 주소값에 -1을 더한다(511). 그리고 나서 연산부(230)는 주소값에 저장된 데이터를 시작 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 시작 데이터가 올바른 값인지 확인하는 단계(510)를 반복한다.
만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 -1을 더하는 것이 아니라 상기 주소값의 차이만큼의 음수 값을 더한 값을 시작 데이터로 설정한다.
그리고 나서 연산부(230)는 종료 데이터에 대응되는 도움 배열(310)에 저장된 종료 데이터의 크기 정보를 확인한다. 그리고 나서 연산부(230)는 크기 정보와 같이 저장된 순서 정보가 가질 수 있는 최대값(A)을 구한다. 그 후, 연산부(230)는 최대값(A)이 종료 데이터에 대응되는 도움 배열(310)에 저장된 종료 데이터의 순서 정보(B)와 동일한지 여부를 판단한다(520). 연산부(230)가 판단한 결과 A와 B가 동일하면, 종료 데이터는 저장된 데이터가 몇 바이트의 데이터 묶음에 포함되는 지와 관계없이 데이터 묶음의 가장 마지막 저장된 데이터이다. 따라서 연산부(230)는 종료 데이터의 변경 없이 다음 단계(530)로 넘어간다.
만일, 연산부(230)가 판단한 결과 A와 B가 동일하지 않으면, 종료 데이터는 데이터 묶음의 가장 마지막에 저장된 데이터가 아니다. 따라서 연산부(230)는 종료 데이터의 재설정을 한다. 연산부(230)는 종료 데이터의 주소값에 1을 더한다(521). 그리고 나서 연산부(230)는 주소값에 저장된 데이터를 종료 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 종료 데이터가 올바른 값인지 확인하는 단계(520)를 반복한다.
만일, 저장된 데이터와 그 다음 저장된 데이터의 주소값 차이가 1이 아닌 경우, 연산부(230)는 주소값에 1을 더하는 것이 아니라 상기 주소값의 차이만큼의 값을 더한 값을 종료 데이터로 설정한다.
마지막으로, 연산부(230)는 설정된 시작 데이터 및 종료 데이터를 양 끝으로 하는 변환 대상 데이터를 설정한다(530).
도 6은 본 발명의 일 실시예에 따른 도움 배열의 크기 정보 값에 따라 데이터의 저장 형식을 변경하는 과정(430)을 나타낸 흐름도이다.
도 6을 참조하면, 연산부(230)는 변환 대상 데이터에 대응 되는 도움 배열(310)에 저장된 크기 정보를 이용하여 변환 대상 데이터의 저장 형식을 빅-엔디안 형식으로 변환한다. 연산부(230)는 변환 대상 데이터의 시작 데이터부터 종료 데이터까지 1 바이트씩 변환한다. 참고로, 크기 정보에 저장되는 값은 도 3의 열거체(330)를 통해 선언된 값이다.
첫 단계로, 연산부(230)는 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 0인지를 확인한다(600). 크기 정보가 0이면, 연산부(230)는 데이터를 1 바이트 크기인 데이터로 인식한다. 1 바이트 데이터는 저장 형식이 리틀-엔디안 형식인지 빅-엔디안 형식인지와 무관하게 저장되는 방법이 같다. 따라서 연산부(230)는 데이터의 저장형식을 변경하지 않는다(601).
만일, 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 0이 아니면, 연산부(230)는 다음 단계(610)로 넘어간다. 연산부(230)는 변환하려는 데이터의 도움 배열(310)의 크기 정보가 1인지를 확인한다(610). 크기 정보가 1이면, 데이터는 전체 크기가 2 바이트인 데이터 묶음 중 1 바이트인 것이다. 2 바이트 데이터가 리틀-엔디안 형식으로 저장되는 경우와 빅-엔디안 형식으로 저장되는 경우를 비교하면, 2 바이트 데이터가 저장되는 순서는 다르다. 따라서 연산부(230)는 변환하려는 데이터가 포함되는 데이터 묶음을 파악한다. 그 후, 연산부(230)는 도움 배열(310)의 순서 정보를 확인한다. 변환하려는 데이터의 순서 정보가 0이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 1인 데이터가 가진 값으로 변경한다. 만일, 변환하려는 데이터의 순서 정보가 1이면, 연산부(230)는 저장된 값을 데이터 묶음 내에서 순서 정보가 0인 데이터가 가진 값으로 변경한다 (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).
도 6은 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 2인 때까지만 도시한다. 만일, 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보가 2 이상이면, 연산부(230)는 다음 단계(미도시)로 넘어간다. 연산부(230)는 생략된 단계에서도 변환하려는 데이터의 도움 배열(310)에 저장된 크기 정보 및 순서 정보를 이용하여 데이터의 저장 형식을 변경한다.
도 7은 본 발명의 일 실시예에 따른 전체적인 데이터 변환 장치의 동작을 설명하기 위한 모식도이다.
도 7을 참조하면, 마스터 장치(200)가 주소값을 a+1, 길이값을 5로 하여 데이터 변환 장치(210)에 데이터를 요청한다(700).
그 후, 수신부(220)는 주소값인 a+1 및 길이값인 5를 수신한다.
그 후, 연산부(230)는 주소값인 a+1에 해당되는 데이터에 대응되는 도움 배열(310)의 크기 정보인 2 및 순서 정보인 1을 획득한다. 연산부(230)는 주소값인 a+1에서 다음 주소로 넘어가면서 수신한 길이값에 해당하는 횟수인 5회동안 반복한다. 즉, 연산부(230)는 주소값이 a+5가 될 때까지 반복한다.
그 후, 연산부(230)는 주소값 a+1에 저장된 값인 0D를 초기 설정 시작 데이터(712)로 설정한다. 그리고 나서 연산부(230)는 주소값 a+5에 저장된 값인 07을 초기 설정 종료 데이터(713)로 설정한다.
초기 설정 시작 데이터(712) 및 초기 설정 종료 데이터(713)의 순서 정보 및 크기 정보를 이용하여 변경된 시작 데이터 및 종료 데이터를 설정한다.
상세히, 초기 설정 시작 데이터(712)의 순서 정보는 1이다. 따라서 연산부(230)는 초기 설정 시작 데이터(712)가 데이터 묶음 내에서 가장 처음 데이터가 아니라고 판단한다. 그 결과, 연산부(230)는 시작 데이터의 재설정을 한다. 연산부(230)는 초기 설정 시작 데이터(712)의 주소값에 -1을 더한다. 그 후, 연산부(230)는 -1을 더한 주소값인 a에 저장된 데이터(711)를 시작 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 시작 데이터(711)가 올바른 값인지 판단한다. 재설정된 시작 데이터(711)는 순서 정보가 0이다. 따라서 연산부(230)는 재설정된 시작 데이터(711)가 데이터 묶음 내에서 가장 처음 저장된 데이터라고 판단한다. 그 후, 연산부(230)는 재설정된 시작 데이터(711)를 변경된 시작 데이터로 설정한다.
또한, 초기 설정 종료 데이터(713)의 크기 정보는 1이다. 따라서 초기 설정 종료 데이터(713)는 2 바이트의 크기를 가지는 데이터 묶음의 일부이다.
또한, 초기 설정 종료 데이터(713)의 순서 정보는 0이다. 따라서 연산부(230)는 초기 설정 종료 데이터(713)가 데이터 묶음 내에서 가장 마지막에 저장된 데이터가 아니라고 판단한다. 그 결과, 연산부(230)는 종료 데이터의 재설정을 한다. 연산부(230)는 초기 설정 종료 데이터(713)의 주소값에 1을 더한다. 그 후, 연산부(230)는 1을 더한 주소값인 a+6에 저장된 데이터(714)를 종료 데이터로 설정한다. 그 후, 연산부(230)는 재설정된 종료 데이터(714)가 올바른 값인지 판단한다. 재설정된 종료 데이터(714)는 순서 정보가 1이다. 따라서 연산부(230)는 재설정된 종료 데이터(714)가 데이터 묶음 내에서 가장 마지막에 저장된 데이터라고 판단한다. 그 후, 연산부(230)는 재설정된 종료 데이터(714)를 변경된 종료 데이터로 설정한다.
그 후, 연산부(230)는 변경된 시작 데이터(711) 및 변경된 종료 데이터(714)를 양 끝으로 하는 최종 변환 대상 데이터(730)를 획득한다.
그리고 나서, 연산부(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에 저장된 데이터로 변경한다.
그 후, 주소값 a+4에 저장된 데이터는 크기 정보가 0이므로, 연산부(230)는 1 바이트 데이터라고 판단한다. 즉, 주소값 a+4에 저장된 데이터는 빅-엔디안 형식으로 저장 형식을 변환을 하지 않아도 값이 동일하다., 따라서 연산부(230)는 주소값 a+4에 저장된 데이터는 변경을 하지 않는다.
그 후, 주소값 a+5에 저장된 데이터는 크기 정보가 1이므로, 연산부(230)는 2 바이트 데이터 묶음의 일부라고 판단한다. 주소값 a+5에 저장된 데이터의 순서 정보는 0 이므로, 연산부(230)는 순서 정보가 1인 a+6에 저장된 데이터와 변경한다. 연산부(230)는 주소값 a+6에 저장된 데이터를 주소값 a+5에 저장된 데이터로 변경한다.
연산부(230)는 상기 과정을 통하여 빅-엔디안 형식으로 변경된 최종 데이터(740)를 생성한다.
마지막으로, 송신부(240)는 최종 데이터(740)를 마스터 장치(200)로 송신한다.
이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.
Claims (5)
- 마스터 장치로부터 주소값 및 길이값을 수신하는 수신부;미리 저장된 도움 배열을 이용하여 상기 주소값에 대응되는 데이터의 크기 정보 및 순서 정보를 획득하고, 상기 크기 정보 및 상기 순서 정보를 이용하여 변환 대상 데이터를 획득하고, 상기 변환 대상 데이터의 저장 형식을 제1 형식에서 제2 형식으로 변환하여 변환 데이터를 생성하는 연산부; 및상기 변환 데이터를 상기 마스터 장치로 송신하는 송신부를 포함하는데이터 변환 장치.
- 제1항에 있어서,상기 도움 배열은데이터의 크기 정보 및 순서 정보를 포함하는 2차원 배열인데이터 변환 장치.
- 제1항에 있어서,상기 연산부는상기 주소값 및 상기 길이값을 참조하여 상기 변환 대상 데이터의 시작 데이터 및 종료 데이터를 결정하고, 상기 시작 데이터의 순서 정보를 참조하여 상기 시작 데이터를 변경하고, 상기 종료 데이터의 크기 정보 및 순서 정보를 참조하여 상기 종료 데이터를 변경하는데이터 변환 장치.
- 제1항에 있어서,상기 연산부는상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트인 경우, 상기 변환 대상 데이터의 저장 형식을 변경하지 않는데이터 변환 장치.
- 제1항에 있어서,상기 연산부는상기 변환 대상 데이터의 도움배열에 저장된 크기 정보가 1 바이트가 아닌 경우, 상기 변환 대상 데이터가 제1 형식으로 저장될 때의 주소값과 상기 변환 대상 데이터가 제2 형식으로 저장될 때의 주소값의 차이값을 계산하고, 상기 차이값에 기초하여 상기 변환 대상 데이터의 저장 형식을 변경하는데이터 변환 장치.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2019-0033538 | 2019-03-25 | ||
| KR1020190033538A KR102151779B1 (ko) | 2019-03-25 | 2019-03-25 | 데이터 변환 장치 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020197002A1 true WO2020197002A1 (ko) | 2020-10-01 |
Family
ID=72469481
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2019/010653 Ceased WO2020197002A1 (ko) | 2019-03-25 | 2019-08-21 | 데이터 변환 장치 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR102151779B1 (ko) |
| WO (1) | WO2020197002A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5733385B2 (ko) * | 1978-12-22 | 1982-07-16 | ||
| US5524256A (en) * | 1993-05-07 | 1996-06-04 | Apple Computer, Inc. | Method and system for reordering bytes in a data stream |
| JPH11149363A (ja) * | 1997-11-19 | 1999-06-02 | Toshiba Corp | データ制御装置 |
| KR20050082760A (ko) * | 2004-02-20 | 2005-08-24 | 삼성전자주식회사 | 서로 다른 엔디안 포멧들사이에서 데이터를 변환하기 위한장치와 방법, 그리고 상기 장치를 구비하는 시스템 |
| US7203636B2 (en) * | 1998-10-10 | 2007-04-10 | Transitive Limited | Endian transformation |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CA2128387C (en) * | 1993-08-23 | 1999-12-28 | Daniel F. Hurley | Method and apparatus for configuring computer programs from available subprograms |
| JP3548342B2 (ja) * | 1995-07-11 | 2004-07-28 | キヤノン株式会社 | 画像記録装置 |
| WO2012127590A1 (ja) * | 2011-03-18 | 2012-09-27 | 富士通株式会社 | エンディアン変換方法、およびシステム |
| KR101870355B1 (ko) * | 2017-01-31 | 2018-06-22 | 서울대학교병원 | 영상 처리 방법 |
-
2019
- 2019-03-25 KR KR1020190033538A patent/KR102151779B1/ko active Active
- 2019-08-21 WO PCT/KR2019/010653 patent/WO2020197002A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5733385B2 (ko) * | 1978-12-22 | 1982-07-16 | ||
| US5524256A (en) * | 1993-05-07 | 1996-06-04 | Apple Computer, Inc. | Method and system for reordering bytes in a data stream |
| JPH11149363A (ja) * | 1997-11-19 | 1999-06-02 | Toshiba Corp | データ制御装置 |
| US7203636B2 (en) * | 1998-10-10 | 2007-04-10 | Transitive Limited | Endian transformation |
| KR20050082760A (ko) * | 2004-02-20 | 2005-08-24 | 삼성전자주식회사 | 서로 다른 엔디안 포멧들사이에서 데이터를 변환하기 위한장치와 방법, 그리고 상기 장치를 구비하는 시스템 |
Also Published As
| Publication number | Publication date |
|---|---|
| KR102151779B1 (ko) | 2020-09-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2499717A2 (en) | Load impedance decision device, wireless power transmission device, and wireless power transmission method | |
| US5524254A (en) | Scheme for interlocking line card to an address recognition engine to support plurality of routing and bridging protocols by using network information look-up database | |
| US7996588B2 (en) | Method and apparatus for real-time transport of multi-media information in a network | |
| EP0674276B1 (en) | A computer system | |
| WO2015026179A1 (en) | Method and apparatus for providing a persistent usb service for wireless usb devices | |
| EP0752665B1 (en) | Method and apparatus for coordinating data transfer between hardware and software | |
| EP4080840B1 (en) | Data transmission method and apparatus based on pcie | |
| JPH1069459A (ja) | シリアルインタフェース制御装置およびその制御方法 | |
| EP4080839A1 (en) | Pcie-based data transmission method and apparatus | |
| CN111431784A (zh) | 一种通用的modbus协议数据解析方法 | |
| WO2011136628A9 (en) | System and method of encoding and decoding control information in a medium access control protocol data unit | |
| EP2389632A1 (en) | Communication protocol for sharing memory resources between components of a device | |
| WO2020197002A1 (ko) | 데이터 변환 장치 | |
| US20050198483A1 (en) | Conversion apparatus and method thereof | |
| WO2023171930A1 (ko) | 신경망 모델 경량화 방법, 및 신경망 모델 경량화 장치 | |
| Klilou et al. | Performance optimization of high-speed Interconnect Serial RapidIO for onboard processing | |
| WO2015068917A1 (ko) | 필드의 위치 정보를 포함하는 패킷을 처리하는 송, 수신 노드의 동작 방법 및 필드의 위치 정보를 포함하는 패킷 | |
| WO2018199386A1 (ko) | 전력설비 데이터 품질 정보 생성 장치 및 방법 | |
| CN116049060A (zh) | 数据转换桥电路和数据传输系统 | |
| WO2023121017A1 (ko) | Modbus 프로토콜을 지원하는 can 통신 장치 및 이의 동작 방법 | |
| US20250355828A1 (en) | Communication device and communication system | |
| WO2024181793A1 (ko) | 상태 트라이 노드를 이용한 블록체인 시스템 및 이의 마이닝 방법 | |
| KR100531346B1 (ko) | 버스 시스템에서의 인터넷 접속 제어장치 및 방법 | |
| KR100333713B1 (ko) | 비동기 전달 모드 스위치 정합 장치 | |
| WO2021085884A1 (ko) | Dns 쿼리-응답 시간 단축 방법 및 이를 지원하는 전자 장치 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19920768 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19920768 Country of ref document: EP Kind code of ref document: A1 |