KR100514748B1 - Direct Memory Access method and apparatus using SOF signal of USB - Google Patents

Direct Memory Access method and apparatus using SOF signal of USB Download PDF

Info

Publication number
KR100514748B1
KR100514748B1 KR10-2003-0029754A KR20030029754A KR100514748B1 KR 100514748 B1 KR100514748 B1 KR 100514748B1 KR 20030029754 A KR20030029754 A KR 20030029754A KR 100514748 B1 KR100514748 B1 KR 100514748B1
Authority
KR
South Korea
Prior art keywords
dma
memory access
result
direct memory
determined
Prior art date
Application number
KR10-2003-0029754A
Other languages
Korean (ko)
Other versions
KR20040097453A (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 KR10-2003-0029754A priority Critical patent/KR100514748B1/en
Publication of KR20040097453A publication Critical patent/KR20040097453A/en
Application granted granted Critical
Publication of KR100514748B1 publication Critical patent/KR100514748B1/en

Links

Classifications

    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02BHYDRAULIC ENGINEERING
    • E02B3/00Engineering works in connection with control or use of streams, rivers, coasts, or other marine sites; Sealings or joints for engineering works in general
    • E02B3/04Structures or apparatus for, or methods of, protecting banks, coasts, or harbours
    • E02B3/06Moles; Piers; Quays; Quay walls; Groynes; Breakwaters ; Wave dissipating walls; Quay equipment
    • E02B3/08Structures of loose stones with or without piles
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D17/00Excavations; Bordering of excavations; Making embankments
    • E02D17/20Securing of slopes or inclines
    • E02D17/205Securing of slopes or inclines with modular blocks, e.g. pre-fabricated
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D29/00Independent underground or underwater structures; Retaining walls
    • E02D29/02Retaining or protecting walls
    • E02D29/0208Gabions

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Mining & Mineral Resources (AREA)
  • Civil Engineering (AREA)
  • Structural Engineering (AREA)
  • Environmental & Geological Engineering (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Paleontology (AREA)
  • Ocean & Marine Engineering (AREA)
  • Mechanical Engineering (AREA)
  • Bus Control (AREA)

Abstract

범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스(DMA) 방법 및 장치가 개시된다. 호스트로부터 범용 직렬 버스를 통해 데이타를 받은 디바이스로부터 데이타를 입력하여 메모리에 저장하는 이 방법은, DMA가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 판단하는 단계와, DMA의 수행이 요구되지 않는다고 판단되면, 주기적으로 발생되는 프레임 시작 신호를 이용하여 카운팅을 수행하는 단계 및 카운팅된 결과가 소정 시간인가를 판단하고, 카운팅된 결과가 소정 시간이 아닌 것으로 판단되면 DMA의 수행이 요구되는가를 판단하는 단계로 진행하는 단계를 구비하고, 카운팅된 결과는 DMA가 수행될 때 리셋되는 것을 특징으로 한다. 그러므로, DMA가 요구되지 않은 시간을 주기적으로 발생되는 프레임 시작 신호를 이용하여 체크할 수 있기 때문에 중앙 처리부가 직접 메모리 엑세스 장치를 폴링할 필요성을 없애도록 하여 중앙 처리부의 부담을 감소시킬 뿐만 아니라 디바이스 내부에 하드웨어 자원을 소모시키지 않는 등 전체적인 시스템의 성능을 향상시키도록 하고, 내부 타이머의 필요성도 없앨 수 있기 때문에 제조 원가를 절감시키고 제품의 부피를 감소시키도록 하는 효과를 갖는다.Disclosed are a direct memory access (DMA) method and apparatus using a frame start signal of a general purpose serial bus. This method of receiving data from a device receiving data from a host via a universal serial bus and storing the data in a memory includes determining whether DMA is required while DMA is capable, and determining that DMA is not required. If the counting result is determined to be a predetermined time, and if the counted result is determined not to be a predetermined time, determining whether the DMA is required And counting results are reset when DMA is performed. Therefore, since the DMA can check the time for which the DMA is not required by using the periodically generated frame start signal, the central processing unit eliminates the need to poll the memory access device directly, thereby reducing the burden on the central processing unit as well as inside the device. In order to improve the performance of the overall system, such as not consuming hardware resources, and to eliminate the need for an internal timer, there is an effect of reducing the manufacturing cost and the volume of the product.

Description

범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법 및 장치{Direct Memory Access method and apparatus using SOF signal of USB}Direct memory access method and apparatus using frame start signal of general purpose serial bus {Direct Memory Access method and apparatus using SOF signal of USB}

본 발명은 데이타 엑세스 방법중 하나인 직접 메모리 엑세스(DMA:Direct Memory Access)에 관한 것으로서, 특히, 범용 직렬 버스(USB:Universal Serial Bus)의 프레임 시작(SOF:Start Of Frame) 신호를 이용한 직접 메모리 엑세스 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to direct memory access (DMA), which is one of data access methods. In particular, the present invention relates to a direct memory using a start of frame (SOF) signal of a universal serial bus (USB). It relates to an access method and apparatus.

이하, 종래의 직접 메모리 엑세스 방법을 다음과 같이 살펴본다.Hereinafter, a conventional direct memory access method will be described as follows.

직접 메모리 엑세스의 동작 횟수가 직접 메모리 엑세스 방법을 수행하는 직접 엑세스 장치에 알려져 있을 경우, 직접 메모리 엑세스가 수행될 수 있는 상태에서 입/출력(I/O:Input/Output) 포트를 통해 외부로부터 직접 메모리 엑세스를 요구하면, 종래의 직접 메모리 엑세스 방법은 정해진 동작 횟수만큼 직접 메모리 엑세스를 수행한 후 직접 메모리 엑세스를 종료한다.If the number of operations of direct memory access is known to the direct access device that performs the direct memory access method, it can be directly accessed from the outside through the input / output (I / O) port while direct memory access can be performed. When the memory access is required, the conventional direct memory access method terminates the direct memory access after performing the direct memory access for a predetermined number of operations.

그러나, 동작 횟수가 직접 메모리 엑세스 장치에 알려져 있지 않을 경우, 입/출력 포트를 통해 외부로부터 직접 메모리 엑세스의 요구가 일정 시간 동안 없으면, 종래의 직접 메모리 엑세스 방법은 직접 메모리 엑세스를 종료한다.However, if the number of operations is not known to the direct memory access device, if there is no request for direct memory access from the outside through the input / output port for a predetermined time, the conventional direct memory access method terminates the direct memory access.

이 때, 종래의 직접 메모리 엑세스 방법은 직접 메모리 엑세스의 요구가 없는 시간이 일정 시간을 경과했는가를 알기 위해, 중앙 처리부(미도시)로 하여금 직접 메모리 엑세스를 제어하는 직접 메모리 엑세스 제어 장치(미도시)를 계속해서 폴링(polling)하도록 요구한다. 그러므로, 직접 메모리 엑세스의 대상이 되는 데이타를 제공되는 디바이스(미도시)의 전반을 제어하는 중앙 처리부의 부담을 증가시킬 뿐만 아니라 디바이스 내부의 하드웨어 자원을 소모하고 내부 버스를 점유하는 등 전체적인 시스템의 성능을 저하시키는 문제점이 있다.At this time, in the conventional direct memory access method, a direct memory access control apparatus (not shown) which allows a central processing unit (not shown) to control direct memory access in order to know whether a time for which there is no request for direct memory access has elapsed. ) To continue polling. Therefore, not only does it increase the burden of the central processing unit that controls the overall device (not shown) for providing data that is directly targeted for memory access, but also consumes internal hardware and occupies an internal bus such as the overall system performance. There is a problem of lowering.

이를 방지하기 위해, 종래의 직접 메모리 엑세스 방법은, 일정 시간의 경과를 체크하기 위해 중앙 처리부를 이용하는 대신에 내부 타이머(미도시)를 마련할 수도 있다. 그러나, 내부 타이머를 마련할 경우, 제조 원가가 상승하고 제품의 부피가 증가하는 문제점이 있다.In order to prevent this, the conventional direct memory access method may provide an internal timer (not shown) instead of using a central processing unit to check the passage of a predetermined time. However, when providing the internal timer, there is a problem that the manufacturing cost increases and the volume of the product increases.

본 발명이 이루고자 하는 기술적 과제는, 직접 메모리 엑세스의 동작 횟수를 모르는 상태에서, 범용 직렬 버스의 프레임 시작 신호를 이용하여 직접 메모리 엑세스 동작이 수행되지 않은 시간을 측정할 수 있는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법을 제공하는 데 있다.An object of the present invention is to start the frame of a general-purpose serial bus that can measure the time when the direct memory access operation is not performed using the frame start signal of the general-purpose serial bus without knowing the number of operations of the direct memory access To provide a direct memory access method using a signal.

본 발명이 이루고자 하는 다른 기술적 과제는, 직접 메모리 엑세스의 동작 횟수를 모르는 상태에서, 범용 직렬 버스의 프레임 시작 신호를 이용하여 직접 메모리 엑세스 동작이 수행되지 않은 시간을 측정할 수 있는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 장치를 제공하는 데 있다.Another object of the present invention is to provide a frame of a general-purpose serial bus that can measure the time when a direct memory access operation is not performed by using a frame start signal of a general-purpose serial bus without knowing the number of direct memory access operations. It is to provide a direct memory access device using the start signal.

상기 과제를 이루기 위해, 호스트로부터 범용 직렬 버스를 통해 데이타를 받은 디바이스로부터 상기 데이타를 입력하여 메모리에 저장하는 본 발명에 의한 직접 메모리 엑세스 방법은, 직접 메모리 엑세스(DMA)가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 판단하는 (a) 단계와, 상기 DMA의 수행이 요구되지 않는다고 판단되면, 주기적으로 발생되는 프레임 시작 신호를 이용하여 카운팅을 수행하는 (b) 단계 및 상기 카운팅된 결과가 소정 시간인가를 판단하고, 상기 카운팅된 결과가 상기 소정 시간이 아닌 것으로 판단되면 상기 (a) 단계로 진행하는 (c) 단계로 이루어지고, 상기 카운팅된 결과는 상기 DMA가 수행될 때 리셋되는 것이 바람직하다.In order to achieve the above object, a direct memory access method according to the present invention for inputting data from a device that receives data through a universal serial bus from a host and storing the data in a memory includes a method of DMA in a state where direct memory access (DMA) can be performed. (A) determining whether the execution is required; if it is determined that the DMA is not required, performing counting using a periodically generated frame start signal; and (b) performing the counting and the counted result is a predetermined time. If it is determined that the counting result is not the predetermined time, the process proceeds to step (a) (c), and the counting result is preferably reset when the DMA is performed. .

상기 다른 과제를 이루기 위해, 호스트로부터 범용 직렬 버스를 통해 데이타를 받은 디바이스로부터 상기 데이타를 입력하여 메모리에 저장하는 본 발명에 의한 직접 메모리 엑세스 장치는, 직접 메모리 엑세스(DMA)가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 검사하고, 검사된 결과를 제1 제어 신호로서 발생하는 DMA 요구 검사부와, 상기 제1 제어 신호에 응답하여, 주기적으로 발생되는 프레임 시작 신호에 응답하여 카운팅을 수행하거나 카운팅된 결과를 리셋시키고, 카운팅된 결과를 출력하는 카운팅부 및 상기 카운팅부로부터 입력한 상기 카운팅된 결과와 소정 시간을 비교하고, 비교된 결과를 DMA 종료 신호로서 출력하는 제1 비교부로 구성되고, 상기 DMA 요구 검사부는 상기 DMA 종료 신호에 응답하여 상기 DMA의 수행이 요구되는가를 검사하는 것이 바람직하다.In order to achieve the above object, a direct memory access device according to the present invention for inputting data from a device receiving data through a universal serial bus from a host and storing the data in a memory includes a DMA in a state where direct memory access (DMA) can be performed. And a DMA request checker that generates the checked result as a first control signal, and performs or counts in response to a periodically generated frame start signal in response to the first control signal. A counting unit for resetting a result, outputting a counted result, and a first comparison unit comparing the counted result input from the counting unit with a predetermined time and outputting the compared result as a DMA end signal; The request checker checks whether the DMA is required to be performed in response to the DMA end signal. It is preferable.

이하, 본 발명에 의한 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스(DMA) 방법을 첨부한 도면들을 참조하여 다음과 같이 설명한다.Hereinafter, a direct memory access (DMA) method using a frame start signal of a general purpose serial bus according to the present invention will be described with reference to the accompanying drawings.

도 1은 본 발명에 의함 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법을 설명하기 위한 플로우차트로서, DAM가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 판단하는 단계(제10 및 제12 단계들), 프레임 시작(SOF) 신호를 이용하여 소정 시간이 경과되었는가를 검사하는 단계(제14 및 제16 단계들) 및 DAM를 수행하고 소정 횟수만큼 DMA가 수행되었는가를 판단하여 카운팅된 결과를 리셋시키는 단계(제18 ∼ 제24 단계들)로 이루어진다. 프레임 시작 신호는 유에스비 프레임 신호(USB Frame signal)임이 바람직하다. 1 is a flowchart illustrating a direct memory access method using a frame start signal of a general-purpose serial bus according to the present invention, and determining whether DMA is required to be performed in a state where a DAM can be performed (10th and 12th). Steps), checking whether a predetermined time has elapsed by using a frame start (SOF) signal (steps 14 and 16), performing a DAM, and determining whether DMA has been performed a predetermined number of times, and counting the result. And a reset step (18th to 24th steps). The frame start signal is preferably a USB frame signal.

도 2는 도 1에 도시된 DMA 방법을 설명하기 위한 DMA 장치를 포함하여 그의 주변에 대한 예시적이고 개략적인 블럭도로서, 호스트(40), 디바이스(42), 범용 직렬 버스(USB)(44), DMA 장치(46) 및 메모리(48)로 구성된다.FIG. 2 is an exemplary schematic block diagram of a periphery, including a DMA device for explaining the DMA method shown in FIG. 1, including a host 40, a device 42, and a universal serial bus (USB) 44. , DMA device 46 and memory 48.

이 때, DMA 장치(42) 및 메모리(48)중 적어도 하나는 도 2에 도시된 바와 달리 디바이스(42)의 내부에 마련될 수도 있다.At this time, at least one of the DMA device 42 and the memory 48 may be provided inside the device 42, as shown in FIG.

도 1에 도시된 디바이스(42)는 호스트(40)로부터 범용 직렬 버스(USB)(44)를 통해 데이타를 전송받고, DMA 장치(46)는 호스트(40)로부터 디바이스(42)로 전송된 데이타를 디바이스(42)로부터 입력하여 메모리(48)에 저장한다. 여기서, 호스트(40)는 개인용 컴퓨터(미도시) 따위를 의미하고, 디바이스(42)는 개인용 컴퓨터 따위로부터 데이타를 받아서 처리하는 주변 기기 예를 들면 프린터 따위를 의미한다. 부연하면, DMA 장치(46)는 호스트(40)로부터 범용 직렬 버스(44)를 통해 디바이스(42)로 입력된 데이타를 버스(60)를 통해 입력하고, 버스(60)를 통해 입력한 데이타를 버스(62)를 통해 메모리(48)로 출력한다. 전술한 디바이스(42)는 프린터가 될 수 있다. 이 경우, 디바이스(42)는 호스트(40)로부터 프린팅 데이타를 범용 직렬 버스 프로토콜에 의해 범용 직렬 버스(44)를 통해 전송받고, 전송받은 프린팅 데이타를 해석 및 변환하며, DMA 장치(46)는 디바이스(42)에서 처리된 결과를 메모리(48)에 저장시킨다.The device 42 shown in FIG. 1 receives data from the host 40 via a universal serial bus (USB) 44, and the DMA device 46 transmits data from the host 40 to the device 42. Is input from the device 42 and stored in the memory 48. Here, the host 40 refers to a personal computer (not shown), and the device 42 refers to a peripheral device, such as a printer, that receives and processes data from the personal computer. In other words, the DMA device 46 inputs data input from the host 40 to the device 42 via the universal serial bus 44 via the bus 60, and inputs data input via the bus 60. Output to memory 48 via bus 62. The device 42 described above can be a printer. In this case, the device 42 receives the printing data from the host 40 through the universal serial bus 44 by the universal serial bus protocol, interprets and converts the received printing data, and the DMA device 46 sends the device. The result processed at 42 is stored in the memory 48.

본 발명에 의한 DMA 방법은, 직접 메모리 엑세스(DMA)가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 판단한다(제10 및 제12 단계들). 예컨대, DMA가 수행 가능한 상태인가를 판단한다(제10 단계). DMA가 수행 가능한 상태란, DMA를 수행하는 DMA 장치(46)에 전원이 공급되는 등, DAM 장치(46)가 DMA를 수행할 준비가 되어있는 상태를 의미한다. 만일, DMA가 수행 가능한 상태가 아니라고 판단되면, 제10 단계로 진행한다. 그러나, DMA가 수행 가능한 상태라고 판단되면, DMA의 수행이 요구되는가를 판단한다(제12 단계). 이 때, DMA의 수행을 요구하는 명령은 디바이스(42)의 전반을 제어하는 중앙 처리부(미도시) 따위로부터 신호선(64)를 통해 제공될 수 있다.The DMA method according to the present invention determines whether DMA is required to be performed in a state where direct memory access (DMA) can be performed (10th and 12th steps). For example, it is determined whether the DMA is capable of performing (step 10). The DMA-capable state means a state in which the DAM device 46 is ready to perform DMA, such as supplying power to the DMA device 46 that performs DMA. If it is determined that the DMA is not in an executable state, the flow proceeds to step 10. However, if it is determined that the DMA can be performed, it is determined whether the DMA is required (step 12). In this case, a command for requesting to perform DMA may be provided through a signal line 64 from a central processing unit (not shown) that controls the first half of the device 42.

만일, DMA의 수행이 요구되지 않는다고 판단되면, 주기적으로 예를 들면 1㎳ 단위로 발생되는 프레임 시작(SOF) 신호를 이용하여 카운팅을 수행한다(제14 단계). 여기서, SOF 신호는 호스트(40)로부터 디바이스(42)로 전송되는 데이타인 D+ 및 D-를 조합하여 디바이스(42)에서 생성되며, 디바이스(42)는 SOF 신호를 이용하여 오디오나 비디오등의 멀티 미디어 데이타의 동기를 맞춘다. 즉, SOF 신호는 범용 직렬 버스(44)에 의해 호스트(40)와 연결된 디바이스(42)가 다수개일 경우, 즉, 마우스(미도시), 프린터(미도시) 등과 같은 다수개의 디바이스(42)가 범용 직렬 버스(44)를 통해 호스트(40)와 연결될 경우 다수개의 다바이스(42)의 작업 스케쥴 따위를 관리하기 위해 필요한 신호이다. 일반적으로, 범용 직렬 버스(44)는 두 개의 데이타 신호선들인 D+ 및 D-, 전력선 및 접지선과 같은 4개의 신호선들로 이루어진다.If it is determined that the DMA is not required, counting is periodically performed using a frame start (SOF) signal generated in units of 1 ms (step 14). Here, the SOF signal is generated in the device 42 by combining D + and D-, which are data transmitted from the host 40 to the device 42, and the device 42 uses the SOF signal to generate a multiplicity of audio or video. Synchronize media data. That is, the SOF signal is generated when a plurality of devices 42 connected to the host 40 by the general purpose serial bus 44, that is, a plurality of devices 42 such as a mouse (not shown), a printer (not shown), or the like. When connected to the host 40 through the universal serial bus 44 is a signal required for managing the work schedule of the plurality of devices 42. In general, general purpose serial bus 44 consists of four signal lines, two data signal lines, D + and D-, a power line and a ground line.

제14 단계후에, 카운팅된 결과가 소정 시간인가를 판단한다(제16 단계). 만일, 카운팅된 결과가 소정 시간이 아닌 것으로 판단되면, 제12 단계로 진행한다. 그러나, 카운팅된 결과가 소정 시간인 것으로 판단되면, 소정 시간 동안 DMA가 수행되지 않았기 때문에 도 1에 도시된 DMA 방법을 종료한다. 이 때, 카운팅 도중에 DMA가 수행되면 카운팅된 결과는 리셋된다. 즉, DMA의 수행이 요구되지 않을 때 SOF 신호를 이용하여 카운팅 동작을 수행하다가 DMA가 수행되면 카운팅 동작을 처음부터 다시 수행한다.After step 14, it is determined whether the counted result is a predetermined time (step 16). If it is determined that the counted result is not a predetermined time, the flow proceeds to step 12. However, if it is determined that the counted result is a predetermined time, the DMA method shown in Fig. 1 ends because no DMA has been performed for a predetermined time. At this time, if DMA is performed during counting, the counted result is reset. That is, when the DMA is not required to perform the counting operation using the SOF signal, when the DMA is performed, the counting operation is performed again from the beginning.

이에 대해 세부적으로 살펴보면 다음과 같다. 도 1에 도시된 DMA 방법은 제18 ∼ 제24 단계들을 더 마련할 수 있다. 만일, DMA의 수행이 요구된다고 판단되면, DMA를 수행한다(제18 단계). 제18 단계후에, 소정 횟수 만큼 DMA가 수행되었는가를 판단한다(제20 및 제22 단계들). 이 때, 소정 횟수만큼 DMA가 수행되었다고 판단되면, 도 1에 도시된 직렬 메모리 엑세스(DMA) 방법을 종료한다. 그러나, 소정 횟수만큼 DMA가 수행되지 않았다고 판단되면, 제24 단계로 진행한다.The details are as follows. The DMA method illustrated in FIG. 1 may further prepare 18 th to 24 th steps. If it is determined that the performance of the DMA is required, the DMA is performed (step 18). After the eighteenth step, it is determined whether the DMA has been performed a predetermined number of times (steps 20 and 22). At this time, if it is determined that DMA has been performed a predetermined number of times, the serial memory access (DMA) method shown in FIG. 1 is terminated. However, if it is determined that DMA has not been performed a predetermined number of times, the flow proceeds to step 24.

본 발명의 일 실시예에 의하면, 도 1에 도시된 바와 같이, 제18 단계후에, 소정 횟수를 1만큼 감소시킨다(제20 단계). 제20 단계후에, 감소된 결과가 0인가를 판단한다(제22 단계). 만일, 감소된 결과가 0인 것으로 판단되면, 소정 횟수만큼 DMA가 수행된 것이므로, 도 1에 도시된 직접 메모리 엑세스 방법을 종료한다. 그러나, 감소된 결과가 0이 아닌 것으로 판단되면, 소정 횟수만큼 DMA가 수행되지 않았으므로 제24 단계로 진행한다.According to an embodiment of the present invention, as shown in FIG. 1, after the eighteenth step, the predetermined number of times is decreased by one (step 20). After step 20, it is determined whether the reduced result is 0 (step 22). If it is determined that the reduced result is 0, since the DMA has been performed a predetermined number of times, the direct memory access method shown in FIG. 1 ends. However, if it is determined that the reduced result is not 0, the process proceeds to step 24 since DMA has not been performed a predetermined number of times.

본 발명의 다른 실시예에 의하면, 도 1에 도시된 바와 달리, 제18 단계후에, 소정 횟수를 1만큼 증가시킨다. 이 때, 증가된 결과가 소정 횟수인가를 판단한다. 만일, 증가된 결과가 소정 횟수인 것으로 판단되면, 소정 횟수만큼 DMA가 수행된 것이므로, 도 1에 도시된 직접 메모리 엑세스 방법을 종료한다. 그러나, 증가된 결과가 소정 횟수가 아닌 것으로 판단되면, 제24 단계로 진행한다.According to another embodiment of the present invention, unlike FIG. 1, after the eighteenth step, the predetermined number of times is increased by one. At this time, it is determined whether the increased result is a predetermined number. If it is determined that the increased result is a predetermined number of times, since the DMA is performed a predetermined number of times, the direct memory access method shown in FIG. 1 ends. However, if it is determined that the increased result is not the predetermined number of times, the flow proceeds to step 24.

만일, 소정 횟수만큼 DMA가 수행되지 않았다고 판단되면, 제14 단계에서 카운팅된 결과를 리셋시키고, 제12 단계로 진행한다(제24 단계). 이와 같이, 제14 단계에서 카운팅된 결과는 DMA가 수행될 때마다 리셋되므로, 제14 단계의 카운팅된 결과는 DMA가 수행되지 않은 시간동안 카운팅된 결과에 해당한다.If it is determined that DMA has not been performed a predetermined number of times, the result counted in step 14 is reset and the process proceeds to step 12 (step 24). As such, the counted result in step 14 is reset every time the DMA is performed, so the counted result in step 14 corresponds to the counted result for the time when the DMA is not performed.

이하, 본 발명에 의한 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 장치의 구성 및 동작을 첨부한 도면을 참조하여 다음과 같이 설명한다.Hereinafter, a configuration and operation of a direct memory access device using a frame start signal of a general purpose serial bus according to the present invention will be described with reference to the accompanying drawings.

도 3은 본 발명에 의한 DMA 장치의 일 실시예의 블럭도로서, DMA 요구 검사부(80), 카운팅부(82), 제1 비교부(84), DMA부(86) 및 제2 비교부(88)로 구성된다.3 is a block diagram of an embodiment of a DMA device according to the present invention, in which a DMA request checker 80, a counting unit 82, a first comparing unit 84, a DMA unit 86, and a second comparing unit 88 are provided. It is composed of

도 3에 도시된 DMA 장치는 도 2에 도시된 DMA 장치(46)의 본 발명에 의한 바람직한 일 실시예(46A)의 블럭도에 해당할 수 있다. 이 경우, DMA 장치(46A)는 호스트(40)로부터 범용 직렬 버스(44)를 통해 데이타를 전송받은 디바이스(42)로부터 데이타를 입력하여 메모리(48)에 저장한다. 또한, 도 3에 도시된 DMA 장치(46A)는 도 1에 도시된 DMA 방법을 수행하는 역할을 한다.The DMA device shown in FIG. 3 may correspond to a block diagram of one preferred embodiment 46A of the present invention of the DMA device 46 shown in FIG. In this case, the DMA device 46A receives data from the device 42 which has received data from the host 40 via the universal serial bus 44 and stores it in the memory 48. In addition, the DMA device 46A shown in FIG. 3 serves to perform the DMA method shown in FIG.

도 1에 도시된 제10 및 제12 단계들을 수행하기 위해, DMA 장치(46A)는 DMA 요구 검사부(80)를 마련한다. 여기서, DMA 요구 검사부(80)는 제10 단계를 수행하기 위해, 직접 메모리 엑세스(DMA)가 수행 가능한 상태인가를 검사하고, 제12 단계를 수행하기 위해 DMA의 수행이 요구되는가를 검사하며, 검사된 결과를 제1 제어 신호(C1)로서 발생하여 카운팅부(82) 및 DMA부(86)로 각각 출력한다. 이를 위해, DMA 요구 검사부(80)는 입력단자 IN1을 통해 전술한 중앙 처리부(미도시) 따위로부터 DMA를 요구하는 DMA 요구 신호가 입력되는가를 검사하여 제1 제어 신호(C1)를 발생할 수 있다.In order to perform the tenth and twelfth steps shown in FIG. 1, the DMA device 46A provides a DMA request check unit 80. Here, the DMA request checker 80 checks whether or not direct memory access (DMA) is executable to perform the tenth step, checks whether the DMA is required to perform the twelfth step, and checks The result is generated as the first control signal C1 and output to the counting unit 82 and the DMA unit 86, respectively. To this end, the DMA request checker 80 may generate the first control signal C1 by checking whether the DMA request signal for requesting DMA is input from the above-described central processing unit (not shown) through the input terminal IN1.

이 때, 제14 단계를 수행하기 위해, 카운팅부(82)는 DMA 요구 검사부(80)로부터 입력한 제1 제어 신호(C1)에 응답하고, 입력단자 IN2를 통해 디바이스(42)로부터 입력한 프레임 시작 신호에 응답하여 카운팅을 수행하거나 카운팅된 결과를 리셋시키고, 카운팅된 결과를 제1 비교부(84)로 출력한다. 예컨대, 제1 제어 신호(C1)를 통해 DMA가 수행 가능한 상태에서 DMA의 수행이 요구되지 않은 것으로 인식되면, 카운팅부(82)는 입력단자 IN2를 통해 입력한 프레임 시작 신호에 응답하여 카운팅 동작을 수행한다. 그러나, 카운팅을 시작한 후 제1 제어 신호(C1)를 통해 DMA의 수행이 요구되는 것으로 인식되면, 카운팅부(82)는 카운팅된 결과를 리셋시킨다.At this time, in order to perform the fourteenth step, the counting unit 82 responds to the first control signal C1 input from the DMA request check unit 80, and the frame input from the device 42 through the input terminal IN2. In response to the start signal, counting is performed or the counted result is reset, and the counted result is output to the first comparator 84. For example, when it is recognized that the DMA is not required while the DMA is able to be performed through the first control signal C1, the counting unit 82 performs a counting operation in response to the frame start signal input through the input terminal IN2. Perform. However, if it is recognized that the DMA is to be performed through the first control signal C1 after starting counting, the counting unit 82 resets the counted result.

제16 단계를 수행하기 위해, 제1 비교부(84)는 카운팅부(82)로부터 입력한 카운팅된 결과와 입력단자 IN3을 통해 입력한 소정 시간을 비교하고, 비교된 결과를 DMA 종료 신호로서 DMA 요구 검사부(80)로 출력하는 한편, 직접 메모리 엑세스를 제어하는 별도의 DAM 제어 코어(core)(미도시) 따위로 출력단자 OUT1을 통해 출력한다. 이 때, DMA 요구 검사부(80)는 제1 비교부(84)로부터 입력한 DMA 종료 신호에 응답하여 DMA의 수행이 요구되는가를 검사한다. 예컨대, DMA 종료 신호를 통해 카운팅된 결과가 소정 시간이 아닌 것으로 인식되면, DMA 요구 검사부(80)는 DMA의 수행이 요구되는가를 검사한다. 또한, DMA 제어 코어(미도시)는 출력단자 OUT1을 통해 출력되는 DMA 종료 신호를 입력하여 도 1에 도시된 DMA 방법을 종료시킬 수 있다. 예컨대, DMA 종료 신호를 통해 카운팅된 결과가 소정 시간인 것으로 인식되면, DMA 제어 코어(미도시)는 도 1에 도시된 DMA 방법을 종료시킨다.In order to perform the sixteenth step, the first comparison unit 84 compares the counted result input from the counting unit 82 with a predetermined time input through the input terminal IN3, and compares the result as a DMA end signal. While outputting to the request checker 80, an output through the output terminal OUT1, such as a separate DAM control core (not shown) that directly controls memory access. At this time, the DMA request checker 80 checks whether DMA performance is required in response to the DMA end signal input from the first comparator 84. For example, if it is recognized that the result counted through the DMA end signal is not a predetermined time, the DMA request checker 80 checks whether the DMA is required to be performed. In addition, the DMA control core (not shown) may terminate the DMA method illustrated in FIG. 1 by inputting a DMA termination signal output through the output terminal OUT1. For example, if it is recognized that the result counted through the DMA end signal is a predetermined time, the DMA control core (not shown) terminates the DMA method shown in FIG.

한편, 도 1에 도시된 제18 단계를 수행하기 위해, 직접 메모리 엑세스 장치(46A)의 DMA부(86)는 DMA 요구 검사부(80)로부터 입력한 제1 제어 신호(C1)에 응답하여 DMA를 수행한다. 예컨대, 제1 제어 신호(C1)를 통해 DMA가 수행 가능한 상태에서 DMA의 수행이 요구되는 것으로 인식되면, DMA부(86)는 입력단자 IN4를 통해 디바이스(42)로부터 버스(60)를 경유하여 데이타를 입력하고, 입력한 데이타를 출력단자 OUT2를 통해 메모리(48)로 출력하여 DMA를 수행한다.Meanwhile, in order to perform the eighteenth step shown in FIG. 1, the DMA unit 86 of the direct memory access device 46A receives the DMA in response to the first control signal C1 input from the DMA request check unit 80. Perform. For example, if it is recognized that the DMA is required to be performed in the state where the DMA can be performed through the first control signal C1, the DMA unit 86 receives the input terminal IN4 from the device 42 via the bus 60. Data is input, and the input data is output to the memory 48 through the output terminal OUT2 to perform DMA.

제20 및 제22 단계를 수행하기 위해, 제2 비교부(88)는 DMA부(86)로부터 입력한 DMA가 수행된 횟수와 소정 횟수를 비교하고, 비교된 결과를 제2 제어 신호(C2)로서 카운팅부(82)로 출력하는 한편, 전술한 DMA 제어 코어로 출력단자 OUT3을 통해 출력한다. 이를 위해, DMA부(86)는 DMA를 수행한 횟수를 카운팅하고, 카운팅된 결과를 DMA가 수행된 횟수로서 제2 비교부(88)로 출력하는 카운터(미도시)를 별도로 마련할 수 있다. 이 경우, 카운팅부(82)는 DMA 요구 검사부(80)로부터 입력한 제1 제어 신호(C1) 및 제2 비교부(88)로부터 입력한 제2 제어 신호(C2)에 응답하여, 카운팅된 결과를 리셋시킨다. 예컨대, 제1 제어 신호(C1)를 통해 DMA의 수행이 요구되는 것으로 인식되고 제2 제어 신호(C2)를 통해 DMA가 수행된 횟수가 소정 횟수가 아닌 것으로 인식되면, 카운팅부(82)는 카운팅된 결과를 리셋시킨다. 이 때, DMA 제어 코어(미도시)는 출력단자 OUT3을 통해 출력되는 제2 제어 신호(C2)에 응답하여 도 1에 도시된 DMA 방법을 종료시킬 수 있다. 예컨대, 제2 제어 신호(C2)를 통해 DMA가 소정 횟수만큼 수행되었다고 인식되면, DMA 제어 코어는 도 1에 도시된 DMA 방법을 종료시킬 수 있다.In order to perform the twentieth and twenty-second steps, the second comparison unit 88 compares the number of times the DMA input from the DMA unit 86 is performed with a predetermined number of times, and compares the result with the second control signal C2. As an output to the counting unit 82, the output is output through the output terminal OUT3 to the aforementioned DMA control core. To this end, the DMA unit 86 may count a number of times the DMA is performed, and separately provide a counter (not shown) that outputs the counted result to the second comparator 88 as the number of times the DMA is performed. In this case, the counting unit 82 counts the result in response to the first control signal C1 input from the DMA request check unit 80 and the second control signal C2 input from the second comparing unit 88. Reset For example, when it is recognized that the DMA is performed through the first control signal C1 and the number of times the DMA is performed through the second control signal C2 is recognized as not being a predetermined number, the counting unit 82 counts. Resets the result. In this case, the DMA control core (not shown) may terminate the DMA method illustrated in FIG. 1 in response to the second control signal C2 output through the output terminal OUT3. For example, if it is recognized that the DMA has been performed a predetermined number of times through the second control signal C2, the DMA control core may terminate the DMA method illustrated in FIG. 1.

이상에서 설명한 바와 같이, 본 발명에 의한 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법 및 장치는 직접 메모리 엑세스가 요구되지 않은 시간을 주기적으로 발생되는 프레임 시작 신호를 이용하여 체크할 수 있기 때문에 중앙 처리부가 직접 메모리 엑세스 장치를 폴링할 필요성을 없애도록 하여 중앙 처리부의 부담을 감소시킬 뿐만 아니라 디바이스 내부에 하드웨어 자원을 소모시키지 않는 등 전체적인 시스템의 성능을 향상시키도록 하고, 내부 타이머의 필요성도 없앨 수 있기 때문에 제조 원가를 절감시키고 제품의 부피를 감소시키도록 하는 효과를 갖는다.As described above, since the direct memory access method and apparatus using the frame start signal of the general-purpose serial bus according to the present invention can check the time when the direct memory access is not required by using the frame start signal which is periodically generated. By eliminating the need for the central processing unit to poll the memory access devices directly, the central processing unit not only reduces the burden on the central processing unit, but also improves the overall system performance by not consuming hardware resources inside the device, eliminating the need for internal timers. This can reduce the manufacturing cost and reduce the volume of the product.

도 1은 본 발명에 의함 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법을 설명하기 위한 플로우차트이다.1 is a flowchart illustrating a direct memory access method using a frame start signal of a general-purpose serial bus according to the present invention.

도 2는 도 1에 도시된 DMA 방법을 설명하기 위한 DMA 장치를 포함하여 그의 주변에 대한 예시적이고 개략적인 블럭도이다.FIG. 2 is an exemplary schematic block diagram of its periphery, including a DMA device for explaining the DMA method shown in FIG.

도 3은 본 발명에 의한 DMA 장치의 일 실시예의 블럭도이다.3 is a block diagram of an embodiment of a DMA device according to the present invention.

Claims (5)

호스트로부터 범용 직렬 버스를 통해 데이타를 받은 디바이스로부터 상기 데이타를 입력하여 메모리에 저장하는 직접 메모리 엑세스 방법에 있어서,In the direct memory access method for inputting the data from the device receiving the data through the universal serial bus from the host and storing in the memory, (a) 직접 메모리 엑세스(DMA)가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 판단하는 단계;(a) determining whether DMA is required to be performed in a state where direct memory access (DMA) can be performed; (b) 상기 DMA의 수행이 요구되지 않는다고 판단되면, 주기적으로 발생되는 프레임 시작 신호(USB Frame signal)를 이용하여 카운팅을 수행하는 단계; 및(b) if it is determined that the performance of the DMA is not required, performing counting using a periodically generated frame start signal (USB Frame signal); And (c) 상기 카운팅된 결과가 소정 시간인가를 판단하고, 상기 카운팅된 결과가 상기 소정 시간이 아닌 것으로 판단되면 상기 (a) 단계로 진행하는 단계를 구비하고,(c) determining whether the counted result is a predetermined time, and if it is determined that the counted result is not the predetermined time, proceeding to step (a); 상기 카운팅된 결과는 상기 DMA가 수행될 때 리셋되는 것을 특징으로 하는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법.And the counted result is reset when the DMA is performed. 제1 항에 있어서, 상기 직접 메모리 엑세스 방법은The method of claim 1, wherein the direct memory access method is (d) 상기 DMA의 수행이 요구된다고 판단되면, 상기 DMA를 수행하는 단계;(d) if it is determined that performance of the DMA is required, performing the DMA; (e) 소정 횟수 만큼 상기 DMA가 수행되었는가를 판단하는 단계; 및(e) determining whether the DMA has been performed a predetermined number of times; And (f) 상기 소정 횟수만큼 상기 DMA가 수행되지 않았다고 판단되면, 상기 카운팅된 결과를 리셋시키고 상기 (a) 단계로 진행하는 단계를 더 구비하는 것을 특징으로 하는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법.and (f) if it is determined that the DMA has not been performed the predetermined number of times, resetting the counted result and proceeding to step (a). Memory access method. 제1 항에 있어서, 상기 (e) 단계는The method of claim 1, wherein step (e) 상기 (d) 단계후에, 상기 소정 횟수를 1만큼 감소시키는 단계; 및After step (d), decreasing the predetermined number of times by one; And 상기 감소된 결과가 0인가를 판단하고, 상기 감소된 결과가 0인 것으로 판단되면, 상기 직접 메모리 엑세스 방법을 종료하고, 상기 감소된 결과가 0이 아닌 것으로 판단되면 상기 (f) 단계로 진행하는 단계를 구비하는 것을 특징으로 하는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 방법.If it is determined that the reduced result is 0, and the determined result is determined to be 0, the direct memory access method is terminated, and if it is determined that the reduced result is not 0, the process proceeds to step (f). And a frame start signal of a general-purpose serial bus. 호스트로부터 범용 직렬 버스를 통해 데이타를 받은 디바이스로부터 상기 데이타를 입력하여 메모리에 저장하는 직접 메모리 엑세스 장치에 있어서,In a direct memory access device that receives the data from a device that receives data from the host via a universal serial bus, and stores the data in a memory, 직접 메모리 엑세스(DMA)가 수행 가능한 상태에서 DMA의 수행이 요구되는가를 검사하고, 검사된 결과를 제1 제어 신호로서 발생하는 DMA 요구 검사부;A DMA request checker which checks whether DMA is required to be performed in a state where direct memory access (DMA) can be performed, and generates the checked result as a first control signal; 상기 제1 제어 신호에 응답하여, 주기적으로 발생되는 프레임 시작 신호(USB Frame signal)에 응답하여 카운팅을 수행하거나 카운팅된 결과를 리셋시키고, 카운팅된 결과를 출력하는 카운팅부; 및A counting unit configured to perform a counting or reset a counted result in response to a periodically generated frame start signal in response to the first control signal, and output a counted result; And 상기 카운팅부로부터 입력한 상기 카운팅된 결과와 소정 시간을 비교하고, 비교된 결과를 DMA 종료 신호로서 출력하는 제1 비교부를 구비하고,A first comparison unit which compares the counted result inputted from the counting unit with a predetermined time and outputs the compared result as a DMA end signal; 상기 DMA 요구 검사부는 상기 DMA 종료 신호에 응답하여 상기 DMA의 수행이 요구되는가를 검사하는 것을 특징으로 하는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 장치.And the DMA request checker checks whether the DMA is required to be performed in response to the DMA end signal. 제4 항에 있어서, 상기 직접 메모리 엑세스 장치는The apparatus of claim 4, wherein the direct memory access device 상기 제1 제어 신호에 응답하여, 상기 DMA를 수행하는 DMA부; 및A DMA unit configured to perform the DMA in response to the first control signal; And 상기 DMA가 수행된 횟수와 소정 회수를 비교하고, 비교된 결과를 제2 제어 신호로서 출력하는 제2 비교부를 더 구비하고,And a second comparing unit which compares the number of times the DMA is performed with a predetermined number of times and outputs the compared result as a second control signal. 상기 카운팅부는 상기 제1 및 상기 제2 제어 신호들에 응답하여, 상기 카운팅된 결과를 리셋시키는 것을 특징으로 하는 범용 직렬 버스의 프레임 시작 신호를 이용한 직접 메모리 엑세스 장치.And the counting unit resets the counted result in response to the first and second control signals.
KR10-2003-0029754A 2003-05-12 2003-05-12 Direct Memory Access method and apparatus using SOF signal of USB KR100514748B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2003-0029754A KR100514748B1 (en) 2003-05-12 2003-05-12 Direct Memory Access method and apparatus using SOF signal of USB

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2003-0029754A KR100514748B1 (en) 2003-05-12 2003-05-12 Direct Memory Access method and apparatus using SOF signal of USB

Publications (2)

Publication Number Publication Date
KR20040097453A KR20040097453A (en) 2004-11-18
KR100514748B1 true KR100514748B1 (en) 2005-09-14

Family

ID=37375621

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2003-0029754A KR100514748B1 (en) 2003-05-12 2003-05-12 Direct Memory Access method and apparatus using SOF signal of USB

Country Status (1)

Country Link
KR (1) KR100514748B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1955949B (en) * 2005-10-24 2010-05-26 瑞昱半导体股份有限公司 Universal serial bus device
JP5041527B2 (en) * 2007-08-03 2012-10-03 株式会社ミマキエンジニアリング Data transfer apparatus, request generation apparatus, and request generation method
KR100932925B1 (en) * 2007-12-17 2009-12-21 한국전자통신연구원 Direct memory access control device and its method for the transmission efficiency of MMO

Also Published As

Publication number Publication date
KR20040097453A (en) 2004-11-18

Similar Documents

Publication Publication Date Title
KR101672067B1 (en) Buses for pattern-recognition processors
EP2437161A1 (en) Hardware accelerator module and method for setting up same
US8386908B2 (en) Data transmission methods and universal serial bus host controllers utilizing the same
US20070240011A1 (en) FIFO memory data pipelining system and method for increasing I²C bus speed
KR20000053380A (en) A port manager controller for connecting various function modules
CN1926525A (en) Multiple burst protocol device controller
CN112765082B (en) Multi-host arbitration method, device and readable storage medium
EP3036647B1 (en) Method to minimize the number of irq lines from peripherals to one wire
CN114817110B (en) Data transmission method and device
US7366809B2 (en) Pipelined stop, start, address byte, and data byte technique and circuit for I2C logic system
JP2002297336A (en) Printer system
US7694044B2 (en) Stream under-run/over-run recovery
US20070168580A1 (en) Apparatus to improve the firmware efficiency for a multiframe serial interface
CN115129645A (en) Transaction processing method, system, storage medium and equipment based on bus
KR100514748B1 (en) Direct Memory Access method and apparatus using SOF signal of USB
US20030133470A1 (en) Polling device and communication apparatus
US20050143843A1 (en) Command pacing
CN109976778B (en) Software updating method and system of vehicle electronic product, upper computer and storage medium
KR100922812B1 (en) Method and system for controlling of peripherals
JP2006195607A (en) Method and circuit for determining bulk-out transfer end
JP2008502980A (en) Bus controller for transferring data
JP2000276437A (en) Dma controller
JP2003006139A (en) Dma transfer apparatus
JPS5831458A (en) Address matching device
JP2009251771A (en) Dma transfer device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee