KR20170108421A - Method for reading file from memory card - Google Patents

Method for reading file from memory card Download PDF

Info

Publication number
KR20170108421A
KR20170108421A KR1020160032279A KR20160032279A KR20170108421A KR 20170108421 A KR20170108421 A KR 20170108421A KR 1020160032279 A KR1020160032279 A KR 1020160032279A KR 20160032279 A KR20160032279 A KR 20160032279A KR 20170108421 A KR20170108421 A KR 20170108421A
Authority
KR
South Korea
Prior art keywords
card
file
read
controller
processing unit
Prior art date
Application number
KR1020160032279A
Other languages
Korean (ko)
Other versions
KR102448590B1 (en
Inventor
김찬
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR1020160032279A priority Critical patent/KR102448590B1/en
Publication of KR20170108421A publication Critical patent/KR20170108421A/en
Application granted granted Critical
Publication of KR102448590B1 publication Critical patent/KR102448590B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30043LOAD or STORE instructions; Clear instruction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection
    • G06F9/268Microinstruction selection not based on processing results, e.g. interrupt, patch, first cycle store, diagnostic programs

Abstract

The present invention relates to a method of reading a file from a memory card. The method of the present invention includes a step of transferring the name of a file to be read and buffer information to a memory card host controller, a step of acquiring the position of the file, a step of reading the file, a step of storing the read file in a buffer memory, and a step of transferring an interrupt indicating that reading the file is completed to the central processing unit. The memory card host controller processes itself interrupts generated in the step of acquiring the position of the file and a step of reading the file without transferring them to the central processing unit.

Description

메모리 카드로부터 파일을 읽는 방법{METHOD FOR READING FILE FROM MEMORY CARD}METHOD FOR READING FILE FROM MEMORY CARD "

본 발명은 메모리 카드에 관한 것으로, 더 상세하게는 메모리 카드로부터 파일을 읽는 방법에 관한 것이다.The present invention relates to a memory card, and more particularly, to a method of reading a file from a memory card.

메모리 카드는 전자 장치들과 착탈 가능하게 제조된 저장 장치이다. 대표적인 메모리 카드의 예로 SD (Secure Digital), 미니 SD 카드, 마이크로 SD 카드 등(이하에서, SD 카드로 통칭됨)이 있다. SD 카드는 디지털 카메라, 스마트폰, 스마트패드 등과 같은 휴대용 전자 기기들에서 확장 또는 메인 저장 장치로 다양하게 사용되고 있다.The memory card is a storage device that is detachably manufactured with electronic devices. Examples of typical memory cards include Secure Digital (SD), Mini SD, and Micro SD cards (hereinafter collectively referred to as SD cards). SD cards are widely used as expansion or main storage devices in portable electronic devices such as digital cameras, smart phones, and smart pads.

SD 카드는 오랜 시간 사용되어 왔으며, 따라서 현 시대의 전자 장치들에는 적합하지 않은 특징들을 갖는다. 예를 들어, SD 카드의 읽기 시에 과도하게 많은 인터럽트들이 발생하며, 따라서 SD 카드는 중앙 처리 장치의 자원을 과도하게 차지하는 단점을 갖는다. 이러한 단점을 개선하기 위하여 SD 카드의 스펙을 변경하면, 변경된 스펙은 기존의 SD 카드 및 기존의 SD 카드 호스트 제어기와 호환되지 않을 수 있다. 따라서, SD 카드 및 SD 카드 호스트 제어기의 스펙을 변경하지 않으면서도, SD 카드의 읽기 시에 과도하게 발생하는 인터럽트들의 수를 줄이는 새로운 장치 및 방법에 대한 연구가 절실하게 요구되고 있다.SD cards have been used for a long time and therefore have features that are not suitable for electronic devices of today's age. For example, an excessively large number of interrupts occur at the time of reading the SD card, and therefore, the SD card has a disadvantage that it excessively occupies resources of the central processing unit. If the specification of the SD card is changed to improve the above disadvantage, the changed specification may not be compatible with the existing SD card and the existing SD card host controller. Therefore, there is a desperate need for a new apparatus and method for reducing the number of interrupts that occur excessively at the time of reading the SD card, without changing the specifications of the SD card and the SD card host controller.

본 발명의 목적은, 감소된 인터럽트를 유발하며 메모리 카드로부터 파일을 읽는 방법을 제공하는 데에 있다.It is an object of the present invention to provide a method of reading a file from a memory card which causes a reduced interruption.

본 발명의 실시 예에 따른 메모리 카드로부터 파일을 읽는 방법은, 메모리 카드 호스트 제어기에 읽기 대상인 파일의 이름 및 버퍼 정보를 전달하는 단계, 상기 메모리 카드 호스트 제어기가 상기 메모리 카드의 파일 시스템을 읽어 상기 읽기 대상인 파일의 위치를 획득하는 단계, 상기 메모리 카드 호스트 제어기가 상기 획득된 위치를 이용하여 상기 메모리 카드로부터 상기 읽기 대상인 파일을 읽는 단계, 상기 메모리 카드 호스트 제어기가 상기 읽혀진 파일을 상기 버퍼 정보에 따라 버퍼 메모리에 저장하는 단계, 그리고 상기 메모리 카드 호스트 제어기가 상기 읽기 대상인 파일의 읽기가 완료되었음을 알리는 인터럽트를 상기 중앙 처리 장치로 전달하는 단계를 포함한다. 상기 메모리 카드 호스트 제어기는 상기 파일 시스템을 읽어 상기 읽기 대상인 파일의 위치를 획득하는 단계 및 상기 메모리 카드로부터 상기 읽기 대상인 파일을 읽는 단계에서 발생하는 인터럽트들을 상기 중앙 처리 장치로 전달하지 않고 자체적으로 처리하도록 구성된다.A method for reading a file from a memory card according to an embodiment of the present invention includes the steps of transferring a name of a file to be read and buffer information to a memory card host controller and reading the file system of the memory card by the memory card host controller Reading the file to be read from the memory card using the obtained position, the memory card host controller reading the file in accordance with the buffer information, And transferring an interrupt to the central processing unit to inform the memory card host controller that reading of the read target file is completed. Wherein the memory card host controller reads the file system to acquire the position of the file to be read and processes interrupts generated in the step of reading the file to be read from the memory card, .

본 발명에 따르면, SD 카드의 읽기 시에 발생하는 인터럽트들은 SD 카드 호스트 제어기에서 자체적으로 처리된다. 따라서, 감소된 인터럽트를 발생하며 중앙 처리의 장치의 더 적은 자원을 차지하는 메모리 카드로부터 파일을 읽는 방법이 제공된다.According to the present invention, the interrupts generated at the time of reading the SD card are processed by the SD card host controller itself. Thus, there is provided a method of reading a file from a memory card that generates a reduced interrupt and occupies less resources of the central processing unit.

도 1은 본 발명의 실시 예에 따른 전자 장치를 보여주는 블록도이다.
도 2는 도 1의 SD 카드의 구성을 보여준다.
도 3은 도 1의 호스트 장치의 SD 카드 제어기를 보여주는 블록도이다.
도 4는 호스트 장치에서 운영 체제가 구동되는 예를 보여준다.
도 5는 도 1의 호스트 장치가 SD 카드로부터 파일을 읽는 방법을 보여주는 순서도이다.
도 6은 SD 카드 제어기가 SD 카드에 대해 한 번의 읽기를 수행하는 과정을 보여주는 순서도이다.
도 7은 본 발명의 실시 예에 따른 SD 카드 제어기를 보여주는 블록도이다.
도 8은 본 발명의 실시 예에 따른 SD 카드 제어기를 포함하는 호스트 장치에서 운영 체제가 구동되는 예를 보여준다.
도 9는 도 7의 SD 카드 제어기를 포함하는 호스트 장치의 중앙 처리 장치가 파일 단위의 읽기를 수행하는 과정을 보여주는 순서도이다.
도 10은 SD 카드 제어기가 파일 단위의 읽기 요청에 따라 SD 카드로부터 파일을 읽는 방법을 보여주는 순서도이다.
1 is a block diagram illustrating an electronic device according to an embodiment of the present invention.
Fig. 2 shows a configuration of the SD card shown in Fig.
3 is a block diagram showing an SD card controller of the host device of FIG.
4 shows an example in which an operating system is operated in the host apparatus.
5 is a flowchart showing a method of reading a file from the SD card by the host apparatus of FIG.
6 is a flowchart showing a process in which the SD card controller performs one read to the SD card.
7 is a block diagram illustrating an SD card controller according to an embodiment of the present invention.
8 shows an example in which an operating system is operated in a host apparatus including an SD card controller according to an embodiment of the present invention.
FIG. 9 is a flowchart showing a process of reading a file unit by the central processing unit of the host apparatus including the SD card controller of FIG. 7. FIG.
10 is a flowchart showing how the SD card controller reads a file from the SD card in response to a file-level read request.

이하에서, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 정도로 상세히 설명하기 위하여, 본 발명의 실시 예를 첨부된 도면을 참조하여 설명하기로 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily carry out the technical idea of the present invention. .

도 1은 본 발명의 실시 예에 따른 전자 장치(100)를 보여주는 블록도이다. 도 1을 참조하면, 전자 장치(100)는 SD 카드(110) 및 호스트 장치(120)를 포함한다. 호스트 장치(120)는 SD 카드(110)를 메인 저장 장치 또는 확장된 저장 장치로 사용할 수 있다. SD 카드(110)는 호스트 장치(120)에 의해 블록 단위로 액세스될 수 있다. 예를 들어, 블록은 512 바이트일 수 있다. 호스트 장치(120)는 SD 카드(110)에 저장되는 파일들을 클러스터 단위로 관리할 수 있다. 예를 들어, 클러스터는 4096 바이트이며, 8 블록들에 해당할 수 있다.1 is a block diagram illustrating an electronic device 100 in accordance with an embodiment of the present invention. Referring to FIG. 1, an electronic device 100 includes an SD card 110 and a host device 120. The host device 120 may use the SD card 110 as a main storage device or an extended storage device. The SD card 110 can be accessed by the host apparatus 120 on a block basis. For example, a block may be 512 bytes. The host device 120 can manage the files stored in the SD card 110 on a cluster-by-cluster basis. For example, the cluster is 4096 bytes, which may correspond to 8 blocks.

호스트 장치(120)는 중앙 처리 장치(121, Central Processing Unit), 버퍼 메모리(122), 그리고 SD 카드 제어기(123)를 포함한다.The host device 120 includes a central processing unit (121), a buffer memory 122, and an SD card controller 123.

중앙 처리 장치(121)는 호스트 장치의 제반 동작을 제어하고, SD 카드(110)를 액세스할 수 있다. 중앙 처리 장치(121)는 운영 체제(Operating System) 및 운영 체제상에서 다양한 응용들을 구동할 수 있다. 다른 예로서, 중앙 처리 장치(121)는 펌웨어(Firmware)를 구동할 수 있다. 중앙 처리 장치(121)는 SD 카드(110)에 기입할 데이터 또는 SD 카드(110)로부터 읽히는 데이터를 버퍼 메모리(122)에 임시로 저장할 수 있다.The central processing unit 121 can control all operations of the host apparatus and access the SD card 110. [ The central processing unit 121 can drive various applications on an operating system and an operating system. As another example, the central processing unit 121 may drive firmware. The central processing unit 121 may temporarily store data to be written into the SD card 110 or data read from the SD card 110 in the buffer memory 122. [

SD 카드 제어기(123)는 중앙 처리 장치(120)의 요청에 따라 SD 카드(110)에 다양한 커맨드들을 전송하고, SD 카드(110)로부터 다양한 응답들을 수신하고, 그리고 SD 카드(110)와 다양한 데이터를 교환할 수 있다. SD 카드 제어기(123)는 SD 카드(110)를 초기화하고, SD 카드(110)에 데이터를 기입하거나 SD 카드(110)로부터 데이터를 읽을 수 있다. 예를 들어, SD 카드(110) 내에 제공될 수 있는 제어기와 구분하기 위하여, SD 카드 제어기(123)는 SD 카드 호스트 제어기라 불릴 수 있다.The SD card controller 123 sends various commands to the SD card 110 at the request of the central processing unit 120, receives various responses from the SD card 110, Can be exchanged. The SD card controller 123 can initialize the SD card 110 and write data to the SD card 110 or read data from the SD card 110. [ For example, in order to distinguish it from a controller that may be provided in the SD card 110, the SD card controller 123 may be referred to as an SD card host controller.

예시적으로, 호스트 장치(120)는 디지털 카메라, 스마트폰, 스마트패드 등과 같은 다양한 휴대용 전자 장치들 중 하나일 수 있다. SD 카드(110)는 호스트 장치(120)와 착탈 가능하도록 결합될 수 있다.Illustratively, the host device 120 may be one of a variety of portable electronic devices such as a digital camera, a smart phone, a smart pad, and the like. The SD card 110 may be detachably coupled to the host apparatus 120. [

도 2는 도 1의 SD 카드(110)의 구성을 보여준다. 도 1 및 도 2를 참조하면, SD 카드(110)에 파티션들(PT)이 형성될 수 있다. 예시적으로, 두 개의 파티션들(PT)이 형성된 것으로 도시되나, SD 카드(110)의 파티션들의 수는 한정되지 않는다. 예를 들어, SD 카드(110)에 하나의 파티션 또는 둘보다 많은 파티션들이 형성될 수 있다.FIG. 2 shows the structure of the SD card 110 of FIG. Referring to FIGS. 1 and 2, partitions PT may be formed on the SD card 110. Illustratively, although two partitions PT are shown as being formed, the number of partitions of the SD card 110 is not limited. For example, one partition or more than two partitions may be formed in the SD card 110.

각 파티션(PT)은 볼륨 부트 섹터(VBS, Volume, Boot Sector), MFT (Master File Table), 그리고 파일들(FILES)를 포함할 수 있다. 예를 들어, 볼륨 부트 섹터(VBS)는 하나의 블록으로 형성될 수 있다. 볼륨 부트 섹터(VBS)의 '0x30' 번지는 MFT가 저장된 시작 클러스터의 번호를 포함할 수 있다. MFT는 파일들이 저장된 위치들에 대한 정보를 포함할 수 있다. 파일들(FILES)은 호스트 장치(120)에 의해 SD 카드(110)에 기입된 파일들일 수 있다.Each partition PT may include a volume boot sector (VBS, Volume, Boot Sector), a master file table (MFT), and files (FILES). For example, the volume boot sector (VBS) may be formed into one block. The '0x30' address of the volume boot sector (VBS) may contain the number of the start cluster where the MFT is stored. The MFT may contain information about where the files are stored. The files FILES may be files written to the SD card 110 by the host apparatus 120. [

MFT는 복수의 MFT 엔트리들(ET)을 포함한다. 각 MFT 엔트리(ET)는 헤더(H), 속성 헤어들(AH, Attribute Header) 및 속성들(AT)을 포함한다. 예시적으로, 각 MFT 엔트리(ET)에 두 개의 속성들(AT)이 각각 속성 헤더들(AH)과 함께 포함되는 것으로 도시되어 있으나, 각 MFT 엔트리(ET) 내의 속성들(AT)의 수는 한정되지 않는다. 예를 들어, MFT 엔트리들(ET)의 속성들(AT)의 개수는 서로 다를 수 있다. 또한, 동일한 MFT 엔트리(ET) 내에서 또는 서로 다른 MFT 엔트리들(ET)에서, 속성들(AT)의 길이는 서로 다를 수 있다.The MFT includes a plurality of MFT entries (ET). Each MFT entry (ET) includes a header (H), attribute headers (AH) and attributes (AT). Illustratively, although two attributes (AT) are shown to be included with each attribute header (AH) in each MFT entry (ET), the number of attributes (AT) in each MFT entry It is not limited. For example, the number of attributes (AT) of the MFT entries (ET) may be different from each other. Also, within the same MFT entry (ET) or in different MFT entries (ET), the lengths of the attributes (AT) may be different.

각 MFT 엔트리(ET)는 하나의 디렉토리 또는 하나의 파일을 가리킬 수 있다. 예를 들어, 각 MFT 엔트리(ET)가 디렉토리를 가리킬 때에, '0x30' 타입의 '$FILE_NAME' 속성은 각 MFT 엔트리(ET)가 디렉토리임을 가리키며, 디렉토리 이름을 포함할 수 있다. '0x90' 타입의 '$INDEX_TOOR' 속성 및 '0xA0' 타입의 '$INDEX_ALLOCATION' 속성은 각 MFT 엔트리(ET)에 속한 하위 MFT 엔트리들(ET), 즉 디렉토리의 하위 디렉토리 또는 파일과 연관된 MFT 엔트리들(ET)의 정보를 포함한다.Each MFT entry (ET) may point to one directory or one file. For example, when each MFT entry (ET) points to a directory, the '$ FILE_NAME' attribute of type '0x30' indicates that each MFT entry (ET) is a directory and may include a directory name. The '$ INDEX_TOOR' attribute of type '0x90' and the '$ INDEX_ALLOCATION' attribute of type '0xA0' are used to identify MFT entries (ET) associated with each MFT entry (ET) (ET).

각 MFT 엔트리(ET)가 파일일 때에, '0x30' 타입의 '$FILE_NAME' 속성은 각 MFT 엔트리(ET)가 파일임을 가리키며, 파일 이름을 포함할 수 있다. '0x80' 타입의 '$DATA' 속성은 파일의 데이터 또는 파일들(FILES) 중에서 각 MFT 엔트리(ET)과 연관된 파일의 위치 정보를 포함할 수 있다.When each MFT entry (ET) is a file, the '$ FILE_NAME' attribute of type '0x30' indicates that each MFT entry (ET) is a file and may include a file name. The '$ DATA' attribute of type '0x80' may contain location information of the file associated with each MFT entry (ET) in the file's data or files (FILES).

예시적으로, 각 MFT 엔트리(ET)는 1024 바이트이며, 2 블록들에 해당할 수 있다.Illustratively, each MFT entry (ET) is 1024 bytes, and may correspond to two blocks.

도 3은 도 1의 호스트 장치(120)의 SD 카드 제어기(123)를 보여주는 블록도이다. 도 1 및 도 3을 참조하면, SD 카드 제어기(123)는 레지스터들(RT), DMAC (Direct Memory Access Controller), 커맨드 처리기(CP), 그리고 데이터 처리기(DP)를 포함한다.3 is a block diagram showing the SD card controller 123 of the host device 120 of FIG. 1 and 3, the SD card controller 123 includes registers (RT), a direct memory access controller (DMAC), a command processor (CP), and a data processor (DP).

레지스터들(RT)은 중앙 처리 장치(121)로부터의 제어 정보들이 저장되는 제어 레지스터들 및 SD 카드(110) 또는 SD 카드 제어기(123)의 동작 결과에 대한 정보가 저장되는 상태 레지스터들을 포함할 수 있다. 예를 들어, 제어 레지스터들은 중앙 처리 장치(121)에 의해 기입되며 SD 카드 제어기(123)에 의해 읽힐 수 있다. 상태 레지스터들은 SD 카드 제어기(123)에 의해 기입되며 중앙 처리 장치(121)에 의해 읽힐 수 있다. 예를 들어, 레지스터들(RT)는 버스 슬레이브 인터페이스(BSI, Bus Slave Interface)를 통해 중앙 처리 장치(121)와 통신할 수 있다.The registers RT may include control registers in which control information from the central processing unit 121 is stored and status registers in which information on the operation result of the SD card 110 or the SD card controller 123 is stored have. For example, the control registers may be written by the central processing unit 121 and read by the SD card controller 123. The status registers are written by the SD card controller 123 and can be read by the central processing unit 121. [ For example, the registers RT may communicate with the central processing unit 121 via a bus slave interface (BSI).

DMAC는 SD 카드(110)에 대한 쓰기 동작 시에 버퍼 메모리(122)에 저장된 데이터를 읽고, 읽혀진 데이터를 데이터 처리기(DP)로 전달할 수 있다. DMAC는 SD 카드(110)에 대한 읽기 동작 시에 데이터 처리기(DP)로부터 수신되는 데이터를 버퍼 메모리(122)에 기입할 수 있다. 예를 들어, DMAC는 버스 마스터 인터페이스(BMI)를 통해 버퍼 메모리(122)와 통신할 수 있다.The DMAC may read the data stored in the buffer memory 122 and transmit the read data to the data processor (DP) during a write operation to the SD card (110). The DMAC can write data received from the data processor (DP) to the buffer memory (122) during a read operation on the SD card (110). For example, the DMAC may communicate with the buffer memory 122 via a bus master interface (BMI).

커맨드 처리기(CP)는 레지스터들(RT)에 저장된 제어 정보에 따라 SD 카드(110)로 커맨드(CMD)를 전송할 수 있다. 또한, 커맨드 처리기(CP)는 SD 카드(110)로부터 전달되는 응답에 따라 레지스터들(RT)에 상태 정보를 저장할 수 있다. 커맨드 처리기(CP)는 SD 카드(110)와의 통신 결과 또는 다양한 상황에서 인터럽트(IRQ)를 발생할 수 있다. 발생된 인터럽트(IRQ)는 중앙 처리 장치(121)로 전달될 수 있다.The command processor CP can transmit the command CMD to the SD card 110 according to the control information stored in the registers RT. In addition, the command processor CP may store status information in the registers RT according to a response transmitted from the SD card 110. [ The command processor CP may generate an interrupt (IRQ) as a result of communication with the SD card 110 or in various situations. The generated interrupt (IRQ) may be transmitted to the central processing unit 121. [

데이터 처리기(DP)는 DMAC를 통해 수신되는 데이터(DATA)를 SD 카드(110)로 전달하고, SD 카드(110)로부터 전달되는 데이터(DATA)를 DMAC로 전달할 수 있다.The data processor DP can transfer data (DATA) received through the DMAC to the SD card 110 and transfer the data (DATA) transmitted from the SD card 110 to the DMAC.

SD 카드 제어기(123)는 호스트 장치(120)에서 생성되는 클럭 신호(CLK)를 SD 카드(110)로 전달할 수 있다.The SD card controller 123 can transmit the clock signal CLK generated by the host apparatus 120 to the SD card 110. [

예시적으로, 중앙 처리 장치(121)가 운영 체제를 구동하지 않고 펌웨어를 구동하는 경우, 중앙 처리 장치(121)는 SD 카드 제어기(123)로 읽기 요청을 직접 전달할 수 있다. 중앙 처리 장치(121)가 운영 체제를 구동하는 경우, 중앙 처리 장치(121)는 운영 체제의 커널을 통해 SD 카드 제어기(123)로 읽기 요청을 전달할 수 있다.Illustratively, when the central processing unit 121 drives the firmware without running the operating system, the central processing unit 121 can directly forward the read request to the SD card controller 123. [ When the central processing unit 121 drives the operating system, the central processing unit 121 can forward the read request to the SD card controller 123 through the kernel of the operating system.

도 4는 호스트 장치(120)에서 운영 체제가 구동되는 예를 보여준다. 도 1 및 도 4를 참조하면, 중앙 처리 장치(121)에 의해 구동되는 응용(APP)은 운영 체제의 커널(KER)을 통해 SD 카드(110)를 액세스할 수 있다. 커널(KER)은 호스트 장치(120)와 연결된 저장 장치들의 저장 공간들을 관리하는 가상 파일 시스템 계층(VFSL, Virtual File System Layer), 호스트 장치(120)에 연결된 저장 장치들의 저장 공간들을 각각 관리하는 개별 파일 시스템들(FS), 버퍼 캐시(BC), 입력 및 출력 시기를 조정하는 입출력 스케줄러(IOS), 호스트 장치(120)와 연관된 각 저장 장치들을 관리하는 블록 드라이버(BD), 그리고 SD 카드 제어기(123)를 포함한다.4 shows an example in which the operating system is driven in the host apparatus 120. [ 1 and 4, an application (APP) driven by the central processing unit 121 can access the SD card 110 through a kernel (KER) of the operating system. The KER includes a virtual file system layer (VFSL) for managing storage spaces of storage devices connected to the host device 120, an individual storage device for managing storage spaces of storage devices connected to the host device 120, A file system (FS), a buffer cache (BC), an input / output scheduler (IOS) for adjusting input and output timing, a block driver (BD) for managing each storage device associated with the host device 120, 123).

응용(APP)에 의해 발생되는 읽기 요청은 커널(KER)의 계층들을 통해 SD 카드(110)로 전달될 수 있다.A read request generated by an application (APP) may be transferred to the SD card 110 through the layers of the kernel (KER).

도 5는 도 1의 호스트 장치(120)가 SD 카드(110)로부터 파일을 읽는 방법을 보여주는 순서도이다. 도 1 내지 도 5를 참조하면, S110 단계에서, 호스트 장치(120)는 SD 카드(110)의 볼륨 부트 섹터(VBS)의 '0x30' 번지를 참조하여, MFT의 시작 클러스터의 번호를 읽을 수 있다. 예를 들어, 호스트 장치(120)는 볼륨 부트 섹터(VBS)가 속한 블록을 읽고, 읽혀진 볼륨 부트 섹터(VBS)의 '0x30' 번지를 참조할 수 있다.5 is a flowchart showing how the host apparatus 120 of FIG. 1 reads a file from the SD card 110. FIG. Referring to FIGS. 1 to 5, in step S110, the host device 120 can read the number of the start cluster of the MFT by referring to the '0x30' address of the volume boot sector (VBS) of the SD card 110 . For example, the host device 120 may read the block to which the volume boot sector VBS belongs and refer to the '0x30' address of the read volume boot sector VBS.

S120 단계에서, 호스트 장치(120)는 SD 카드(110)의 MFT의 MFT 엔트리(ET) 또는 MFT 엔트리들(ET)을 읽을 수 있다. 예를 들어, 호스트 장치(120)는 단일 블록 읽기 또는 다중 블록 읽기 커맨드를 SD 카드(110)로 전송하여, SD 카드(110)로부터 MFT 엔트리(ET) 또는 MFT 엔트리들(ET)에 해당하는 단일 블록 또는 다중 블록들을 수신할 수 있다. 예를 들어, 호스트 장치(120)는 각 MFT 엔트리(ET)의 '$INDEX_ROOT' 속성 및 '$INDEX_ALLOCATION' 속성을 참조하여 목표 디렉토리의 MFT 엔트리(ET)를 추적하고, 추적된 MFT 엔트리(ET)에 속한 하위 MFT 엔트리들(ET)의 파일 이름들을 목표 파일의 이름과 비교하여 목표 파일의 MFT 엔트리(ET)를 검출할 수 있다.In step S120, the host apparatus 120 can read the MFT entry (ET) or the MFT entries (ET) of the MFT of the SD card (110). For example, the host device 120 may send a single block read or multi-block read command to the SD card 110 to retrieve a single block read or multi-block read command from the SD card 110 into the MFT entry (ET) Block or multiple blocks. For example, the host device 120 tracks the MFT entry (ET) of the target directory by referring to the '$ INDEX_ROOT' attribute and the '$ INDEX_ALLOCATION' attribute of each MFT entry (ET) It is possible to detect the MFT entry (ET) of the target file by comparing the file names of the lower MFT entries (ET) belonging to the target file with the names of the target file.

S130 단계에서, 목표 파일의 MFT 엔트리가 획득되었는지 판별된다. 한 번의 읽기(예를 들어, 단일 블록 읽기 또는 다중 블록 읽기)를 통해 읽혀진 MFT 엔트리(ET) 또는 MFT 엔트리들(ET)에서 목표 파일의 MFT 엔트리가 획득되지 않으면, S120 단계에서 호스트 장치(120)는 MFT 엔트리(ET) 또는 MFT 엔트리들(ET)을 추가적으로 읽을 수 있다.In step S130, it is determined whether the MFT entry of the target file is acquired. If the MFT entry of the target file is not obtained in the MFT entry (ET) or the MFT entries (ET) read through one read (e.g., a single block read or a multi-block read) Can additionally read the MFT entry (ET) or the MFT entries (ET).

목표 파일의 MFT 엔트리(ET)가 획득되었으면, S140 단계에서, 호스트 장치(120)는 획득된 MFT 엔트리(ET)의 '$DATA' 속성을 참조하여, 파일들(FILES) 중에서 목표 파일을 읽을 수 있다.If the MFT entry ET of the target file has been acquired, the host device 120 refers to the '$ DATA' attribute of the acquired MFT entry ET in step S140 to read the target file from the files FILES have.

도 6은 호스트 장치(120)가 SD 카드(110)에 대해 한 번의 읽기를 수행하는 과정의 예를 보여주는 순서도이다. 도 1 내지 도 6을 참조하면, S210 단계에서, 중앙 처리 장치(121)는 SD 카드 제어기(123)로 읽기 요청을 전달할 수 있다. 예를 들어, 중앙 처리 장치(121)는 클러스터 단위 또는 SD 카드(110)의 블록 단위의 데이터를 요청하는 읽기 요청을 SD 카드 제어기(123)로 전달할 수 있다.6 is a flowchart showing an example of a process in which the host apparatus 120 performs a single read to the SD card 110. FIG. Referring to FIGS. 1 to 6, in step S210, the central processing unit 121 can transmit a read request to the SD card controller 123. [ For example, the central processing unit 121 may transmit a read request to the SD card controller 123 requesting data on a cluster basis or on a block-by-block basis of the SD card 110. [

S220 단계에서, SD 카드 제어기(123)는 읽기 커맨드(S220)를 SD 카드(110)로 전달할 수 있다. 예를 들어, 읽기 커맨드(S220)는 단일 블록 읽기 커맨드 또는 다중 블록 읽기 커맨드일 수 있다.In step S220, the SD card controller 123 can forward the read command S220 to the SD card 110. [ For example, the read command S220 may be a single block read command or a multiple block read command.

S220 단계에서 읽기 커맨드를 전송한 후 S230 단계에서, SD 카드 제어기(123)는 읽기 커맨드를 전송하였음을 알리는 제1 인터럽트를 생성할 수 있다. 제1 인터럽트는 중앙 처리 장치(121)로 전달된다.After transmitting the read command in step S220, the SD card controller 123 may generate a first interrupt signal indicating that the read command has been transmitted in step S230. The first interrupt is transmitted to the central processing unit 121.

S240 단계에서, SD 카드(110)는 읽기 커맨드를 수신하였음을 알리는 응답을 SD 카드 제어기(123)로 전달할 수 있다.In step S240, the SD card 110 may transmit a response to the SD card controller 123 indicating that the read command has been received.

응답이 수신됨에 따라, S250 단계에서, SD 카드 제어기(123)는 응답이 수신되었음을 알리는 제2 인터럽트를 생성할 수 있다. 제2 인터럽트는 중앙 처리 장치(121)로 전달된다.As the response is received, in step S250, the SD card controller 123 may generate a second interrupt signaling that a response has been received. The second interrupt is transmitted to the central processing unit 121.

S260 단계에서, SD 카드(110)는 읽기 커맨드에 의해 요청된 데이터를 SD 카드 제어기(123)로 전달할 수 있다.In step S260, the SD card 110 can transmit the data requested by the read command to the SD card controller 123. [

S270 단계에서, SD 카드 제어기(123)의 DMAC는 SD 카드(110)로부터 전달되는 데이터를 버퍼 메모리(122)에 저장할 수 있다.In step S270, the DMAC of the SD card controller 123 may store the data transmitted from the SD card 110 in the buffer memory 122. [

DMAC의 데이터 전송이 완료되면, S280 단계에서, SD 카드 제어기(123)는 데이터의 전송이 완료되었음을 알리는 제3 인터럽트를 생성할 수 있다. 제3 인터럽트는 중앙 처리 장치(121)로 전달된다. 도 6을 참조하여 설명된 바와 같이, SD 카드 제어기(123)가 한 번의 읽기를 수행하는 동안에 3번의 인터럽트들이 발생한다. 도 5를 참조하여 설명된 바와 같이, 호스트 장치(120)가 SD 카드(110)로부터 파일을 읽는 데에 복수회의 읽기들이 요구된다. 즉, 호스트 장치(120)가 SD 카드(110)로부터 파일을 읽는 동안 다수의 인터럽트들이 발생하며, 중앙 처리 장치(121)는 인터럽트들을 처리하는 데에 자원을 할당하여야 한다.When the data transfer of the DMAC is completed, in step S280, the SD card controller 123 may generate a third interrupt signal indicating that the data transfer is completed. The third interrupt is transmitted to the central processing unit 121. [ As described with reference to FIG. 6, three interrupts occur while the SD card controller 123 performs one read. As described with reference to Fig. 5, a plurality of readings are required for the host device 120 to read a file from the SD card 110. [ That is, a plurality of interrupts occur while the host apparatus 120 reads a file from the SD card 110, and the central processing unit 121 has to allocate resources to process the interrupts.

도 7은 본 발명의 실시 예에 따른 SD 카드 제어기(223)를 보여주는 블록도이다. 도 3의 SD 카드 제어기(123)와 비교하면, SD 카드 제어기(223)는 멀티플렉서(MUX) 및 읽기 제어기(RC)를 더 포함한다. 간결한 설명을 위하여, 도 3을 참조하여 설명된 동작들 및 구성 요소들에 대한 설명은 생략된다.7 is a block diagram illustrating an SD card controller 223 in accordance with an embodiment of the present invention. Compared to the SD card controller 123 of FIG. 3, the SD card controller 223 further includes a multiplexer (MUX) and a read controller (RC). For the sake of brevity, descriptions of the operations and components described with reference to FIG. 3 are omitted.

멀티플렉서(MUX)는 제1 모드에서 레지스터들(RT)을 버스 슬레이브 인터페이스(BSI)에 연결하고, 인터럽트(IRQ)를 중앙 처리 장치(121)로 출력할 수 있다. 멀티플렉서(MUX)는 제2 모드에서 레지스터들(RT)을 읽기 제어기(RC)에 연결하고, 인터럽트(IRQ)를 읽기 제어기(RC)로 출력할 수 있다.The multiplexer MUX may connect the registers RT to the bus slave interface (BSI) in a first mode and output an interrupt (IRQ) to the central processing unit 121. The multiplexer MUX may connect the registers RT to the read controller RC in the second mode and output the interrupt (IRQ) to the read controller RC.

제2 모드에서, 읽기 제어기(RC)는 레지스터들(RT)을 참조하여 읽기 요청을 식별하고, 읽기 요청에 따라 커맨드 처리기(CP)에서 커맨드들이 생성되도록 레지스터들(RT)을 설정할 수 있다. 예를 들어, 읽기 제어기(RC)는 레지스터들(RT)을 참조하여 파일 단위의 읽기 요청을 식별할 수 있다. 읽기 제어기(RC)는 파일 단위의 읽기 요청일 식별하고, 블록 또는 클러스터 단위의 읽기 요청을 레지스터들(RT)에 설정할 수 있다. 제2 모드에서, 읽기 제어기(RC)는 커맨드 처리기(CP)로부터 발생되는 인터럽트들(IRQ)을 처리할 수 있다.In the second mode, the read controller RC can refer to the registers RT to identify the read request and to set the registers RT so that the commands are generated in the command processor CP according to the read request. For example, the read controller (RC) can refer to the registers (RT) to identify a file-based read request. The read controller (RC) can identify the read request of a file unit, and set a block or cluster read request to the registers (RT). In the second mode, the read controller RC can process interrupts (IRQ) generated from the command processor CP.

예시적으로, 제1 모드는 중앙 처리 장치(121)가 SD 카드 제어기(223)에 파일 단위의 읽기 요청을 전달하기 이전 또는 읽기가 완료된 이후일 수 있다. 중앙 처리 장치(121)가 레지스터들(RT)에 파일 단위의 읽기 요청을 저장하면, SD 카드 제어기(223)는 제2 모드로 진입할 수 있다. 제2 모드에서, 읽기 제어기(RC)는 커맨드 처리기(CP)에 의해 발생되는 인터럽트들(IRQ)을 처리하며 읽기를 제어할 수 있다. DMAC가 버퍼 메모리(122)에 데이터의 저장을 완료하면, 읽기 제어기(RC)는 파일 단위의 읽기가 완료되었음을 알리는 인터럽트(IRQ)를 중앙 처리 장치(121)로 전달하고, SD 카드 제어기(223)는 제1 모드로 복귀할 수 있다.Illustratively, the first mode may be before or after the central processing unit 121 has transmitted a file-by-file read request to the SD card controller 223. When the central processing unit 121 stores a file-based read request in the registers RT, the SD card controller 223 can enter the second mode. In the second mode, the read controller (RC) processes interrupts (IRQ) generated by the command processor (CP) and can control the read. When the DMAC finishes storing data in the buffer memory 122, the read controller RC transfers to the central processing unit 121 an interrupt (IRQ) indicating completion of file unit read, Can return to the first mode.

예시적으로, SD 카드 제어기(223)는 도 1의 호스트 장치(120)에서 SD 카드 제어기(123)를 대체하여 호스트 장치(120)에 포함될 수 있다. SD 카드 제어기(223)는 호스트 장치(120)의 중앙 처리 장치(121) 및 버퍼 메모리(122), 그리고 SD 카드(110)와 상호 동작하도록 구성될 수 있다.Illustratively, the SD card controller 223 may be included in the host device 120 in place of the SD card controller 123 in the host device 120 of FIG. The SD card controller 223 can be configured to interoperate with the central processing unit 121 and the buffer memory 122 of the host apparatus 120 and with the SD card 110. [

도 7을 참조하여 설명된 바와 같이, SD 카드 제어기(223)가 파일 단위의 읽기 요청을 수신하고, 파일 단위의 읽기 요청을 처리하는 동안에 발생하는 인터럽트(IRQ)들을 자체적으로 처리하도록 구성될 수 있다. 도 7의 SD 카드 제어기(223)에 따르면, 중앙 처리 장치(121)로 전달되는 인터럽트들(IRQ)의 수가 감소하고, 중앙 처리 장치(121)의 자원이 SD 카드(110)의 읽기로 인해 소비되는 양이 감소된다.As described with reference to FIG. 7, the SD card controller 223 may be configured to itself handle the interrupts (IRQs) that occur while receiving a file-based read request and processing a file-based read request . According to the SD card controller 223 of FIG. 7, the number of interrupts (IRQ) transmitted to the central processing unit 121 decreases and the resources of the central processing unit 121 are consumed due to the reading of the SD card 110 Is reduced.

도 8은 본 발명의 실시 예에 따른 SD 카드 제어기(223)를 포함하는 호스트 장치(120)에서 운영 체제가 구동되는 예를 보여준다. 도 4와 비교하면, 응용(APP)과 SD 카드 제어기(123) 사이에 통신 경로(CP)가 형성될 수 있다. 응용(APP)은 SD 카드 제어기(123)와 직접 연결된 통신 경로(CP)를 통해 SD 카드 제어기(123)로 파일 읽기 요청을 전달할 수 있다. 또한, 응용(APP)은 통신 경로(CP)를 통해 SD 카드(110)로부터 읽힌 데이터를 수신할 수 있다. 예를 들어, SD 카드 제어기(223)는 읽혀진 데이터를 버퍼 메모리(122)에 저장하고, 버퍼 메모리(122)에 데이터의 저장이 완료되었음을 응용(APP)에 알릴 수 있다. 다른 예로서, SD 카드 제어기(223)는 읽혀진 데이터를 버퍼 메모리(122)에 저장하고, 버퍼 메모리(122)에 데이터의 저장이 완료되었음을 버퍼 메모리(122)의 주소와 함께 응용(APP)에 알릴 수 있다.8 shows an example in which an operating system is operated in a host apparatus 120 including an SD card controller 223 according to an embodiment of the present invention. Compared with FIG. 4, a communication path CP can be formed between the application APP and the SD card controller 123. The application APP may forward the file read request to the SD card controller 123 via a communication path (CP) directly connected to the SD card controller 123. In addition, the application (APP) can receive the data read from the SD card 110 via the communication path (CP). For example, the SD card controller 223 may store the read data in the buffer memory 122 and inform the application APP that the storage of the data in the buffer memory 122 is completed. As another example, the SD card controller 223 may store the read data in the buffer memory 122 and notify the APP (APP) together with the address of the buffer memory 122 that the data has been stored in the buffer memory 122 .

도 7을 참조하여 설명된 바와 같이 SD 카드 제어기(223)가 파일 단위의 읽기 요청을 처리하도록 구성되고, 그리고 도 8을 참조하여 설명된 바와 같이 응용(APP)과 SD 카드 제어기(223) 사이에 통신 경로(CP)가 제공되면, 응용(APP)에서 발생되는 읽기 요청이 커널(KER)의 일부만을 통하여 처리될 수 있다. 따라서, 응용(APP)을 읽기 요청을 처리하는 데에 소비되는 중앙 처리 장치(121)의 자원의 양이 감소된다.The SD card controller 223 is configured to process a file-based read request as described with reference to FIG. 7, and the application (APP) and the SD card controller 223 When a communication path (CP) is provided, a read request issued by an application (APP) can be processed only through a part of the kernel (KER). Accordingly, the amount of resources of the central processing unit 121 consumed for processing the application (APP) is reduced.

도 9는 도 7의 SD 카드 제어기(223)를 포함하는 호스트 장치(120)의 중앙 처리 장치(121)가 파일 단위의 읽기를 수행하는 과정을 보여주는 순서도이다. 도 1, 도 7 및 도 9를 참조하면, S310 단계에서, 중앙 처리 장치(121)는 읽힌 파일이 저장될 공간을 버퍼 메모리(122)에 할당할 수 있다. 예를 들어, 중앙 처리 장치(121)는 할당된 공간들이 링크드 리스트(linked list) 형태로 구성된 버퍼 리스트를 생성할 수 있다. 중앙 처리 장치(121)는 생성된 버퍼 리스트를 SD 카드 제어기(223)로 전달할 수 있다. 예를 들어, 중앙 처리 장치(121)는 버퍼 리스트를 SD 카드 제어기(223)의 레지스터들(RT)에 기입하거나 또는 버퍼 리스트의 하나의 저장 공간의 주소를 제어기(223)의 레지스터들(RT)에 기입할 수 있다.9 is a flowchart illustrating a process of reading data in units of files by the central processing unit 121 of the host apparatus 120 including the SD card controller 223 of FIG. Referring to FIGS. 1, 7, and 9, in step S310, the central processing unit 121 may allocate a space in which the read file is to be stored to the buffer memory 122. FIG. For example, the central processing unit 121 may generate a buffer list in which allocated spaces are formed in the form of a linked list. The central processing unit 121 can transmit the generated buffer list to the SD card controller 223. [ For example, the central processing unit 121 writes the buffer list to the registers RT of the SD card controller 223 or the address of one storage space of the buffer list to the registers RT of the controller 223, .

S320 단계에서, 중앙 처리 장치(121)는 목표 파일의 이름 및 목표 파일의 경로를 SD 카드 제어기(223)의 레지스터들(RT)에 기입할 수 있다. 예를 들어, 중앙 처리 장치(121)는 목표 파일 중에서 읽을 목표 부분에 대한 정보를 레지스터들(RT)에 더 기입할 수 있다.In step S320, the central processing unit 121 can write the name of the target file and the path of the target file into the registers (RT) of the SD card controller 223. [ For example, the central processing unit 121 may further write information on a target portion to be read out among the target files into the registers RT.

S330 단계에서, 중앙 처리 장치(121)는 SD 카드 제어기(223)에 읽기 요청을 전송할 수 있다.In step S330, the central processing unit 121 can send a read request to the SD card controller 223. [

이후에, 읽기가 완료되었음을 알리는 인터럽트가 발생할 때까지, 중앙 처리 장치(121)는 읽기 요청과 연관된 프로세스를 중지할 수 있다. 읽기가 완료되었음을 알리는 인터럽트가 발생하면, 중앙 처리 장치(121)는 읽기 요청과 연관된 프로세스를 재개하고, 해당 프로세스를 계속 수행할 수 있다.Thereafter, the central processing unit 121 may suspend the process associated with the read request until an interrupt occurs indicating that the read has been completed. When an interrupt indicating that the reading has been completed occurs, the central processing unit 121 can resume the process associated with the read request and continue the process.

도 10은 SD 카드 제어기(223)가 파일 단위의 읽기 요청에 따라 SD 카드(110)로부터 파일을 읽는 방법을 보여주는 순서도이다. 도 1, 도 7 및 도 10을 참조하면, S410 단계에서 SD 카드 제어기(223)는 프로세서(121)로부터 파일 읽기 요청을 수신할 수 있다. 예를 들어, SD 카드 제어기(223)는 제1 모드에서 읽기 요청을 수신할 수 있다. 읽기 요청이 수신됨에 따라, SD 카드 제어기(223)는 제2 모드로 진입할 수 있다. 예를 들어, SD 카드 제어기(223)는 레지스터들(223)에 저장된 읽기 요청, 파일 이름 및 파일 경로를 식별할 수 있다.10 is a flowchart showing how the SD card controller 223 reads a file from the SD card 110 in response to a file-level read request. Referring to FIGS. 1, 7, and 10, the SD card controller 223 can receive a file read request from the processor 121 in step S410. For example, the SD card controller 223 may receive a read request in the first mode. As the read request is received, the SD card controller 223 may enter the second mode. For example, the SD card controller 223 may identify read requests, file names, and file paths stored in the registers 223.

S420 단계에서, SD 카드 제어기(223)는 SD 카드(110)에 읽기 커맨드를 전송할 수 있다. 예를 들어, 읽기 제어기(RC)는 파일 단위의 읽기 요청에 기반하여 클러스터 또는 블록 단위의 읽기 요청을 레지스터들(RT)에 기입할 수 있다. 커맨드 처리기(CP)는 클러스터 또는 파일 단위의 읽기 요청에 따라 읽기 커맨드를 생성할 수 있다. 읽기 제어기(RC)는 읽기 커맨드를 전송함에 따라 발생하는 인터럽트(IRQ)를 처리할 수 있다.In step S420, the SD card controller 223 can transmit a read command to the SD card 110. [ For example, the read controller (RC) may write a cluster or block read request to the registers (RT) based on a file-level read request. The command processor CP can generate a read command in response to a cluster or file unit read request. The read controller (RC) can process an interrupt (IRQ) that occurs as it transmits a read command.

S430 단계에서, SD 카드 제어기(223)는 SD 카드(110)로부터 응답을 수신할 수 있다. 읽기 제어기(RC)는 응답을 수신함에 따라 발생하는 인터럽트(IRQ)를 처리할 수 있다.In step S430, the SD card controller 223 can receive a response from the SD card 110. [ The read controller (RC) can process an interrupt (IRQ) that occurs as it receives the response.

S440 단계에서, SD 카드 제어기(223)는 SD 카드(110)로부터 데이터를 수신할 수 있다. DMAC는 수신된 데이터를 버퍼 메모리(122)에 저장할 수 있다. 읽기 제어기(RC)는 DMAC의 데이터 전송이 완료됨에 따라 발생하는 인터럽트(IRQ)를 처리할 수 있다.In step S440, the SD card controller 223 can receive data from the SD card 110. [ The DMAC may store the received data in the buffer memory 122. The read controller (RC) can process interrupts (IRQ) that occur as the data transfer of the DMAC is completed.

S420 단계 내지 S450 단계는 한 번의 읽기를 형성할 수 있다. SD 카드 제어기(223)는 파일 읽기 요청에 의해 요청된 목표 파일이 버퍼 메모리(122)에 로드될 때까지, 읽기를 반복적으로 수행할 수 있다.Steps S420 through S450 may form a single reading. The SD card controller 223 can repeatedly perform reading until the target file requested by the file read request is loaded into the buffer memory 122. [

목표 파일이 버퍼 메모리(122)에 로드되면, 읽기 제어기(EC)는 인터럽트를 중앙 처리 장치(121)로 전송할 수 있다. 이후에, SD 카드 제어기(223)는 제1 모드로 복귀할 수 있다.When the target file is loaded into the buffer memory 122, the read controller EC can send an interrupt to the central processing unit 121. [ Thereafter, the SD card controller 223 can return to the first mode.

예를 들어, 첫 번째 읽기 시에, 읽기 제어기(RC)는 SD 카드의 마스터 부트 레코드를 읽어 파티션의 시작 블록을 식별할 수 있다. 두 번째 읽기 시에, 읽기 제어기(RC)는 볼륨 부트 섹터(VBS, 도 2 참조)의 '0x30' 번지를 읽어 MFT의 시작 클러스터를 식별할 수 있다. 다른 예로서, 읽기 제어기(RC)는 호스트 장치(120)가 SD 카드(110)를 초기화하고 마운트하는 동안, 호스트 장치(120)가 파티션의 시작 블록을 읽는 것을 감청하고, 필요한 정보를 저장할 수 있다. 또한, 읽기 제어기(RC)는 호스트 장치(120)가 MFT의 시작 클러스터를 액세스하는 것을 감청하고, 필요한 정보를 저장할 수 있다. 이 경우, 첫 번째 읽기와 두 번째 읽기는 읽기 요청 시에 생략될 수 있다.For example, on the first read, the read controller (RC) can read the master boot record of the SD card to identify the start block of the partition. At the time of the second read, the read controller (RC) can read the '0x30' address of the volume boot sector (VBS, see FIG. 2) to identify the starting cluster of the MFT. As another example, the read controller RC may listen to the host device 120 reading the start block of the partition and store the necessary information while the host device 120 initializes and mounts the SD card 110 . In addition, the read controller RC can listen to the host device 120 accessing the start cluster of the MFT and store the necessary information. In this case, the first read and the second read may be omitted at the time of the read request.

세 번째 읽기에서부터, 읽기 제어기(RC)는 MFT의 엔트리들을 순차적으로 읽고, 목표 파일의 이름 및 위치와 비교할 수 있다. 예를 들어, 읽기 제어기(RC)는 MFT 엔트리들을 읽고, 목표 파일의 위치의 디렉토리에 해당하는 MFT 엔트리를 검출할 수 있다. 읽기 제어기(RC)는 검출된 MFT 엔트리의 하위의 MFT 엔트리들에서 목표 파일의 이름에 해당하는 MFT 엔트리를 획득할 수 있다.From the third reading, the read controller (RC) reads the entries of the MFT sequentially and compares them with the name and location of the target file. For example, the read controller (RC) may read the MFT entries and detect MFT entries corresponding to the directory of the location of the target file. The read controller RC may obtain an MFT entry corresponding to the name of the target file in the MFT entries below the detected MFT entry.

목표 파일에 대응하는 MFT 엔트리가 획득되면, 읽기 제어기(RC)는 획득된 MFT 엔트리의 '$DATA' 속성을 참조하여 목표 파일이 저장된 클러스터들의 위치들을 획득할 수 있다. 읽기 제어기(RC)는 목표 파일이 저장된 클러스터들에 대한 읽기들을 발생할 수 있다. DMAC는 SD 카드(110)로부터 전달되는 데이터를 버퍼 메모리(122)에 저장할 수 있다. Once the MFT entry corresponding to the target file is obtained, the read controller RC can refer to the '$ DATA' attribute of the obtained MFT entry to obtain the positions of the clusters in which the target file is stored. The read controller (RC) can generate reads for the clusters in which the target file is stored. The DMAC may store the data transferred from the SD card 110 in the buffer memory 122. [

상술된 바와 같이, SD 카드 제어기(223)는 파일 읽기 요청에 응답하여 복수의 읽기들을 수행할 수 있다. SD 카드 제어기(223)가 하나의 파일을 SD 카드(110)로부터 읽을 때에, SD 카드 제어기(223)는 하나의 인터럽트(IRQ)만을 생성한다. 따라서, 읽기 시에 중앙 처리 장치(121)에서 소비되는 자원의 양이 감소된다.As described above, the SD card controller 223 can perform a plurality of reads in response to a file read request. When the SD card controller 223 reads one file from the SD card 110, the SD card controller 223 generates only one interrupt (IRQ). Accordingly, the amount of resources consumed in the central processing unit 121 at the time of reading is reduced.

본 발명의 상세한 설명에서는 구체적인 실시 예에 관하여 설명하였으나, 본 발명의 범위와 기술적 사상에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능하다. 그러므로 본 발명의 범위는 상술한 실시 예에 국한되어 정해져서는 안되며 후술하는 특허청구범위뿐만 아니라 이 발명의 특허청구범위와 균등한 것들에 의해 정해져야 한다.While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. Therefore, the scope of the present invention should not be limited to the above-described embodiments, but should be determined by the equivalents of the claims of the present invention as well as the claims of the following.

100; 전자 장치
110; SD 카드
120; 호스트 장치
121; 중앙 처리 장치
122; 버퍼 메모리
123, 223; SD 카드 제어기
CP; 커맨드 처리기
DP; 데이터 처리기
RT; 레지스터들
DMAC; 다이렉트 메모리 액세스 제어기
RC; 읽기 제어기
MUX; 멀티플렉서
100; Electronic device
110; SD card
120; Host device
121; Central processing unit
122; Buffer memory
123, 223; SD card controller
CP; Command processor
DP; Data processor
RT; Registers
DMAC; Direct memory access controller
RC; Read controller
MUX; Multiplexer

Claims (1)

메모리 카드로부터 파일을 읽는 방법에 있어서:
메모리 카드 호스트 제어기에 읽기 대상인 파일의 이름 및 버퍼 정보를 전달하는 단계;
상기 메모리 카드 호스트 제어기가 상기 메모리 카드의 파일 시스템을 읽어 상기 읽기 대상인 파일의 위치를 획득하는 단계;
상기 메모리 카드 호스트 제어기가 상기 획득된 위치를 이용하여 상기 메모리 카드로부터 상기 읽기 대상인 파일을 읽는 단계;
상기 메모리 카드 호스트 제어기가 상기 읽혀진 파일을 상기 버퍼 정보에 따라 버퍼 메모리에 저장하는 단계; 그리고
상기 메모리 카드 호스트 제어기가 상기 읽기 대상인 파일의 읽기가 완료되었음을 알리는 인터럽트를 상기 중앙 처리 장치로 전달하는 단계를 포함하고,
상기 메모리 카드 호스트 제어기는 상기 파일 시스템을 읽어 상기 읽기 대상인 파일의 위치를 획득하는 단계 및 상기 메모리 카드로부터 상기 읽기 대상인 파일을 읽는 단계에서 발생하는 인터럽트들을 상기 중앙 처리 장치로 전달하지 않고 자체적으로 처리하도록 구성되는 방법.
A method for reading a file from a memory card, comprising:
Transferring to the memory card host controller a name of a file to be read and buffer information;
Reading the file system of the memory card from the memory card host controller to obtain a location of the file to be read;
The memory card host controller reading the file to be read from the memory card using the obtained position;
The memory card host controller storing the read file in the buffer memory according to the buffer information; And
And transmitting an interrupt to the central processing unit to inform the memory card host controller that reading of the file to be read is completed,
Wherein the memory card host controller reads the file system to acquire the position of the file to be read and processes interrupts generated in the step of reading the file to be read from the memory card, How to configure.
KR1020160032279A 2016-03-17 2016-03-17 Method for reading file from memory card KR102448590B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160032279A KR102448590B1 (en) 2016-03-17 2016-03-17 Method for reading file from memory card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160032279A KR102448590B1 (en) 2016-03-17 2016-03-17 Method for reading file from memory card

Publications (2)

Publication Number Publication Date
KR20170108421A true KR20170108421A (en) 2017-09-27
KR102448590B1 KR102448590B1 (en) 2022-09-29

Family

ID=60036002

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160032279A KR102448590B1 (en) 2016-03-17 2016-03-17 Method for reading file from memory card

Country Status (1)

Country Link
KR (1) KR102448590B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100758301B1 (en) * 2006-08-04 2007-09-12 삼성전자주식회사 Memory card and method storing data thereof
KR20080084082A (en) * 2007-03-14 2008-09-19 삼성전자주식회사 Memory card and memory system including the same and operating method thereof
KR100975178B1 (en) * 2002-04-15 2010-08-10 소니 주식회사 Data storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100975178B1 (en) * 2002-04-15 2010-08-10 소니 주식회사 Data storage device
KR100758301B1 (en) * 2006-08-04 2007-09-12 삼성전자주식회사 Memory card and method storing data thereof
KR20080084082A (en) * 2007-03-14 2008-09-19 삼성전자주식회사 Memory card and memory system including the same and operating method thereof

Also Published As

Publication number Publication date
KR102448590B1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
US10649815B2 (en) Apparatus and method of managing shared resources in achieving IO virtualization in a storage device
CN113377283B (en) Memory system with partitioned namespaces and method of operation thereof
US9329793B2 (en) Storage system with load balancing mechanism and method of operation thereof
US11960749B2 (en) Data migration method, host, and solid state disk
US7970974B2 (en) Method and system for adding or removing a logical unit of a USB mass storage device
EP2557494A1 (en) Storage apparatus and data copy method between thin-provisioning virtual volumes
WO2011128928A1 (en) Storage device
US10956326B2 (en) Storage system with data management and protection mechanism and method of operation thereof
KR102365312B1 (en) Storage controller, computational storage device, and operation method of computational storage device
CN110970078A (en) Method for fast boot read
US11068283B2 (en) Semiconductor apparatus, operation method thereof, and stacked memory apparatus having the same
KR20200101982A (en) NVMe-based data reading method, device, and system
US9245613B2 (en) Storage interface apparatus for solid state drive tester
CN113377288B (en) Hardware queue management system and method, solid state disk controller and solid state disk
US9146693B2 (en) Storage control device, storage system, and storage control method
EP4283472A1 (en) Method for caching data, a host device for caching data, and a storage system for caching data
CN111666224A (en) Electronic device and method for utilizing memory space of electronic device
US20060277326A1 (en) Data transfer system and method
KR102448590B1 (en) Method for reading file from memory card
US11327885B2 (en) Controller managing namespace and memory system having the controller
US20120311236A1 (en) Memory system, data control method, and data controller
CN111045961B (en) Data processing method and memory controller using the same
US9058113B2 (en) Storage region providing device, storage region providing method, and recording medium
US20150253996A1 (en) Access control method and data storage device
CN117435535A (en) Storage system, main control chip, data storage method and data reading method

Legal Events

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