KR101352140B1 - Data communication system - Google Patents

Data communication system Download PDF

Info

Publication number
KR101352140B1
KR101352140B1 KR1020100057901A KR20100057901A KR101352140B1 KR 101352140 B1 KR101352140 B1 KR 101352140B1 KR 1020100057901 A KR1020100057901 A KR 1020100057901A KR 20100057901 A KR20100057901 A KR 20100057901A KR 101352140 B1 KR101352140 B1 KR 101352140B1
Authority
KR
South Korea
Prior art keywords
command
data
subprocessor
transmitted
main processor
Prior art date
Application number
KR1020100057901A
Other languages
Korean (ko)
Other versions
KR20110049645A (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 US12/826,848 priority Critical patent/US8176209B2/en
Publication of KR20110049645A publication Critical patent/KR20110049645A/en
Application granted granted Critical
Publication of KR101352140B1 publication Critical patent/KR101352140B1/en

Links

Images

Classifications

    • 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/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4291Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30145Instruction analysis, e.g. decoding, instruction word fields
    • 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/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3877Concurrent instruction execution, e.g. pipeline or look ahead using a slave processor, e.g. coprocessor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

데이터 통신 시스템이 개시된다. 본 발명의 일 실시예에 따르면, 메인 프로세서, 및 상기 메인 프로세서와 SPI(Serial Peripheral Interface) 방식을 통해 연결되며, 상기 메인 프로세서로부터 전송되는 명령어에 대응되는 동작을 수행하는 일 이상의 서브 프로세서 또는 일 이상의 주변 장치를 포함하고, 상기 SPI 방식을 통한 연결은 일 이상의 버스 라인에 의해 이루어지고, 상기 일 이상의 버스 라인은, 데이터 전송을 위한 마스터 인 슬레이브 아웃 라인(MISO; Master In Slave Out) 및 마스터 아웃 슬레이브 인 라인(MOSI; Master Out Slave In), 상기 서브 프로세서 또는 상기 주변 장치 중 하나를 선택하여 동작 가능한 상태로 전환시키는 신호 전송을 위한 슬레이브 선택 라인(SS; Slave Select), 상기 선택 라인으로부터 분기되며, 상기 선택 라인을 통해 전송되는 신호를 상기 선택된 서브 프로세서 또는 주변 장치의 상태 머신(State Machine) 초기화 신호로서 전송하는 인터럽트 라인(Intr), 및 클록 전송 라인(SCK; SPI Clock)을 포함하는 데이터 통신 시스템이 제공된다.A data communication system is disclosed. According to an embodiment of the present invention, at least one subprocessor or at least one main processor and at least one subprocessor connected to the main processor through a SPI (Serial Peripheral Interface) scheme and performing an operation corresponding to an instruction transmitted from the main processor And a peripheral device, wherein the connection via the SPI method is performed by one or more bus lines, wherein the one or more bus lines include a master in slave out (MISO) and a master out slave for data transmission. A slave select line (SS) for signal transmission for selecting one of an in-line (MOSI; Master Out Slave In), the subprocessor, or the peripheral device into an operable state, and branching from the select line, A signal transmitted through the selection line to the selected subprocessor or peripheral device; The data communication system is provided, including; (SPI Clock SCK) interrupt line (Intr), and a clock transmission line for transmitting a state machine (State Machine) initialization signal.

Description

데이터 통신 시스템{DATA COMMUNICATION SYSTEM}DATA COMMUNICATION SYSTEM}

본 발명은 데이터 통신 시스템에 관한 것으로, 보다 상세하게는, 별도의 하드웨어 없이도 다중 프로세서를 연결할 수 있도록 하는 데이터 통신 시스템에 관한 것이다. The present invention relates to a data communication system, and more particularly, to a data communication system that enables multiple processors to be connected without additional hardware.

최근, 날로 복잡해지는 무선 센서 네트워크의 응용 프로그램들을 지원하기 위한 고성능 센서노드 구성에 대한 노력이 증대되고 있다. 통상적으로 대부분의 센서 노드들은 단일 프로세서 방식을 사용하는데, 저전력을 우선적 요구사항으로 고려하기 때문에, 8비트 또는 16비트의 프로세서(예를 들면, ATMega128, MSP430F1611 등)를 주로 사용하였다. 일부 고성능을 요구하는 센서 노드에서는 고속의 16비트 또는 32비트(예를 들면, XYZ의 OKI ML67Q5002)의 단일칩도 사용되었다. In recent years, efforts to construct high-performance sensor nodes to support increasingly complex applications of wireless sensor networks have been increasing. In general, most sensor nodes use a single processor method. Since low power is a priority requirement, an 8-bit or 16-bit processor (eg, ATMega128, MSP430F1611, etc.) is mainly used. In some high-performance sensor nodes, a single chip of high-speed 16-bit or 32-bit (eg XYZ's OKI ML67Q5002) was also used.

한편, 높은 수준의 고성능이 요구되는 센서 노드에서는 다중 프로세서를 이용한 설계법이 사용되었다. 일례로서, 리프(LEAP; Localized Encryption and Authentication Protocol) 방식의 센서 노드의 경우에는 16비트 프로세서인 MSP430 및 PXA270의 프로세서로 구성되며, 파스타(PASTA) 방식의 경우에는 8비트 프로세서들로 구성된다. 리프 방식의 경우에는 프로세서들이 단순 연결된 형태로서 시스템 버스의 개념은 존재하지 않고, 파스타 방식의 경우에는 몇 가지의 공통 인터페이스를 제공하고 있으나, 프로세서와 주변 장치들을 동시에 연결할 수 있는 시스템 버스는 제공하지 못하였다. On the other hand, in the sensor node that requires a high level of performance, a design method using multiple processors has been used. For example, in the case of a leaf node (LEAP) type sensor node, a 16-bit processor, the MSP430 and a PXA270 processor, and a pasta (PASTA) type processor, the 8-bit processors are configured. In the leaf method, processors are simply connected, and the concept of the system bus does not exist. In the past method, some common interfaces are provided, but the system bus that can simultaneously connect the processor and peripheral devices is not provided. It was.

현재 멀티 마스터 직렬 버스 구조로서 프로세서나 장치들을 연결할 수 있고 확장성을 보장할 수 있는 인터페이스로서 내부 집적 회로(Inter-Integrated Circuit; I2C)가 존재한다. 그러나, 최근 센서 노드에서 사용되는 대부분의 주변 장치들은 SPI(Serial Peripheral Interface)만을 가지고 있기 때문에, 프로세서와 주변장치를 동일한 인터페이스로 연결하는 데에는 무리가 따를 수 있다. 또한, 내부 집적 회로 방식의 인터페이스는 표준 모드에서 100kbps의 속도를 지원하는데, 이 또한, SPI 방식 연결에 비해 10배 이상 느리다는 문제점이 있다. 한편, 전력 소모 측면에서도 불리한 점이 있어 저전력 고성능 센서 노드용 시스템 버스로 사용되기에는 많은 무리가 따른다. Currently, there is an inter-integrated circuit (I2C) as an interface to connect processors or devices as a multi-master serial bus structure and to guarantee scalability. However, since most peripheral devices used in recent sensor nodes only have a serial peripheral interface (SPI), it can be difficult to connect the processor and the peripheral device to the same interface. In addition, the internal integrated circuit interface supports a speed of 100 kbps in the standard mode, which is also 10 times slower than the SPI connection. On the other hand, there are disadvantages in terms of power consumption, and it is too much to be used as a system bus for low power and high performance sensor nodes.

본 발명은 상술한 종래 기술의 문제점을 해결하기 위한 것으로, 고성능 센서 노드를 다중 프로세서로 구현하기 위한 프로세서 간 또는 프로세서와 주변 장치 간 통신을 위한 시스템 버스를 제공하고, 별도의 하드웨어 없이도 SPI 방식을 사용하여 마스터/슬레이브 방식으로 연결 가능하도록 하는 것을 그 목적으로 한다.The present invention is to solve the above-mentioned problems of the prior art, and provides a system bus for communication between the processor or the processor and the peripheral device for implementing a high-performance sensor node as a multi-processor, using the SPI method without any additional hardware The purpose is to enable connection in a master / slave manner.

본 발명의 다른 목적은 마스터/슬레이브 방식으로 연결되는 경우, 메인 프로세서로부터 정의된 명령어가 수신된 경우에만 상태 머신이 초기화되어 동작할 수 있도록 함으로써 저전력 고성능 데이터 통신을 가능하게 하는 것이다. Another object of the present invention is to enable low power high performance data communication by allowing the state machine to initialize and operate only when a defined instruction is received from the main processor when connected in a master / slave fashion.

상술한 목적을 달성하기 위한 본 발명의 일 실시예에 따르면, 메인 프로세서, 및 상기 메인 프로세서와 SPI(Serial Peripheral Interface) 방식을 통해 연결되며, 상기 메인 프로세서로부터 전송되는 명령어에 대응되는 동작을 수행하는 일 이상의 서브 프로세서 또는 일 이상의 주변 장치를 포함하고, 상기 SPI 방식을 통한 연결은 일 이상의 버스 라인에 의해 이루어지고, 상기 일 이상의 버스 라인은, 데이터 전송을 위한 마스터 인 슬레이브 아웃 라인(MISO; Master In Slave Out) 및 마스터 아웃 슬레이브 인 라인(MOSI; Master Out Slave In), 상기 서브 프로세서 또는 상기 주변 장치 중 하나를 선택하여 동작 가능한 상태로 전환시키는 신호 전송을 위한 슬레이브 선택 라인(SS; Slave Select), 상기 선택 라인으로부터 분기되며, 상기 선택 라인을 통해 전송되는 신호를 상기 선택된 서브 프로세서 또는 주변 장치의 상태 머신(State Machine) 초기화 신호로서 전송하는 인터럽트 라인(Intr), 및 클록 전송 라인(SCK; SPI Clock)을 포함하는 데이터 통신 시스템이 제공된다. According to an embodiment of the present invention for achieving the above object, is connected to the main processor and the main processor through a SPI (Serial Peripheral Interface) scheme, and performs an operation corresponding to the command transmitted from the main processor One or more subprocessors or one or more peripheral devices, wherein the connection via the SPI method is made by one or more bus lines, the one or more bus lines, Master In Slave Outline (MISO; Master In) for data transmission Slave Out (Slave Out) and Master Out Slave In (MOSI; Master Out Slave In), a slave select line (SS) for signal transmission to select one of the subprocessor or the peripheral device and put it into an operational state, The signal is branched from the selection line, and the signal transmitted through the selection line is selected. Interrupt line (Intr), and a clock transmission line for transmitting a probe processor or state machine peripherals (State Machine) initialization signal, a data communication system including a (SCK SPI Clock) is provided.

상기 일 이상의 버스 라인은, 상기 서브 프로세서 또는 상기 주변 장치로부터 상기 메인 프로세서로 전송될 데이터가 존재한다는 것을 알리는 신호 전송을 위한 데이터 대기 라인(Data Ready)을 더 포함할 수 있다. The at least one bus line may further include a data standby line (Data Ready) for signal transmission indicating that there is data to be transmitted from the subprocessor or the peripheral device to the main processor.

상기 명령어는 "읽기", "쓰기", "실행" 명령어 중 어느 하나일 수 있다. The command may be any one of a “read”, “write”, and “execute” command.

상기 "읽기" 명령어는, "read(SPIdevID, addr, len, value)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevID"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "addr"의 주소에 존재하는 "len"의 길이를 갖는 "value" 값을 읽는 동작을 수행하고, 상기 "쓰기" 명령어는, "write(SPIdevId, addr, len, value)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevId"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "addr"의 주소에 "len"의 길이를 갖는 "value" 값을 쓰는 동작을 수행하고, 상기 "실행" 명령어는, "exec(SPIdevId, command, paramlen, param)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevId"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "paramlen"의 길이를 갖는 "param"라는 파라미터를 참조하여 "command"라는 서비스를 실행하는 동작을 수행할 수 있다. The "read" command is transmitted in the form of "read (SPIdevID, addr, len, value)", and when the command of this type is transmitted, the subprocessor or peripheral device corresponding to the address of "SPIdevID" is " perform an operation of reading a "value" value having a length of "len" present at an address of addr, and the "write" command is transmitted in the form of "write (SPIdevId, addr, len, value)" When the command of the above form is transmitted, the subprocessor or the peripheral device corresponding to the address of "SPIdevId" writes a "value" value having a length of "len" in the address of "addr", and the " "Exec (SPIdevId, command, paramlen, param)" is transmitted in the form of "exec (SPIdevId, command, paramlen, param)", and when the command of the above form is transmitted, the subprocessor or peripheral device corresponding to the address of "SPIdevId" is "paramlen". A service named "command" with reference to a parameter named "param" with a length of It may perform the operation to be performed.

상기 명령어는, 상기 동작 수행을 위해 필요한 변수가 기록된 데이터의 길이, 상기 명령어가 기록된 오피코드(opcode), 상기 데이터를 포함하는 데이터 포맷으로 전송될 수 있다. The command may be transmitted in a data format including a length of data in which a variable necessary for performing the operation is recorded, an opcode in which the command is recorded, and the data.

상기 서브 프로세서 또는 상기 주변 장치는 상기 동작 수행의 결과 값의 길이, 상기 결과 값을 포함하는 데이터 포맷을 상기 메인 프로세서에 전송할 수 있다. The subprocessor or the peripheral device may transmit a data format including the length of the result value of the operation and the result value to the main processor.

본 발명에 따르면, 고성능 센서 노드가 다중 프로세서를 통해 구현될 수 있으며, 별도의 하드웨어 없이도 SPI 방식을 사용하여 마스터/슬레이브 방식으로 데이터 통신 시스템이 구현될 수 있게 된다. According to the present invention, a high performance sensor node may be implemented through multiple processors, and a data communication system may be implemented in a master / slave manner using an SPI method without any additional hardware.

또한, 본 발명에 따르면, 프로세서들 간에 마스터/슬레이브 방식으로 연결되는 경우, 메인 프로세서로부터 정의된 명령어가 수신된 경우에만 상태 머신이 초기화되어 동작하기 때문에, 저전력 고성능 데이터 통신이 가능해진다. In addition, according to the present invention, when connected in a master / slave manner between processors, since the state machine is initialized and operated only when a command defined from the main processor is received, low power high performance data communication is possible.

도 1은 본 발명의 일 실시예에 따른 데이터 통신 시스템의 구성을 나타내는 도면이다.
도 2는 본 발명의 일 실시예에 따른 메인 프로세서와 서브 프로세서 또는 주변 장치 간의 연결을 설명하기 위한 도면이다.
도 3은 본 발명의 일 실시예에 따라 메인 프로세서로부터 전송되는 명령어의 데이터 프레임 포맷을 나타내는 도면이다.
도 4는 본 발명의 일 실시예에 따른 서브 프로세서 또는 주변 장치가 갖는 상태 머신의 일례를 도시하는 도면이다.
도 5는 본 발명의 일 실시예에 따라 서브 프로세서 또는 주변 장치로부터 전송되는 데이터 프레임 포맷을 나타내는 도면이다.
1 is a view showing the configuration of a data communication system according to an embodiment of the present invention.
2 is a diagram illustrating a connection between a main processor and a subprocessor or a peripheral device according to an exemplary embodiment of the present invention.
3 is a diagram illustrating a data frame format of an instruction transmitted from a main processor according to an embodiment of the present invention.
4 is a diagram illustrating an example of a state machine that a subprocessor or a peripheral device has in accordance with an embodiment of the present invention.
5 is a diagram illustrating a data frame format transmitted from a subprocessor or a peripheral device according to an embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. DETAILED DESCRIPTION OF THE INVENTION The following detailed description of the invention refers to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the present invention are different, but need not be mutually exclusive. For example, certain features, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the invention in connection with an embodiment. It is also to be understood that the position or arrangement of the individual components within each disclosed embodiment may be varied without departing from the spirit and scope of the invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is to be limited only by the appended claims, along with the full scope of equivalents to which such claims are entitled, if properly explained. In the drawings, like reference numerals refer to the same or similar functions throughout the several views.

이하, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 하기 위하여, 본 발명의 바람직한 실시예들에 관하여 첨부된 도면을 참조하여 상세히 설명하기로 한다. Hereinafter, preferred 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 present invention.

[본 발명의 바람직한 실시예][Preferred Embodiment of the Present Invention]

데이터 통신 시스템의 구성Data Communication System Configuration

도 1은 본 발명의 일 실시예에 따른 데이터 통신 시스템의 구성을 나타내는 도면이다. 도 1에 도시되는 데이터 통신 시스템은 센서노드에 사용되는 데이터 통신 시스템일 수 있으나, 이 외의 다른 네트워크 통신을 위해서 사용될 수도 있다.1 is a view showing the configuration of a data communication system according to an embodiment of the present invention. The data communication system shown in FIG. 1 may be a data communication system used for a sensor node, but may be used for other network communication.

도 1을 참조하면, 본 발명의 데이터 통신 시스템은 메인 프로세서(110)와 메인 프로세서(110)를 중심으로 하여 연결되는 복수 개의 서브 프로세서(120) 및 복수 개의 주변 장치(130)를 포함하여 구성될 수 있다. 도 1에서는 1개의 메인 프로세서(110), M개의 서브 프로세서(120), N개의 주변 장치(130)가 데이터 통신 시스템을 구성하는 경우가 예시되었다. 또한, 메인 프로세서(110)와 서브 프로세서(120)가 구별되어 도시되었지만, 이는 설명의 편의를 위한 것일 뿐, 동일한 내부 구성을 갖는 프로세서가 메인 프로세서(110) 또는 서브 프로세서(120)로 이용될 수 있다. Referring to FIG. 1, the data communication system of the present invention may include a plurality of subprocessors 120 and a plurality of peripheral devices 130 connected to the main processor 110 and the main processor 110. Can be. In FIG. 1, one main processor 110, M subprocessors 120, and N peripheral devices 130 form a data communication system. In addition, although the main processor 110 and the sub-processor 120 are shown separately, this is for convenience of description only, and a processor having the same internal configuration may be used as the main processor 110 or the sub-processor 120. have.

서브 프로세서(120)와 주변 장치(130)는 메인 프로세서(110)와 시리얼 통신을 통해 연결될 수 있다. 본 발명의 일 실시예에 따르면, 이러한 시리얼 통신은 SPI(Serial Peripheral Interface) 방식의 직렬 통신 방식일 수 있다.The subprocessor 120 and the peripheral device 130 may be connected to the main processor 110 through serial communication. According to one embodiment of the present invention, such serial communication may be a serial communication method of the SPI (Serial Peripheral Interface) method.

메인 프로세서(110)와 서브 프로세서(120) 간 또는 메인 프로세서(110)와 주변 장치(130) 간 통신은 일대일 통신 방식을 통해 이루어진다. Communication between the main processor 110 and the subprocessor 120 or between the main processor 110 and the peripheral device 130 is performed through a one-to-one communication method.

도 2를 본 발명의 일 실시예에 따른 서브 프로세서(120) 또는 주변 장치(130)와 메인 프로세서(110) 간 통신 방식을 하드웨어적으로 설명하는 도면이다. 도 2는 SPI 통신 방식을 통해 메인 프로세서(110)와 서브 프로세서(120)가 연결되는 경우를 예로 들어 설명하지만, 메인 프로세서(110)와 주변 장치(130) 간 통신 방식도 이와 동일하게 구현될 수 있다. 2 is a diagram illustrating a hardware communication method between the subprocessor 120 or the peripheral device 130 and the main processor 110 according to an exemplary embodiment of the present invention. Although FIG. 2 illustrates an example in which the main processor 110 and the subprocessor 120 are connected through the SPI communication method, the communication method between the main processor 110 and the peripheral device 130 may be similarly implemented. have.

도 2를 참조하면, 메인 프로세서(110)와 서브 프로세서(120) 간 SPI 통신은 일 이상의 라인을 통해 이루어질 수 있으며, 이 때, 메인 프로세서(110)와 서브 프로세서(120)는 마스터(master)/슬레이브(slave) 통신 방식으로 연결될 수 있다.Referring to FIG. 2, the SPI communication between the main processor 110 and the subprocessor 120 may be performed through one or more lines. In this case, the main processor 110 and the subprocessor 120 may be master / master. It may be connected in a slave communication manner.

마스터 인 슬레이브 아웃 라인(MISO; Master In Slave Out)과 마스터 아웃 슬레이브 인 라인(MOSI; Master Out Slave In)은 데이터 전송을 위해 사용되는 라인이다. The Master In Slave Out (MISO) and the Master Out Slave In (MOSI) are lines used for data transmission.

한편, 메인 프로세서(110)는 일 이상의 서브 프로세서(120) 및 일 이상의 주변 장치(130) 중 통신 대상이 되는 서브 프로세서(120) 또는 주변 장치(130)를 선택하여야 하는데, 이러한 선택과 관련된 신호가 슬레이브 선택 라인(SS; Slave Select)을 통해 선택된 서브 프로세서(120) 또는 주변 장치(130)로 입력된다. 예를 들어, 메인 프로세서(120)에 의해 특정 서브 프로세서(120)가 통신 대상으로서 선택되었다면, 슬레이브 선택 라인(SS)을 통해 해당 서브 프로세서(120)로 선택 신호가 입력되고, 해당 서브 프로세서(120)는 동작 가능한 상태가 될 수 있다.Meanwhile, the main processor 110 should select one or more subprocessors 120 and one or more peripheral devices 130, which are communication targets, or a peripheral device 130. The input is input to the selected subprocessor 120 or the peripheral device 130 through a slave select line (SS). For example, when a specific subprocessor 120 is selected as a communication target by the main processor 120, a selection signal is input to the corresponding subprocessor 120 through the slave selection line SS, and the corresponding subprocessor 120 is selected. ) May be operable.

본 발명의 일 실시예에 따르면, 슬레이브 선택 라인(SS)으로 입력되는 신호는 슬레이브 선택 라인(SS)으로부터 분기된 다른 라인인 인터럽트 라인(Intr)으로 분기되어 다른 포트를 통해 서브 프로세서(120)에 입력될 수 있다. 인터럽트 라인(Intr)으로 입력되는 신호는 서브 프로세서(120)가 슬립(sleep) 상태에 있을 때 이를 웨이크업(wake-up) 상태로 해제시키는 역할을 수행하며, 서브 프로세서(120)의 내부 상태 머신(State Machine)을 초기화시키는 역할 또한 수행할 수 있다. 즉, 슬레이브 선택 신호가 입력되면 서브 프로세서(120)는 웨이크업 상태로 되고, 상태 머신은 초기화되어 동작 가능한 상태로 된다.According to an embodiment of the present invention, the signal input to the slave select line SS is branched to the interrupt line Intr, which is another line branched from the slave select line SS, to the subprocessor 120 through another port. Can be entered. The signal input to the interrupt line Intr serves to release the wakeup state when the subprocessor 120 is in the sleep state, and the internal state machine of the subprocessor 120 It can also play a role of initializing a state machine. That is, when the slave selection signal is input, the subprocessor 120 enters a wake-up state, and the state machine is initialized to an operable state.

메인 프로세서(110)와 서브 프로세서(120) 사이에서 데이터 전송 버스라고 할 수 있는 마스터 인 슬레이브 아웃 라인(MISO) 및 마스터 아웃 슬레이브 인 라인(MOSI)이 연결되고, 주소 할당 버스라고 할 수 있는 슬레이브 선택 라인(SS)이 연결되면, 클록 전송 라인(SCK; SPI Clock)을 통해 서브 프로세서(120)로 클록 신호가 공급된다. 이러한 클록 신호는 메인 프로세서(110)로부터 서브 프로세서(120)로의 데이터 전송 타이밍을 알려주는 신호이다. 이 때, 만약 서브 프로세서(120)로부터 메인 프로세서(110)로 전송될 데이터가 존재한다면, 서브 프로세서(120)로부터 메인 프로세서(110)에 이러한 상태를 알리는 신호를 전송하기 위한 추가적인 데이터 대기 라인(Data Ready)이 더 구비될 수 있다. 즉, 서브 프로세서(120)는 메인 프로세서(110)에 전송할 데이터가 존재하는 경우 데이터 대기 라인(Data Ready)을 통해 이에 대응하는 신호를 전송하고, 메인 프로세서(110)는 신호 수신 여부를 계속적으로 체크하는 소프트웨어적 방식인 폴링 방식 또는 수신 신호의 변화만을 체크하는 하드웨어적 방식인 인터럽트 방식으로 해당 신호를 수신할 수 있다. 데이터 대기 라인(Data Ready) 라인은 본 발명에 있어서 필수적인 구성요소는 아니라고 할 수 있다.The master in slave out line (MISO) and the master out slave in line (MOSI), which are referred to as data transfer buses, are connected between the main processor 110 and the subprocessor 120, and the slave selection, which is called an address allocation bus, is selected. When the line SS is connected, a clock signal is supplied to the subprocessor 120 through a clock transmission line SCK. This clock signal is a signal indicating the timing of data transmission from the main processor 110 to the subprocessor 120. At this time, if there is data to be transmitted from the subprocessor 120 to the main processor 110, an additional data waiting line for transmitting a signal indicating this state from the subprocessor 120 to the main processor 110 (Data) Ready) may be further provided. That is, when there is data to be transmitted to the main processor 110, the subprocessor 120 transmits a corresponding signal through a data standby line (Data Ready), and the main processor 110 continuously checks whether a signal is received. The signal may be received by a polling method, which is a software method, or an interrupt method, which is a hardware method of checking only a change of a received signal. The data ready line is not an essential component of the present invention.

전술한 바와 같이, 도 2를 참조하여 설명한 통신 방식은 메인 프로세서(110)와 서브 프로세서(120) 뿐만 아니라 메인 프로세서(110)와 주변 장치(130) 사이에서도 동일하게 구현될 수 있다.As described above, the communication scheme described with reference to FIG. 2 may be equally implemented between the main processor 110 and the peripheral device 130 as well as the main processor 110 and the subprocessor 120.

이하에서는, 메인 프로세서(110)에서 서브 프로세서(120) 또는 주변 장치(130)로 데이터와 명령어가 전송되는 방식에 대해 상세히 설명하기로 한다. Hereinafter, a method of transmitting data and instructions from the main processor 110 to the subprocessor 120 or the peripheral device 130 will be described in detail.

데이터 및 명령어 전송Send data and instructions

도 3은 메인 프로세서(110)로부터 서브 프로세서(120) 또는 주변 장치(130)로 명령어가 전송되는 데이터 프레임 포맷을 나타내는 도면이다.3 is a diagram illustrating a data frame format in which an instruction is transmitted from the main processor 110 to the subprocessor 120 or the peripheral device 130.

도 3을 참조하면, 메인 프로세서(110)는 전송되는 데이터의 길이, 명령어인 오피코드(opcode; Operation Code) 및 데이터를 순차적으로 전송한다는 것을 알 수 있다. Referring to FIG. 3, it can be seen that the main processor 110 sequentially transmits a length of data to be transmitted, an operation code (opcode) as an instruction, and data.

서브 프로세서(120) 또는 주변 장치(130)는 메인 프로세서(110)로부터 전송되는 데이터에 대해 오피코드(opcode) 형식으로 전송되는 명령어에 해당하는 동작을 수행한다.The subprocessor 120 or the peripheral device 130 performs an operation corresponding to an instruction transmitted in an opcode format with respect to data transmitted from the main processor 110.

하기 표 1은 메인 프로세서(110)로부터 서브 프로세서(120) 또는 주변 장치(130)로 전송되는 명령어 및 그에 대한 설명을 나타내는 표이다. Table 1 below shows a command transmitted from the main processor 110 to the subprocessor 120 or the peripheral device 130 and a description thereof.

명령어command 파라미터parameter read(SPIdevId, addr, len, value)read (SPIdevId, addr, len, value) SPIdevId: SPI 버스 내의 장치 주소
addr: SPIdevId 장치 내의 주소
len: addr에 있는 데이터의 길이
value: addr에 있는 데이터가 저장되어 되돌아오는 변수
SPIdevId: device address within the SPI bus
addr: address in the SPIdevId device
len: the length of the data in addr
value: The variable whose data in addr is stored and returned
write(SPIdevId, addr, len, value)write (SPIdevId, addr, len, value) SPIdevId: SPI 버스내의 장치 주소
addr: SPIdevId 장치 내의 주소,
len: addr에 있는 데이터의 길이
value: addr에 쓰고자 하는 값이 들어있는 변수
SPIdevId: device address on the SPI bus
addr: address in SPIdevId device,
len: the length of the data in addr
value: variable containing the value to add to the addr
exec(SPIdevId, command, paramlen, param)exec (SPIdevId, command, paramlen, param) SPIdevId: SPI 버스내의 장치 주소
command: SPI 장치에서 실행하고자 하는 서비스 이름
paramlen: 파라미터의 길이
param: command가 필요로 하는 파라미터
SPIdevId: device address on the SPI bus
command: The service name you want to run on the SPI device
paramlen: the length of the parameter
param: parameters required by command

"read", "write", "exec" 명령어는 각각 읽기, 쓰기, 실행을 지시하는 명령어이다."read", "write" and "exec" commands are commands to read, write and execute respectively.

이러한 각 명령어는 도 3에서 오피코드(opcode)에 해당한다. 각 명령어는 서브 프로세서(120) 또는 주변 장치(130)로 하여금 오피코드(opcode)에 뒤이어 전송되는 데이터를 대상으로 해당 명령에 대응되는 동작을 수행하도록 한다.Each such instruction corresponds to an opcode in FIG. 3. Each command causes the subprocessor 120 or the peripheral device 130 to perform an operation corresponding to the command on the data transmitted after the opcode.

서브 프로세서(120) 또는 주변 장치(130)가 "read"라는 명령어를 수신하면 데이터를 읽는 동작을 수행한다. 일례로, read(SPIdevId, addr, len, value) 라는 명령어를 수신하면, "SPIdevID"의 주소에 해당하는 서브 프로세서(120) 또는 주변 장치(130)가 그 장치 내에서 "addr"의 주소에 존재하는 "len"의 길이를 갖는 "value" 값을 읽는 동작을 수행한다. When the subprocessor 120 or the peripheral device 130 receives a command “read”, the subprocessor 120 or the peripheral device 130 reads data. For example, upon receiving the command read (SPIdevId, addr, len, value), the subprocessor 120 or the peripheral device 130 corresponding to the address of “SPIdevID” exists at the address of “addr” within the device. Reads a "value" value having a length of "len".

또한, "write"라는 명령어를 수신하면 데이터를 쓰는 동작을 수행한다. 일례로, write(SPIdevId, addr, len, value) 라는 명령어를 수신하면, "SPIdevId"의 주소에 해당하는 서브 프로세서(120) 또는 주변 장치(130)가 그 장치 내에서 "addr"의 주소에 "len"의 길이를 갖는 "value" 값을 쓰는 동작을 수행한다. In addition, when the command "write" is received, the data write operation is performed. For example, upon receiving the command write (SPIdevId, addr, len, value), the subprocessor 120 or the peripheral device 130 corresponding to the address of “SPIdevId” is assigned to the address of “addr” within the device. Write the value "value" with length len ".

한편, "exec"라는 명령어를 수신하면 소정의 서비스를 실행하는 동작을 수행한다. 일례로, exec(SPIdevId, command, paramlen, param) 라는 명령어를 수신하면, "SPIdevId"의 주소에 해당하는 서브 프로세서(120) 또는 주변 장치(130)가 "paramlen"의 길이를 갖는 "param"라는 파라미터를 참조하여 "command"라는 서비스를 실행하는 동작을 수행한다.On the other hand, upon receiving the command "exec" it performs an operation of executing a predetermined service. For example, when the command exec (SPIdevId, command, paramlen, param) is received, the subprocessor 120 or the peripheral device 130 corresponding to the address of "SPIdevId" is called "param" having a length of "paramlen". Runs a service named "command" by referring to its parameters.

일례로, 메인 프로세서(110)로부터 서브 프로세서(120) 또는 주변 장치(130)로 전송되는 명령어는 다음과 같은 데이터 프레임 포맷일 수 있다. For example, the command transmitted from the main processor 110 to the subprocessor 120 or the peripheral device 130 may be in the following data frame format.

·Master → SlaveMaster → Slave

if opcode == READ if opcode == READ

data: addrdata: addr

else if opcode == WRITEelse if opcode == WRITE

data: addr.valuedata: addr.value

else if opcode == EXECelse if opcode == EXEC

data: command.paramdata: command.param

즉, 오피코드(opcode)가 "read"일 경우에는 후속 전송되는 데이터에는 "addr" 파라미터가 기록되어 전송되고, "write"일 경우에는 후속 전송되는 데이터에 "addr", "valie" 파라미터가 기록되어 전송되고, "exec"일 경우에는 후속 전송되는 데이터에 "command", "param" 파라미터가 기록되어 전송될 수 있다. In other words, when the opcode is "read", the "addr" parameter is recorded and transmitted in the subsequent data, and in the case of "write", the "addr" and "valie" parameters are recorded in the data. In the case of "exec", "command" and "param" parameters may be recorded and transmitted in subsequent data.

그러나, 이는 일례일 뿐이며, 메인 프로세서(110)로부터 전송되는 명령어의 데이터 프레임 포맷은 이와 다른 형태일 수도 있다. 예를 들어, "read"의 오피코드(opcode)에 후속하여 전송되는 데이터에는 "addr", "len", "value" 파라미터가 모두 기록되어 전송될 수도 있다. However, this is only an example, and the data frame format of the instruction transmitted from the main processor 110 may be different. For example, all of the "addr", "len", and "value" parameters may be recorded and transmitted in data transmitted after an opcode of "read".

이하에서는, 메인 프로세서(110)에 의해 특정 서브 프로세서(120) 또는 주변 장치(130)가 선택되고 명령어가 전송되는 경우, 서브 프로세서(120) 또는 주변 장치(130)에서 동작하는 방식에 대해 설명하기로 한다. Hereinafter, when the specific subprocessor 120 or the peripheral device 130 is selected by the main processor 110 and a command is transmitted, a method of operating in the subprocessor 120 or the peripheral device 130 will be described. Shall be.

상태 머신State machine

메인 프로세서(110)와 서브 프로세서(120) 또는 주변 장치(130)가 연결되면 메인 프로세서(110)와 서브 프로세서(120) 또는 메인 프로세서(110)와 주변 장치(130)는 소프트웨어적으로 클라이언트/서버 방식으로 동작하게 된다.When the main processor 110 and the subprocessor 120 or the peripheral device 130 are connected, the main processor 110 and the subprocessor 120 or the main processor 110 and the peripheral device 130 are software / client. It works in a way.

전술한 바와 같이, 메인 프로세서(110)는 복수 개의 서브 프로세서(120) 또는 주변 장치(130) 중 하나를 선택할 수 있다. 이러한 선택은 슬레이브 선택 라인(SS)을 통해 특정 서브 프로세서(120) 또는 주변 장치(130)에 선택 신호를 인가함으로써 수행될 수 있다. 선택 신호가 인가된 서브 프로세서(120) 또는 주변 장치(130)는 동작 가능한 상태가 된다. 전술한 바와 같이, 슬레이브 선택 라인(SS)을 통해 전송되는 선택 신호는 분기되어 인터럽트 라인(Intr)으로 인가될 수 있는데, 이러한 분기 신호가 서브 프로세서(120) 또는 주변 장치(130)의 상태 머신을 초기화시킬 수 있다. 초기화는 메인 프로세서(110)로부터 첫번째 유효 바이트가 전송되기 이전 시점에 이루어질 수 있다. 이러한 선택 신호를 통한 초기화는 슬레이브 선택이 시작되는 시점과 슬레이브 선택을 끝내는 시점에 이루어질 수 있다. As described above, the main processor 110 may select one of the plurality of subprocessors 120 or the peripheral device 130. This selection may be performed by applying a selection signal to the specific subprocessor 120 or the peripheral device 130 through the slave selection line SS. The subprocessor 120 or the peripheral device 130 to which the selection signal is applied is in an operable state. As described above, the select signal transmitted through the slave select line SS may be branched and applied to the interrupt line Intr, which may be used to interrupt the state machine of the subprocessor 120 or the peripheral device 130. Can be initialized. Initialization may occur at a point before the first valid byte is transmitted from the main processor 110. Initialization through the selection signal may be performed at the time when the slave selection starts and when the slave selection ends.

서브 프로세서(120) 또는 주변 장치(130)가 선택된 후에는 메인 프로세서(110)로부터 도 3에 도시되는 형태로 명령어가 전송된다. 명령어를 전송받은 서브 프로세서(120) 또는 주변 장치(130)는 자체적으로 가지고 있는 상태 머신을 이용하여 전송되는 데이터들이 유효한 프레임인지 여부를 확인하고 수신되는 명령어에 대응되는 상태로 이동하여 해당 루틴을 수행하고 그 결과값을 상태 머신에 맞춰 메인 프로세서(110)에 돌려준다.After the subprocessor 120 or the peripheral device 130 is selected, the command is transmitted from the main processor 110 in the form shown in FIG. 3. The subprocessor 120 or the peripheral device 130 receiving the command checks whether the transmitted data is a valid frame using its own state machine and moves to the state corresponding to the received command to perform the corresponding routine. The result is returned to the main processor 110 in accordance with the state machine.

도 4는 서브 프로세서(120) 또는 주변 장치(130)가 갖는 상태 머신의 일례를 도시하는 도면이다. 4 is a diagram illustrating an example of a state machine that the subprocessor 120 or the peripheral device 130 has.

도 4를 참조하면, 슬레이브 선택 라인(SS)을 통해 선택 신호가 전송되면, 상태 머신이 초기화된다(S400). 메인 프로세서(110)로부터 전송되는 데이터의 길이는 고정된 길이일 수도 있고, 가변적인 길이일 수도 있는데, 가변적인 경우에는 데이터의 길이에 대한 정보를 수신하고 이를 파악한 후, 길이 상태("length")로 이동한다(S410). 그 후, 메인 프로세서(110)로부터 전송된 명령어에 따라, "exec"라는 명령어가 전송된 경우에는 커맨드 상태("cmd")로 이동하여 명령어와 함께 전송된 "param"라는 파라미터를 참조로 하여 "command"에 해당하는 서비스를 실행한다(S420). 전술한 바와 같이, "command"와 "param"라는 파라미터는 "exec"와 함께, 보다 구체적으로는, "exec"라는 오피코드(opcode)에 후속하는 데이터로서 함께 전송될 수 있다. 서비스 실행 결과 값이 생성되면, 해당 결과 값의 길이를 메인 프로세서(110)로 돌려보내고 리턴 상태("ret")로 이동한 후(S430), 생성된 결과 값을 후속하여 돌려보내고, 다시 초기화 상태로 이동한다(S400). 한편, 메인 프로세서(110)로부터 전송된 명령어가 "read" 또는 "write"인 경우에는, 길이 상태("length")에서 주소 상태("addr")로 이동한다(S440). 그 후, 수신 상태("rx")로 이동하여 해당 주소에 있는 변수를 읽거나, 해당 주소에 변수를 쓰는 동작을 수행한다(S450). 읽기 또는 쓰기 대상이 되는 변수는 메인 프로세서(110)로부터 명령어와 함께 전송될 수 있다. 동작 수행 후에는 다시 초기화 상태가 될 수 있다(S400). Referring to FIG. 4, when the selection signal is transmitted through the slave selection line SS, the state machine is initialized (S400). The length of the data transmitted from the main processor 110 may be a fixed length or a variable length. In the case of a variable, the length of the data is received after the information about the length of the data is received and determined. Move to (S410). Thereafter, when the command "exec" is transmitted according to the command transmitted from the main processor 110, the command state ("cmd") moves to the command "param" transmitted with the command with reference to " command is executed (S420). As mentioned above, the parameters "command" and "param" may be transmitted together with "exec", more specifically as data following an opcode of "exec". When the service execution result value is generated, the length of the corresponding result value is returned to the main processor 110 and moved to the return state ("ret") (S430), and subsequently the generated result value is returned and subsequently initialized again. Move to (S400). On the other hand, if the command transmitted from the main processor 110 is "read" or "write", it moves from the length state ("length") to the address state ("addr") (S440). Thereafter, the mobile station moves to the reception state ("rx") to read a variable at a corresponding address or write a variable at a corresponding address (S450). The variable to be read or written may be transmitted together with an instruction from the main processor 110. After performing the operation may be reset again (S400).

한편, 서브 프로세서(120) 또는 주변 장치(130)는 메인 프로세서(110)로부터 전송된 명령어를 되돌려줌으로써 해당 명령어가 정상적으로 수신되었다는 것을 알릴 수 있다. 구체적으로, "exec" 명령어가 수신된 경우에는 커맨드 상태("cmd")에서 수신한 명령어 리턴을 위한 송신 상태("tx")로 이동하고(S460), 되돌려주는 데이터, 즉, 메인 프로세서(110)로부터 전송된 명령어의 길이를 메인 프로세서(110)로 돌려보내고 리턴 상태("ret")로 이동한 후(S430), 해당 데이터를 후속하여 돌려보낼 수 있다. 이 때, 다시 초기화 상태로 이동할 수 있다(S400). 또한, "read", "write" 명령어가 수신된 경우에도 송신 상태("tx")로 이동하고(S460), 메인 프로세서(110)로부터 전송된 명령어의 길이를 메인 프로세서(110)로 돌려보내고 리턴 상태("ret")로 이동한 후(S430), 해당 데이터를 후속하여 돌려보낸다.Meanwhile, the subprocessor 120 or the peripheral device 130 may notify that the command is normally received by returning the command transmitted from the main processor 110. In detail, when the "exec" command is received, the command state ("cmd") is moved to the transmission state ("tx") for returning the command received (S460), the data returned, that is, the main processor 110 After returning the length of the command transmitted from the main processor 110 to the return state ("ret") (S430), the corresponding data can be returned subsequently. At this time, it may move back to the initialization state (S400). In addition, even when "read" and "write" commands are received, the controller moves to the transmission state ("tx") (S460), returns the length of the command transmitted from the main processor 110 to the main processor 110, and returns. After moving to the state "ret" (S430), the corresponding data is subsequently returned.

한편, 본 발명의 일 실시예에 따르면 메인 프로세서(110)와 서브 프로세서(120) 또는 주변 장치(130) 사이에는 데이터 대기 라인(Data Ready; 도 2 참조)이 연결되어 있을 수 있는데, 이러한 경우, 서브 프로세서(120) 또는 주변 장치(130)는 데이터 대기 라인(Data Ready)을 통해 데이터 대기 신호를 메인 프로세서(110)에 전송하여 전송할 데이터가 있음을 알릴 수 있다. 데이터 대기 라인(Data Ready)을 통해 전송되는 신호는 메인 프로세서(110)에 데이터가 전송된 후 리셋된다. 리셋과 동시에 서브 프로세서(120) 또는 주변 장치(130)는 추가적으로 전송될 데이터가 있는지를 확인한다. 만약, 추가적으로 전송될 데이터가 존재한다면 서브 프로세서(120) 또는 주변 장치(130)는 데이터가 전송될 수 있는 상태로 준비한 후 데이터 대기 라인(Data Ready)을 통해 해당 신호를 전송할 수 있다. 반대로, 메인 프로세서(110)는 데이터 대기 라인(Data Ready)을 통해 전송되는 신호의 변화를 통해 서브 프로세서(120) 또는 주변 장치(130)로부터 전송될 데이터의 존재 여부를 확인할 수 있다. Meanwhile, according to an embodiment of the present invention, a data waiting line (see FIG. 2) may be connected between the main processor 110 and the subprocessor 120 or the peripheral device 130. In this case, The subprocessor 120 or the peripheral device 130 may transmit a data wait signal to the main processor 110 through a data wait line (Data Ready) to inform that there is data to be transmitted. The signal transmitted through the data waiting line (Data Ready) is reset after data is transmitted to the main processor 110. At the same time as the reset, the subprocessor 120 or the peripheral device 130 checks whether there is additional data to be transmitted. If there is additional data to be transmitted, the subprocessor 120 or the peripheral device 130 may prepare the data in a state in which data can be transmitted and then transmit the corresponding signal through a data standby line. On the contrary, the main processor 110 may check whether there is data to be transmitted from the subprocessor 120 or the peripheral device 130 through the change of the signal transmitted through the data standby line.

서브 프로세서(120) 또는 주변 장치(130)는 소정 형태로 데이터를 메인 프로세서(110)에 전송할 수 있는데, 도 5는 본 발명의 일 실시예에 따라 서브 프로세서(120) 또는 주변 장치(130)가 메인 프로세서(110)에 데이터를 전송하는 데이터 프레임 포맷을 나타내는 도면이다.The subprocessor 120 or the peripheral device 130 may transmit data to the main processor 110 in a predetermined form. In FIG. 5, the subprocessor 120 or the peripheral device 130 may transmit data to the main processor 110. A diagram illustrating a data frame format for transmitting data to the main processor 110.

도 5를 참조하면, 서브 프로세서(120) 또는 주변 장치(130)는 전송하고자 하는 데이터의 길이 및 결과 값을 순차적으로 보낼 수 있다. 전송하고자 하는 데이터의 길이는 결과 값의 길이이며, 결과 값은 메인 프로세서(110)로부터 전송된 명령어에 따라 해당 루틴을 수행한 결과 값을 의미한다. 즉, 메인 프로세서(110)는 서브 프로세서(120) 또는 주변 장치(130)가 전송하고자 하는 결과 값의 길이를 먼저 읽은 후, 그 길이 만큼의 데이터를 읽어들인다. 만약, 데이터 대기 라인(Data Ready)으로부터 전송되는 신호가 없다면, 메인 프로세서(110)는 서브 프로세서(120) 또는 주변 장치(130)가 메인 프로세서(110)에 돌려줄 결과 값을 준비할 수 있도록 충분한 시간을 대기한 후, 도 5에 도시되는 데이터 프레임 포맷으로 전송되는 데이터를 읽어들일 수 있다. Referring to FIG. 5, the subprocessor 120 or the peripheral device 130 may sequentially transmit a length and a result value of data to be transmitted. The length of the data to be transmitted is the length of the result value, and the result value means the result value of performing the corresponding routine according to the command transmitted from the main processor 110. That is, the main processor 110 first reads the length of the result value to be transmitted by the subprocessor 120 or the peripheral device 130, and then reads data as much as the length. If no signal is transmitted from the data ready line, the main processor 110 is sufficient to prepare a result value for the subprocessor 120 or the peripheral device 130 to return to the main processor 110. After waiting for time, data transmitted in the data frame format shown in FIG. 5 can be read.

메인 프로세서(110)가 서브 프로세서(120) 또는 주변 장치(130)로부터 전송되는 모든 결과 값을 읽어들인 후에는 슬레이브 선택 라인(SS)을 통해 전송되는 선택 신호를 리셋시켜 통신을 완료할 수 있다.After the main processor 110 reads all the result values transmitted from the subprocessor 120 or the peripheral device 130, the communication may be completed by resetting the selection signal transmitted through the slave selection line SS.

이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, Those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims.

따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be construed as being limited to the above-described embodiments, and all of the equivalents or equivalents of the claims, as well as the following claims, I will say.

110: 메인 프로세서
120: 서브 프로세서
130: 주변 장치
110: main processor
120: subprocessor
130: peripheral device

Claims (6)

메인 프로세서; 및
상기 메인 프로세서와 SPI(Serial Peripheral Interface) 방식을 통해 연결되며, 상기 메인 프로세서로부터 전송되는 명령어에 대응되는 동작을 수행하는 일 이상의 서브 프로세서 또는 일 이상의 주변 장치를 포함하고,
상기 SPI 방식을 통한 연결은 일 이상의 버스 라인들에 의해 이루어지고, 상기 일 이상의 버스 라인들은,
데이터 전송을 위한 마스터 인 슬레이브 아웃 라인(MISO; Master In Slave Out) 및 마스터 아웃 슬레이브 인 라인(MOSI; Master Out Slave In);
상기 서브 프로세서 또는 상기 주변 장치 중 하나를 선택하여 동작 가능한 상태로 전환시키는 신호 전송을 위한 슬레이브 선택 라인(SS; Slave Select);
상기 슬레이브 선택 라인으로부터 분기되며, 상기 선택 라인을 통해 전송되는 신호를 상기 선택된 서브 프로세서 또는 주변 장치의 상태 머신(State Machine) 초기화 신호로서 전송하는 인터럽트 라인(Intr); 및
클록 전송 라인(SCK; SPI Clock)을 포함하는 데이터 통신 시스템.
Main processor; And
Is connected to the main processor through a SPI (Serial Peripheral Interface) scheme, and includes one or more subprocessors or one or more peripheral devices for performing an operation corresponding to the instructions transmitted from the main processor,
The connection through the SPI scheme is made by one or more bus lines, and the one or more bus lines
Master In Slave Out (MISO) and Master Out Slave In (MOSI) for data transmission;
Slave Select (SS) for signal transmission to select one of the sub-processor or the peripheral device to switch to an operable state;
An interrupt line branched from the slave select line and transmitting a signal transmitted through the select line as a state machine initialization signal of the selected subprocessor or a peripheral device; And
A data communication system comprising a clock transmission line (SCK; SPI Clock).
제1항에 있어서,
상기 일 이상의 버스 라인은, 상기 서브 프로세서 또는 상기 주변 장치로부터 상기 메인 프로세서로 전송될 데이터가 존재한다는 것을 알리는 신호 전송을 위한 데이터 대기 라인(Data Ready)을 더 포함하는 데이터 통신 시스템.
The method of claim 1,
The at least one bus line further includes a data standby line (Data Ready) for signal transmission indicating that there is data to be transmitted from the subprocessor or the peripheral device to the main processor.
제1항에 있어서,
상기 명령어는 "읽기", "쓰기", "실행" 명령어 중 어느 하나인 데이터 통신 시스템.
The method of claim 1,
The command is any one of a "read", "write", "execute" command.
제3항에 있어서,
상기 "읽기" 명령어는, "read(SPIdevID, addr, len, value)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevID"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "addr"의 주소에 존재하는 "len"의 길이를 갖는 "value" 값을 읽는 동작을 수행하고,
상기 "쓰기" 명령어는, "write(SPIdevId, addr, len, value)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevId"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "addr"의 주소에 "len"의 길이를 갖는 "value" 값을 쓰는 동작을 수행하고,
상기 "실행" 명령어는, "exec(SPIdevId, command, paramlen, param)"와 같은 형태로 전송되고, 상기 형태의 명령어가 전송되는 경우, "SPIdevId"의 주소에 해당하는 서브 프로세서 또는 주변 장치는 "paramlen"의 길이를 갖는 "param"라는 파라미터를 참조하여 "command"라는 서비스를 실행하는 동작을 수행하는 데이터 통신 시스템.
The method of claim 3,
The "read" command is transmitted in the form of "read (SPIdevID, addr, len, value)", and when the command of this type is transmitted, the subprocessor or peripheral device corresponding to the address of "SPIdevID" is " perform an operation of reading a "value" value having a length of "len" present at an address of addr ",
The "write" command is transmitted in the form of "write (SPIdevId, addr, len, value)", and when the command of this type is transmitted, the subprocessor or peripheral device corresponding to the address of "SPIdevId" is " write the value "value" with the length "len" into the address of addr ",
The "execute" command is transmitted in the form of "exec (SPIdevId, command, paramlen, param)", and when the command of this type is transmitted, the subprocessor or peripheral device corresponding to the address of "SPIdevId" is " A data communication system that performs an operation of executing a service called "command" with reference to a parameter called "param" having a length of paramlen ".
제1항에 있어서,
상기 명령어는, 상기 동작 수행을 위해 필요한 변수가 기록된 데이터의 길이, 상기 명령어가 기록된 오피코드(opcode), 상기 데이터를 포함하는 데이터 포맷으로 전송되는 데이터 통신 시스템.
The method of claim 1,
And the command is transmitted in a data format including a length of data in which a variable necessary for performing the operation is recorded, an opcode in which the command is recorded, and the data.
제1항에 잇어서,
상기 서브 프로세서 또는 상기 주변 장치는 상기 동작 수행의 결과 값의 길이, 상기 결과 값을 포함하는 데이터 포맷을 상기 메인 프로세서에 전송하는 데이터 통신 시스템.


In accordance with claim 1,
The subprocessor or the peripheral device transmits a data format including the length of the result value of the operation and the result value to the main processor.


KR1020100057901A 2009-11-05 2010-06-18 Data communication system KR101352140B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/826,848 US8176209B2 (en) 2009-11-05 2010-06-30 Data communication system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020090106271 2009-11-05
KR20090106271 2009-11-05

Publications (2)

Publication Number Publication Date
KR20110049645A KR20110049645A (en) 2011-05-12
KR101352140B1 true KR101352140B1 (en) 2014-01-14

Family

ID=44360741

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100057901A KR101352140B1 (en) 2009-11-05 2010-06-18 Data communication system

Country Status (1)

Country Link
KR (1) KR101352140B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984581B (en) * 2020-08-14 2022-05-10 广州邦讯信息系统有限公司 Linux-based SPI bus master-slave device communication system, method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020120795A1 (en) * 2001-02-28 2002-08-29 Alcatel Serial peripheral interface master device, a serial peripheral interface slave device and a serial peripheral interface
KR20080086405A (en) * 2007-03-22 2008-09-25 이노피데이 인코포레이티드 Peripheral interface, receiving apparatus and data communication method using the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020120795A1 (en) * 2001-02-28 2002-08-29 Alcatel Serial peripheral interface master device, a serial peripheral interface slave device and a serial peripheral interface
KR20080086405A (en) * 2007-03-22 2008-09-25 이노피데이 인코포레이티드 Peripheral interface, receiving apparatus and data communication method using the same

Also Published As

Publication number Publication date
KR20110049645A (en) 2011-05-12

Similar Documents

Publication Publication Date Title
US20170168966A1 (en) Optimal latency packetizer finite state machine for messaging and input/output transfer interfaces
US7506077B2 (en) Unified controller having host and device functionality
US10467154B2 (en) Multi-port multi-sideband-GPIO consolidation technique over a multi-drop serial bus
JP5641754B2 (en) Interface card system
KR20180050728A (en) Bridging and virtualizing input / output signals on multi-node networks
US9952643B2 (en) Device power management state transition latency advertisement for faster boot time
US20040117743A1 (en) Heterogeneous multi-processor reference design
EP1535169B1 (en) Improved inter-processor communication system for communication between processors
US8176209B2 (en) Data communication system
JPH10293744A (en) Pci bus system
US9047264B2 (en) Low pin count controller
KR101352140B1 (en) Data communication system
US8402260B2 (en) Data processing apparatus having address conversion circuit
KR20180091364A (en) System-on-chip comprising a cpu operating as a debug host and method of operation thereof
US20160314086A1 (en) Secure digital host controller virtualization
US20190286606A1 (en) Network-on-chip and computer system including the same
JP2002140284A (en) Micro-controller
CN101676894B (en) PCI virtualization device and method for non-PCI on-chip bus oriented to centralized address decoding
CN112783071A (en) SDIO controller, FPGA board card and SDIO test system
TWI706258B (en) A computing device
CN116450570B (en) 32-bit RISC-V processor based on FPGA and electronic equipment
Sun et al. Research on High-Speed Data Acquisition System Based on PCIE
KR101267611B1 (en) Method for firmware implementing in wireless high-speed modem
CN118277319A (en) Data transmission control method and device based on LPC bus and electronic equipment
CN117762493A (en) Method and device for supporting kernel shielding illegal address of DSP processor

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
FPAY Annual fee payment

Payment date: 20161228

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20171226

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20181226

Year of fee payment: 6