KR950009763B1 - A method of data transmission and synchronization between two cpu's - Google Patents

A method of data transmission and synchronization between two cpu's Download PDF

Info

Publication number
KR950009763B1
KR950009763B1 KR1019920011887A KR920011887A KR950009763B1 KR 950009763 B1 KR950009763 B1 KR 950009763B1 KR 1019920011887 A KR1019920011887 A KR 1019920011887A KR 920011887 A KR920011887 A KR 920011887A KR 950009763 B1 KR950009763 B1 KR 950009763B1
Authority
KR
South Korea
Prior art keywords
cpu
flag
access flag
buffer
data
Prior art date
Application number
KR1019920011887A
Other languages
Korean (ko)
Other versions
KR940002722A (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 KR1019920011887A priority Critical patent/KR950009763B1/en
Publication of KR940002722A publication Critical patent/KR940002722A/en
Application granted granted Critical
Publication of KR950009763B1 publication Critical patent/KR950009763B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

checking whether an access flag is '0' to use a common buffer area and if the access flag is not '0', returning to a start point; if the access flag is '0', equalizing the access flag to a CPU_ID of a transmitting side, reading the access flag to check whether a usage right of a dual port RAM is ensured and checking whether the read access flag is the same as a user's CPU_ID; returning to the start point because the common buffer area is occupied by a counterpart's CPU, if the access flag is different from the user's CPU ID; if same, checking whether an empty flag is '1', returning to the start point, if not '1', and write data in a data area by equalizing the empty flag to '0', if the empty flag is '1'; and equalizing a reader to a receiving side's CPU_ID, equalizing a full flag to '1', and equalizing the access flag to '0', to thereby complete the transmitting side's processing operation.

Description

2개의 CPU로 구성된 시스팀에서의 CPU간 데이타 전송 및 동기화 방법How to transfer and synchronize data between CPUs in a two CPU system

제1도는 본 발명이 적용되는 시스팀의 블럭 구성도;1 is a block diagram of a system to which the present invention is applied;

제2도는 듀얼 포트램 상의 버퍼 구조도.2 is a buffer structure diagram on a dual port RAM.

제3도는 제어 플래그를 이용한 데이타 전송시 상호 배제의 수행 흐름도.3 is a flow chart of mutual exclusion in data transmission using control flags.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

1,3 : CPU 2 : 듀얼 포트 램1,3 CPU 2: Dual Port RAM

본 발명은 여러개의 CPU로 구성된 시스팀에서 듀얼 포트램(DUAL PORT RAM)을 효율적으로 이용하여 전송할 데이타의 성질에 따라 데이타 송수신 버퍼의 구조를 소프트웨어적으로 변경하여 CPU간에 데이타 전송 및 동기화 실현하기 위한 방법에 관한 것이다.The present invention is a method for realizing data transfer and synchronization between CPUs by changing the structure of a data transmission / reception buffer in software according to the nature of data to be transmitted by using dual port RAM efficiently in a system composed of multiple CPUs. It is about.

일반적으로 각각 독립적인 CPU를 가진 두개의 보드간에 데이타를 주고 받기 위하여는 공유메모리를 사용하는 방법이 있으나 공유메모리로서는 단방향의 비포(FIRST- IN FIRST-OUT : 이하, FIFO라 함) 메모리 두개를 각각 송수신용으로 사용하는 방법과 듀얼 포트 램(DUAL PORT RAM)을 사이에 두고 데이타를 송수신하는 방법이 있는데 이 중 FIFO를 사용하는 방법은 송신용과 수신용의 버퍼 사이즈 및 구조가 하드웨어적으로 고정되어 있어 상황에 따른 버퍼의 효율적 이용이 어렵고 양 FIFO메모리가 전송데이타로 차있는 상태에서 상대방이 그 데이타를 읽어가지 않는 에러상황이 발생했을때 그것을 해결할 방법이 없었다. 그리고 듀얼 포트 램 공유 메모리로 사용하는 방법은 FIFO메모리가 가지는 제약사항은 없으나, 동일 번지를 양쪽 CPU에서 동시에 액세스할 수 있는 이유로 인해 프로그램간의 동기화 상호 배제(MUTUAL EXCLUSION)가 어렵게 되어 듀얼 포트 램을 FIFO 메모리처럼 동작하도록 사용하여 듀얼 포트 램의 잇점을 살리지 못하는 경우가 많았다.In general, there is a method of using shared memory to exchange data between two boards having independent CPUs, but as a shared memory, two unidirectional non-storage (FIRST-IN FIRST-OUT: FIFO) memories are used. There is a method for sending and receiving data and a method for sending and receiving data between the dual port RAM. Among the methods using FIFO, the buffer size and structure for sending and receiving are fixed in hardware. It is difficult to effectively use the buffer according to the situation, and when there is an error situation in which the other party does not read the data while both FIFO memories are filled with transmission data, there is no way to solve it. The dual port RAM shared memory does not have the limitation of FIFO memory, but due to the fact that the same address can be accessed from both CPUs at the same time, mutual exclusion between programs becomes difficult. In many cases, they used to behave like memory, failing to take advantage of the dual port RAM.

따라서, 상기와 같은 문제점을 해결하기 위해 안출된 본 발명은, 듀얼 포트 램을 효율적으로 제어하여 두 개의 보드(CPU)간에 데이타 전송 및 동기화를 실현할 수 있도록 한 방법을 제공하는데 그 목적이 있다.Accordingly, an object of the present invention is to provide a method for efficiently controlling dual port RAM to realize data transmission and synchronization between two boards (CPUs).

상기 목적을 달성하기 위하여 본 발명은, 제1, 제2CPU와, 듀얼 포트 램으로 구성되는 시스팀의 데이타 전송 및 동기화 방법에 있어서 ; 송신측의 처리 수순은, 공통 버퍼 영역을 사용하기 위해서 액세스 플래그가 0인지 확인하여 0이 아니면 리턴하고(액세스 플래그 0이 아닌 경우는 공통 버퍼 영역을 상대방 CPU가 사용하고 있음을 나타낸다.), 액세스 플래그가 0이면 액세스 플래그를 송신측 CPU_ ID로 하고 상기 듀얼 포트 램의 사용권이 확보되었는지를 확인하기 위하여 다시 액세스 플래그를 읽어 자신의 CPU_ ID와 같은 가를 조사하는 제1단계와, 상기 제1단계 수행 후, 액세스 플랙그가 자신의 CPU_ ID와 다르면 공통 버퍼 영역이 상대방 CPU에 허용된 것을 의미하므로 리턴하고 같으면 공-플래그(EMPTY -FLAG)가 1인가 즉, 빈 버퍼인지를 조사하여 1이 아니면 리턴하고 1이면 공-플래그를 0으로 하고 데이타 영역에 데이타를 쓰는 제2단계와, 제2단계 수행후, 리더(READER)를 수신측 CPU_ ID로 하고 만-플래그(FULL- FLAG)를 1로 하고 액세스 플래그를 0으로 한 후 종료하는 제3단계에 의해 수행되며, 수신측의 처리수순은, 다음 버터 포인터를 이용하여 상기 듀얼 포트 램 상의 버퍼 중 수신용 버퍼(공통 버퍼의 리더 필드에 자신의 CPU_ ID가 들어있는 버퍼)를 찾아내어 송신측의 데이타가 도착했는가 즉, 만-플래그가 1인가 조사하는 제4단계, 상기 제4단계 수행 후, 만-플래그가 1이 아니면 리턴하고 1이면 해당 버퍼의 사용권 확보를 위하여 액세스 플래그가 0인지 조사하여 0이 아니면 반복해서 액세스 플래그가 0인지를 조사하고 0이면 액세스 플래그를 수신측 CPU_ ID로 하고 액세스 플래그가 수신측 CPU_ ID인가를 조사하는 제5단계, 상기 제5단계 수행 후, 수신측 CPU_ ID가 아니면 상기 과정 이하를 수행하고 수신측 CPU_ ID이면 만- 플래그를 0으로 하고 데이타 영역에서 읽어내는 제6단계, 상기 제6단계 수행 후, 공-플래그를 1로 하여 빈 버퍼임이 확인되면 액세스 플래그를 0으로 하고 종료하는 제7단계에 의해 수행된다.In order to achieve the above object, the present invention provides a data transmission and synchronization method of a system comprising a first and a second CPU and a dual port RAM; The sender's processing procedure checks whether the access flag is 0 in order to use the common buffer area and returns a nonzero value (if the access flag is not 0, it indicates that the other CPU is using the common buffer area). If the flag is 0, the access flag is the CPU_ID of the transmitting side, and the first step of checking whether the same as the CPU_ID of the dual port RAM is read again to check whether the license of the dual port RAM is secured, and performing the first step. If the access flag is different from its CPU_ ID, it means that the common buffer area is allowed to the other CPU. If it is equal, it checks whether the empty flag (EMPTY -FLAG) is 1, that is, it is an empty buffer. If it is 1, the empty flag is set to 0 and the data is written to the data area. After performing the second step, the reader is set as the receiving CPU_ ID and the full flag is set. The FULL FLAG is set to 1, the access flag is set to 0, and the third step of terminating is performed. The receiving procedure is performed by using a next butter pointer. (4) Investigate whether (the buffer containing its CPU_ID in the common buffer's leader field) finds whether the data on the sending side has arrived, that is, whether Man-flag is 1; after performing the fourth step, Man-Flag If it is not 1, it returns and if it is 1, it checks whether the access flag is 0 to secure the buffer. If it is not 0, it repeatedly checks whether the access flag is 0. If 0, the access flag is the receiving CPU_ ID and the access flag is received. After performing the fifth step of checking whether the CPU_ID is at the side, if the CPU_ID is not at the receiving side, perform the following steps. After the sixth step and the sixth step, the empty flag is set to 1, and if it is determined that the empty buffer is empty, the access flag is set to zero and the seventh step ends.

이하, 첨부된 도면을 참조하여 본 발명을 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail the present invention.

제1도는 본 발명이 적용되는 시스팀의 개략적인 블럭 구성도로서, 도면에서 1,3은 CPU, 2는 듀얼 포트 램을 각각 나타낸다.1 is a schematic block diagram of a system to which the present invention is applied, in which 1 and 3 represent CPUs and 2 represents dual port RAMs.

도면에 도시한 바와 같이, CPU(1)와 어드레스 버스와 데이타버스로 연결되는 듀얼 포트 램(2)와, 상기 듀얼 포트 램(2)에 어드레스 버스와 데이타 버스로 연결되는 CPU(3)로 구성된다.As shown in the figure, the CPU 1 is composed of a dual port RAM 2 connected to an address bus and a data bus, and a CPU 3 connected to an address bus and a data bus to the dual port RAM 2. do.

상기의 구성으로 된 데이타 전송장치의 동작을 살펴보면, 듀얼 포트 램(2)은 각각의 CPU(1,3) 동시에 액세스할 수 있도록 어드레스 입력 및 데이타 입출력과 제어 신호를 독립적으로 인가하도록 하여 각 버스의 분리로 각 CPU(1,3)는 상대 보드와 무관하게 메모리 액세스가 가능하다. 이 경우 동일한 번지의 데이타를 두개의 CPU(1,3)가 동시에 읽으려 할 경우는 문제가 되지 않으나 두개의 CPU가 특정 어드레스에 동시에 쓰려 할 경우는 한 쪽 CPU만이 쓰기 동작이 허용되고 다른 쪽은 하드웨어적으로 강제 대기 사이클로 들어가 상대의 쓰기 동작이 끝날 때까지 대기하도록 구성되어 있다. 여기서, 듀얼 포트 램(2)의 특정 주소에 대한 쓰기 동작의 경합을 하드웨어적으로 해결할 수 있으나 듀얼 포트 램(2)상의 일정 영역에 대한 쓰기 동작의 경합은 상기 하드웨어적인 방법만으론 해결되지 않아 사용하려는 영역에 대한 사용권을 상기 하드웨어적 해결 방법으로 얻어낸 후 상기 보드에 보낼 데이타를 쓴 후에 상대 보드가 그 데이타를 가져갈 수 있도록 그 영역의 사용권을 넘긴다.Referring to the operation of the data transmission device having the above configuration, the dual port RAM (2) is to independently apply the address input, data input and output and control signals to each CPU (1, 3) to access simultaneously, Separately, each CPU (1,3) can access the memory independently of the other board. In this case, it is not a problem when two CPUs (1, 3) try to read the same address at the same time. However, when two CPUs try to write to a specific address at the same time, only one CPU is allowed to write. It is configured to enter the forced wait cycle in hardware and wait until the opponent write operation is completed. Here, the contention of the write operation for a specific address of the dual port RAM 2 may be solved in hardware, but the contention of the write operation for a certain area on the dual port RAM 2 may not be solved by the hardware method. After obtaining the license for the area by the hardware solution, write the data to be sent to the board, and then transfer the license of the area so that the other board can take the data.

제2도는 듀얼 포트 램(2)을 통한 두개의 보드가 데이타를 전송하기 위하여 듀얼 포트 램(2) 상의 버퍼의 구조를 나타낸다.2 shows the structure of a buffer on dual port RAM 2 for two boards through dual port RAM 2 to transmit data.

액세스 플래그 영역(4)는 듀얼 포트 램(2)의 영역에 대한 사용권을 제어하기 위한 플래그로서 세개의 값을 가질 수 있다. 값이 0이면 듀얼 포트 램(2) 영역을 아무도 사용하고 있지 않음을 나타내고, 1이면 듀얼 포트 램(2) 영역을 CPU(1)가 사용중임을 나타내며, 2는 듀얼 포트 램(2) 영역을 CPU(3)가 사용중임을 나타낸다.The access flag region 4 may have three values as flags for controlling the usage rights for the region of the dual port RAM 2. A value of 0 indicates that no one is using the dual port RAM (2) area, a value of 1 indicates that the CPU (1) is using the dual port RAM (2) area, and 2 indicates a CPU in the dual port RAM (2) area. (3) indicates that it is in use.

리더(READER)영역(5)은 듀얼 포트 램(2) 상의 특정 버퍼를 통해 데이타를 수신하는 CPU가 어느 것인지를 나타내며 세개의 값 각각에 따라 분류하면, 값이 0일 때는 사용하지 않는 빈 버퍼, 1이면 CPU(2)가 데이타를 보내고 CPU(1)가 데이타를 받을 목적으로 사용하는 버퍼, 2는 CPU(1)가 데이타를 보내고 CPU(2)가 데이타를 받을 목적으로 사용하는 버퍼를 나타낸다.The reader area 5 indicates which CPU receives data through a specific buffer on the dual port RAM 2 and classifies the data according to each of the three values. 1 indicates a buffer used by the CPU 2 for sending data and used by the CPU 1 for receiving data, and 2 indicating a buffer used by the CPU 1 for sending data and receiving the data from the CPU 2.

만-플래그(FULL-FLAG)(6)는 수신측에 보낼 데이타를 듀얼 포트 램(2) 상의 버퍼에 쓰기 완료를 수신측 CPU에 알리기 위한 신호용 플래그로서 데이타를 다 쓴 경우는 송신측 CPU가 만-플래그를 0에서 1로 바꾸고, 데이타를 다 읽고 나면 수신측 CPU가 만-플래그를 1에서 0으로 바꾼다.The FULL-FLAG 6 is a signal flag for informing the receiving CPU that the data to be sent to the receiving end is written to the buffer on the dual port RAM 2, and the sending CPU only uses the data when the data is exhausted. -Change the flag from 0 to 1, and after the data has been read, the receiving CPU changes the man-flag from 1 to 0.

공-플래그(EMPTY-FLAG)(7)는 송신측의 데이타를 수신측이 다 읽어낸 후 그 버퍼 송신측이 다시 사용할 수 있도록 수신측이 송신측에 보내는 신호용 플래그로서 데이타를 다 읽고 나면 수신측 CPU가 공-플래그를 0에서 1로 바꾸고, 송신측 CPU가 데이타를 다 쓰고 나면 공-플래그를 1에서 0으로 바꾼다.The EMPTY-FLAG (7) is a signal flag sent by the receiver to the transmitter so that the receiver can read the data on the receiver and use it again. The CPU changes the blank flag from 0 to 1, and once the sending CPU runs out of data, it changes the blank flag from 1 to 0.

다음 버퍼 포인터(NEXT-BUFFER-POINTER)(8)는 고정된 크기를 가지는 듀얼 포트 램(2)영역을 여러개의 버퍼로 나누어 사용하기 위한 것으로 다음 버퍼의 시작 주소를 나타낸다.The next buffer pointer (NEXT-BUFFER-POINTER) 8 is used to divide the dual port RAM area having a fixed size into several buffers and indicates the start address of the next buffer.

버퍼 크기(BUFFER-SIZE)(9)듀얼 포트 램 (2)상의 버퍼를 통해 송신측이 수신측에 보내려는 데이타의 크기(즉, 바이트 수)를 나타낸다. 데이타 영역(DATA- AREA)(10)은 송신측이 수신측에 보내는 데이타를 취급하는 것으로 버퍼를 사용하기 전에 사용권을 확보하기 위한 목적으로 사용하는 플래그이다. 만 플래그(FULL FLAG)(5)는 한쪽 CPU가 듀얼 포트 램(2)상의 공통 버퍼 영역에 상대방에 보낼 데이타 쓰기 완료를 의미하고, 공 플래그(EMPTY FLAG)(6)는 상대방이 보낸 듀얼 포트 램(2)상의 데이타 읽기의 완료를 나타낸다.BUFFER-SIZE (9) Indicates the size of data (i.e., number of bytes) the sender wants to send to the receiver via the buffer on the dual port RAM (2). The data area (DATA-AREA) 10 is a flag used by the sender to handle data sent to the receiver and to secure a license before using the buffer. FULL FLAG (5) means that one CPU has finished writing data to the other side in the common buffer area on the dual port RAM (2). Empty flag (6) FLAP (6) indicates the dual port RAM sent by the other side. Indicates completion of data read on (2).

제3도는 상호 배제를 실현하기 위한 수행 흐름도로서 (A)는 송신측 흐름도, (B)는 수신측 흐름도이다.3 is an execution flowchart for realizing mutual exclusion, where (A) is a sender flowchart and (B) is a receiver flowchart.

먼저, 송신측 흐름도의 처리 수순을 보면, 공통 버퍼 영역을 사용하기 위해서 액세스 플래그가 0인지 확인하여 0이 아니면 리턴하고 (액세스 플래그 0인 경우는 공통 버퍼 영역을 아무도 사용치 않음을 나타낸다)(11), 액세스 플래그 송신측 CPU_ ID(CPU(1), 또는 CPU(2) : 어느 쪽이든 관계없음)로 하고(12) 듀얼 포트 램(2)의 사용권이 확보되었는지를 확인하기 위하여 액세스 플래그가 송신측 CPU_ ID와 같은가를 조사한다(13). 이때, 두개의 CPU가 동시에 사용권 확보를 시도하여도 어느 한 쪽의 CPU만이 선택된다. 상기 조사(13) 결과 다르면 리턴하고 같으면 공-플래그가 1인가 즉, 빈 버퍼인지를 조사한다(14) 상기 조사(14) 결과 1인 아니면 리턴하고 1이면 공-플래그를 0으로 하고 (15) 데이타 영역에 데이타를 쓴다(16). 다음에 리더(READER)를 수신측 CPU_ ID로 하고 (17) 만 -플래그를 1로 하고 (18)액세스 플래그를 0으로 한 후 종료한다.First, the processing procedure of the transmission side flow checks whether or not the access flag is 0 to use the common buffer area, and returns it if it is not 0 (if the access flag is 0, it indicates that no one uses the common buffer area). ), The access flag is sent from the CPU_ID (CPU (1) or CPU (2): either) (12) and the access flag is sent from the access flag to confirm that the dual port RAM 2 is licensed. Check whether it is equal to CPU_ID (13). At this time, even if two CPUs attempt to secure a usage right at the same time, only one CPU is selected. If the result of the survey (13) is different, return and if it is equal, check whether the co-flag is 1, that is, an empty buffer (14). Write data to the data area (16). Next, the reader (READER) is the receiving side CPU_ID, only (17) is set to -1, and the access flag is set to 0 (18).

그리고, 수신측의 처리수순은 다음 버퍼 포인터를 이용하여 듀얼 포트 램(2) 상의 버퍼 중 수신용 버퍼를 찾아내어 수신측 CPU_ ID인가를 조사하여(20) 수신측 CPU_ ID가 아니면 리턴하고 수신측 CPU_ ID면 송신측의 데이타가 도착했는가 즉, 만- 플래그가 1인가 조사한다(21). 상기 조사(21) 결과 만-플래그가 1이 아니면 리턴하고 1이면 해당 버퍼의 사용권 확보를 위하여 액세스 플래그가 0인지를 조사한다(22). 상기 조사(22) 결과 0이 아니면 반복해서 액세스 플래그가 0인지를 조사하고 0이면 액세스 플래그를 수신측 CPU ID(CPU(1),또는 CPU(2) : 어느 쪽이든 관계없음)로 하고(23) 액세스 플래그가 수신측 CPU_ ID인가를 조사한다(24). 상기 조가(24) 결과 수신측 CPU_ ID가 아니면 상기 과정(22)이하를 수생하고 수신측 CPU ID이면 만-플래그를 0으로 하고(25) 데이타 영역에서 읽어낸다(26). 그리고, 공-플래그를 1로하여 빈 버퍼임이 확인되면 액세스 플래그를 0으로하고 종료한다.Then, the processing procedure of the receiving side finds the receiving buffer among the buffers on the dual port RAM 2 by using the next buffer pointer and checks whether the receiving side CPU_ID is received (20). If it is CPU_ID, it is checked whether the data of the transmitting party has arrived, that is, if the Man-flag is 1 (21). If only the flag 21 is returned as a result of the investigation 21, it is returned if the access flag is 0 to secure the license of the buffer (22). If the result of the check 22 does not equal 0, it is repeatedly checked whether the access flag is 0. If 0, the access flag is set to the receiving side CPU ID (CPU (1) or CPU (2) either) (23). It is checked whether the access flag is the receiving side CPU_ID (24). If the result of the value 24 is not the receiving CPU_ID, the process 22 or less can be performed, and if the receiving CPU ID, the Man-flag is set to 0 (25) and read from the data area (26). When the empty flag is set to 1 and the empty buffer is confirmed to be empty, the access flag is set to 0 and the process ends.

따라서, 본 발명은 G4 팩시밀리의 주제어부와 통신 제어부 사이의 명령/응답 처리 및 송수신 문서 데이타의 통신 및 에러 상황시의 두 보드간의 통신에 이용되고, 여러개의 CPU로 구성된 시스팀에서 두개의 CPU 또는, 보드간의 데이타 전송에 적용될 수 있는 효과가 있다.Therefore, the present invention is used for command / response processing between the main control unit of the G4 facsimile and the communication control unit, communication of transmission / reception document data and communication between two boards in an error situation, and two CPUs in a system composed of multiple CPUs, There is an effect that can be applied to data transfer between boards.

Claims (1)

제1, 제2CPU(1,3)와, 듀얼 포트 램(2)으로 구성되는 시스팀의 데이타 전송 및 동기화 방법에 있어서, 송신측의 처리 수순은, 공통 버퍼 영역을 사용하기 위해서 액세스 플래그가 0인지 확인하여 0이 아니면 리턴하고 (액세스 플래그가 0이 아닌 경우는 공통 버퍼 영역을 상대방 CPU가 사용하고 있음을 나타낸다.), 액세스 플래그가 0이면 액세스 플래그를 송신측 CPU_ ID로 하고 상기 듀얼 포트 램의 사용권이 확보되었는지를 확인하기 위하여 다시 액세스 플래그를 읽어 자신의 CPU_ ID와 같은가를 조사하는 제1단계(11내지 13)와, 상기 제1단계(11내지 13) 수행 후, 액세스 플래그가 자신의 CPU_ ID와 다르면 공통 버퍼 영역이 상대방 CPU에 허용된 것을 의미하므로 리턴하고 같으면 공-플래그(EMPTY- FLAG)가 1인가 즉, 빈 버퍼인지를 조사하여 1이 아니면 리턴하고 1이면 공-플래그를 0으로 하고 데이타 영역에 데이타를 쓰는 제2단계(14내지 16)와, 상기 제2단계(14내지 16) 수행후, 리더(READER)를 수신측 CPU_ ID로 하고 만 -플래그(FULL-FLAG)를 1로 하고 액세스 플래그를 0으로 한 후 종료하는제3단계(17내지 19)에 의해 수행되며, 수신측의 처리 수순은, 다음 버퍼 포인터를 이용하여 상기 듀얼 포트 램 상의 버퍼 중 수신용 버퍼(공통 버퍼의 리더 필드에 자신의 CPU_ ID가 들어 있는 버퍼)를 찾아내어 송신측의 데이타가 도착했는가 즉, 만-플래그가 1인가 조사하는 제4단게(20,21), 상기 제4단계(20,21) 수행 후, 만-플래그가 1이 아니면 리턴하고 1이면 해당 버퍼의 사용권 확보를 위하여 액세스 플래그가 0인지를 조사하여 0이 아니면 반복해서 액세스 플래그가 0인가를 조사하고 0이면 액세스 플래그를 수신측 CPU_ ID로 하고 액세스 플래그가 수신측 CPU_ ID인가를 조사하는 제5단계(22 내지 24), 상기 제5단계(22 내지 24) 수행 후, 수신측 CPU_ ID가 아니면 상기 과정 이하를 수행하고 수신측 CPU_ ID이면 만-플래그를 0으로 하고 데이타 영역에서 읽어내는 제6단계(25,26), 및 상기 제6단계(25,26) 수행 후, 공-플래그를 1로 하여 빈 버퍼임이 확인되면 액세스 플래그를 0으로 하고 종료하는 제7단계(27,28)에 의해 수행되는 것을 특징으로 하는 CPU간의 데이타 전송 및 등기화 방법.In the data transmission and synchronization method of a system composed of the first and second CPUs (1, 3) and the dual port RAM (2), the processing procedure on the transmitting side is that the access flag is 0 in order to use the common buffer area. If it is not 0, it returns. (If the access flag is not 0, it indicates that the other CPU is using the common buffer area.) If the access flag is 0, the access flag is set as the sender CPU_ ID. In order to confirm whether the license is secured, the access flag reads the access flag again to check whether it is equal to its CPU_ID, and after performing the first steps (11 to 13), the access flag is assigned to its CPU_. If it is different from ID, it means that common buffer area is allowed to the other CPU. If it is equal, it checks whether the empty flag (EMPTY-FLAG) is 1. After the second steps (14 to 16) of writing lag to 0 and writing data to the data area, and performing the second steps (14 to 16), the reader (READER) is the receiving side CPU_ ID. FLAG) is set to 1, the access flag is set to 0, and then terminated by the third step (17 to 19). The processing procedure of the receiving side is for receiving of the buffer on the dual port RAM using the next buffer pointer. Step 4 (20, 21), which finds a buffer (a buffer containing its CPU_ID in the leader field of the common buffer) and checks whether the data on the sending side has arrived, that is, whether the man flag is 1; After (20,21), if Man-Flag is not 1, it returns and if it is 1 it checks to see if the access flag is 0 to license the buffer. If it is not 0, it repeatedly checks if the access flag is 0 and if it is 0 Set the flag as the receiving CPU_ ID and the access flag is received. After the fifth step (22 to 24) of checking whether the CPU_ID is applied or the fifth CPU (22 to 24) is performed, if the receiving CPU_ ID is not the same, the process is performed below. After the sixth step (25, 26) of reading from the data area and the sixth step (25, 26), the empty flag is set to 1 and the access flag is set to 0 when the empty buffer is confirmed. Method of data transfer and equalization between CPUs, characterized in that performed in seven steps (27, 28).
KR1019920011887A 1992-07-03 1992-07-03 A method of data transmission and synchronization between two cpu's KR950009763B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019920011887A KR950009763B1 (en) 1992-07-03 1992-07-03 A method of data transmission and synchronization between two cpu's

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019920011887A KR950009763B1 (en) 1992-07-03 1992-07-03 A method of data transmission and synchronization between two cpu's

Publications (2)

Publication Number Publication Date
KR940002722A KR940002722A (en) 1994-02-19
KR950009763B1 true KR950009763B1 (en) 1995-08-28

Family

ID=19335860

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019920011887A KR950009763B1 (en) 1992-07-03 1992-07-03 A method of data transmission and synchronization between two cpu's

Country Status (1)

Country Link
KR (1) KR950009763B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100686304B1 (en) * 2005-09-26 2007-02-22 엠텍비젼 주식회사 Method for controlling access to public bank of dual port memory
KR100728870B1 (en) * 2005-08-08 2007-06-15 경북대학교 산학협력단 Dual port ram and method of losslessly transmitting data using the dual port ram

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970076279A (en) * 1996-05-10 1997-12-12 김주용 A processing method and apparatus for utilizing a single serial communication line in a versatile manner

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100728870B1 (en) * 2005-08-08 2007-06-15 경북대학교 산학협력단 Dual port ram and method of losslessly transmitting data using the dual port ram
KR100686304B1 (en) * 2005-09-26 2007-02-22 엠텍비젼 주식회사 Method for controlling access to public bank of dual port memory

Also Published As

Publication number Publication date
KR940002722A (en) 1994-02-19

Similar Documents

Publication Publication Date Title
US6925512B2 (en) Communication between two embedded processors
CA1227879A (en) Buffer system for input/output portion of digital data processing system
US4419728A (en) Channel interface circuit providing virtual channel number translation and direct memory access
JPH08116348A (en) High-speed communication equipment
US5067075A (en) Method of direct memory access control
EP0097028A2 (en) Multiple-microcomputer communications system
US5341475A (en) Method for exchanging messages between a shared memory and communication adapters using an efficient logical protocol
KR950009763B1 (en) A method of data transmission and synchronization between two cpu's
JPS6359042A (en) Communication interface equipment
US5379395A (en) Semiconductor integrated circuit for central processor interfacing which enables random and serial access to single port memories
JPH0238968B2 (en)
EP0169909A1 (en) Auxiliary memory device
JP2762506B2 (en) Line controller
JP2505298B2 (en) Variable bus width designation method and variable bus width information reception method in split bus
JPH0115100B2 (en)
KR100308146B1 (en) Method for processing message in speech recognition system
KR0170595B1 (en) Software emulation method of xcent-net interface
JPH03942B2 (en)
US7177997B2 (en) Communication bus system
KR950002306B1 (en) Data transmission device and method for fax
KR0138063B1 (en) Inter processor communication apparatus of broad circuit distributing system
JPS6119056B2 (en)
JPH0137018B2 (en)
JPH04328667A (en) System and device for transmitting/receiving 2-port ram
JPS629458A (en) Multi-cpu system bus

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20020716

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee