KR970011890B1 - Memory shared method of main processor and co-processor - Google Patents

Memory shared method of main processor and co-processor Download PDF

Info

Publication number
KR970011890B1
KR970011890B1 KR1019940003968A KR19940003968A KR970011890B1 KR 970011890 B1 KR970011890 B1 KR 970011890B1 KR 1019940003968 A KR1019940003968 A KR 1019940003968A KR 19940003968 A KR19940003968 A KR 19940003968A KR 970011890 B1 KR970011890 B1 KR 970011890B1
Authority
KR
South Korea
Prior art keywords
bus
subprocessor
main processor
signal
memory
Prior art date
Application number
KR1019940003968A
Other languages
Korean (ko)
Other versions
KR950025556A (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 KR1019940003968A priority Critical patent/KR970011890B1/en
Publication of KR950025556A publication Critical patent/KR950025556A/en
Application granted granted Critical
Publication of KR970011890B1 publication Critical patent/KR970011890B1/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
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox

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)
  • Advance Control (AREA)

Abstract

the first step of judging whether a sub-processor demands an external bus master; the second step of transferring bus demand data of the sub-processor to a main processor if the sub-processor demands the external bus master; the third step of transferring that the main processor acquires the bus after performing the second step; the forth step that the sub-processor transfers the start of a bus cycle to the main processor; the fifth step that the sub-processor accesses data of a memory by sharing the memory if the main processor recognizes the start of the bus cycle; and the sixth step of transferring a completion recognition data to the main processor when the data access by the sub-processor is completed.

Description

메인프로세서와 서브프로세서의 메모리 공유방법How to Share Memory Between Main Processor and Subprocessor

제1도는 본 발명에 의한 메모리 공유방법을 보이는 흐름도.1 is a flowchart showing a memory sharing method according to the present invention.

제2도는 제1도에 도시된 메모리 공유방법이 적용되는 메모리 공유장치의 구성을 보이는 블럭도.FIG. 2 is a block diagram showing a configuration of a memory sharing apparatus to which the memory sharing method shown in FIG. 1 is applied.

제3도는 제2도에 관련되는 신호의 파형도.3 is a waveform diagram of a signal related to FIG. 2;

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

11 : 메인프로세서12 : 메모리제어기11: main processor 12: memory controller

13 : 버스제어기14 : 서브프로세서13 bus controller 14 subprocessor

15 : 메모리15: memory

본 발명은 메모리제어기를 메인(main processor)와 랜(LAN)을 제어하는 서브프로세서(sub-processor)가 메모리를 서로 공유하기 위한 방법에 관한 것이다.The present invention relates to a method for sharing a memory between a memory controller by a main processor and a sub-processor controlling a LAN.

메모리제어기를 내장하는 메인프로세서는 버스 인터페이스(Bus Interface)를 위한 버스 알비터(Bus Arbiter)와 메모리를 억세스하기 위한 메모리제어부 등을 포함하여 구성된다. 컴퓨터시스템을 구성함에 있어서 시스템의 자원을 공유시킴으로써 보다 효율적으로 시스템을 운용하는 것은 매우 중요한 것이다.The main processor incorporating a memory controller includes a bus arbiter for a bus interface and a memory controller for accessing a memory. In constructing a computer system, it is very important to operate the system more efficiently by sharing system resources.

따라서, 본 발명의 목적은 메모리제어기를 내장하는 메인프로세서와 랜을 제어하는 서브프로세서가 메모리를 서로 공유하기 위한 메모리공유방법을 제공하는 데 있다.Accordingly, an object of the present invention is to provide a memory sharing method for sharing a memory between a main processor having a memory controller and a subprocessor controlling a LAN.

상기의 목적을 달성하기 위한 본 발명에 의한 메인프로세서와 서브프로세서의 메모리 공유방법은, 서브프로세서가 외부버스마스터를 요구하는지의 여부를 판단하는 제1단계; 제1단계에서 서브프로세서가 외부서스마스터를 요구하면, 서브프로세서의 버스요구 데이타를 메인프로세서에게 전달하는 제2단계; 제2단계를 수행한 후에 메인프로세서가 버스를 획득하였으면 이를 서브프로세서에게 전달하는 제3단계; 제3단계를 수행한 후에 서브프로세서가 버스사이클의 시작을 메인프로세서에게 전달하는 제4단계; 메인프로세서가 버스사이클의 시작을 인지하였으면, 서브프로세서가 메모리를 공유하여, 메모리의 데이타를 억세스하는 제5단계; 제5단계에서 서브프로세서에 의한 데이타 억세스 완료되면, 완료인지 데이타를 메인프로세서에서 전달하는 제6단계를 포함함을 특징으로 한다.A memory sharing method of a main processor and a subprocessor according to the present invention for achieving the above object comprises: a first step of determining whether a subprocessor requires an external bus master; In a first step, when the subprocessor requests an external submaster, transferring a bus request data of the subprocessor to the main processor; A third step of, if the main processor acquires the bus after performing the second step, transferring it to the subprocessor; A fourth step of transmitting, by the subprocessor, the start of the bus cycle to the main processor after performing the third step; If the main processor recognizes the start of the bus cycle, the subprocessor shares the memory to access data in the memory; When the data access by the subprocessor is completed in the fifth step, the sixth step of transferring the data from the main processor to acknowledge the completion.

이하, 첨부한 도면을 참조하여 본 발명의 실시예를 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described an embodiment of the present invention;

제1도는 본 발명에 의한 메인프로세서와 서브프로세서의 메모리 공유방법을 설명하기 위한 흐름도이다.1 is a flowchart illustrating a memory sharing method of a main processor and a subprocessor according to the present invention.

서브프로세서가 메모리의 데이타를 억세스하기 위한 외부버스마스터를 요구하는지의 여부를 판단(31)한다. 만일, 서브프로세서가 외부버스마스터를 요구하면, 서브프로세서의 버스요구데이타를 메인프로세서에게 전달(32)하고, 그렇지 않으면 외부버스마스터의 요구 여부를 계속 감시한다.It is determined 31 whether the subprocessor requires an external bus master for accessing data in the memory. If the subprocessor requests the external bus master, it transmits the bus request data of the subprocessor to the main processor 32, otherwise it continuously monitors the request of the external bus master.

메인프로세서는 서브프로세서의 버스요구 데이타에 따라 버스를 획득하고, 버스를 획득하였으면 이를 서브프로세서에게 전달(33)한다. 서브프로세서는 메인프로세서의 버스 획득에 따라 버스사이클의 시작을 메인프로세서에게 전달(34)한다.The main processor acquires a bus according to the bus request data of the subprocessor, and transfers the bus 33 to the subprocessor if the bus is obtained. The subprocessor communicates 34 the start of the bus cycle to the main processor in accordance with the bus acquisition of the main processor.

메인프로세서가 서브프로세서의 버스사이클의 시작을 인지하면, 서브프로세서가 메모리를 공유하여, 메모리의 데이타를 억세스(35)한다. 서브프로세서에 의한 데이타 억세스가 완료(36)되면, 완료인지 데이타를 메인프로세서에게 전달(37)한다.When the main processor recognizes the start of the bus cycle of the subprocessor, the subprocessor shares the memory and accesses 35 the data in the memory. When the data access by the subprocessor is completed 36, the data is passed 37 to the main processor to confirm completion.

제2도는 본 발명의 방법에 의해 제어되는 버스제어기를 포함하는 메모리공유장치의 구성블럭도로서, 본 실시예에서는 LR33020 내장 메인프로세서(11)와 82596DX 서브프로세서(14)가 프로세서 제어버스(101)와 LAN제어버스(102)를 통하여 버스제어기(13)에 의하여 메모리(15)를 공유하는 것을 설명한다.2 is a block diagram of a memory sharing device including a bus controller controlled by the method of the present invention. The sharing of the memory 15 by the bus controller 13 via the LAN control bus 102 will be described.

메인프로세서는 내부 DMA 채널과 임의의 외부 DMA 채널에 대한 버스요구(Bus Request), 버스 그랜트(Bus Grant)기능을 수행할 수 있다. 외부 DMA 채널은 BREQ신호를 통하여 버스를 요구할 수 있으며, 외부버스가 자유로울 때 BGNT 신호를 어설트(Assert)하여 외부장치에 버스를 그랜트한다. 외부 장치는 BREQ신호를 어설트하는 동안 버스를 지배할 수 있다.The main processor may perform a bus request and a bus grant function for the internal DMA channel and any external DMA channel. External DMA Channel is BREQ The bus can be requested through the signal, and when the external bus is free, the BGNT signal is asserted to grant the bus to the external device. External device is BREQ You can dominate the bus while asserting the signal.

서브프로세서(14)가 버스를 사용하려면 먼저 HOLD신호를 발생하여 버스의 획득을 메인프로세서(11)에게 요구한다. HOLD신호는 버스제어기(13)를 통하여 BREQ신호로 바꾸어 메인프로세서(11)에 전달된다. 메인프로세서(11)는 BREQ신호를 받으면, 외부장치가 버스를 요구하고 있다고 인지 하고 BGNT신호를 발생한다. BGNT신호는 서브프로세서(14)와 버스제어기(!3)로 전달되어 버스를 획득하였음을 알려준다. 이 때부터 서브프로세서(14)는 메모리(15)를 억세스하기 위한 버스제어신호를 발생할 수 있으며, BGNT신호를 따라 버스의 획득을 인지하여 ADS신호를 발생한다.Before the subprocessor 14 can use the bus, it first issues a HOLD signal to request the acquisition of the bus from the main processor 11. The HOLD signal is transmitted to the BREQ via the bus controller 13. The signal is transmitted to the main processor 11. The main processor (11) is BREQ Upon receiving the signal, it recognizes that the external device is requesting a bus and generates a BGNT signal. The BGNT signal is passed to the subprocessor 14 and the bus controller (! 3) to indicate that the bus has been acquired. From this time, the subprocessor 14 may generate a bus control signal for accessing the memory 15, and recognizes the acquisition of the bus according to the BGNT signal to ADS. Generate a signal.

버스제어기(13)는 ADS신호를 따라 ADS신호를 발생하여 메인프로세서(11)에 입력되며, 서브프로세서(14)의 ADS신호는 1 클럭사이클(Clock Cycle) 동안만 발생되므로, 데이타를 억세스하기 위한 충분한 시간동안 AS신호를 발생하여 메인프로세서(11)에 입력한다.Bus controller 13 is ADS ADS along the signal A signal is generated and input to the main processor 11, and the ADS of the subprocessor 14 Since the signal is generated only for one clock cycle, the AS can be used for enough time to access the data. A signal is generated and input to the main processor 11.

메인프로세서(11)에 내장된 메모리제어부(12)는 메모리제어신호(104)인 DRAS, DCAS를 발생하고, 서브프로세서(14)는 어드레스/데이타버스(103)를 통하여 메모리(15)로 부터 데이타를 억세스할 수 있다.The memory controller 12 embedded in the main processor 11 generates DRAS and DCAS, which are memory control signals 104, and the subprocessor 14 receives data from the memory 15 through the address / data bus 103. Can be accessed.

서브프로세서(14)가 메모리(15)로 부터 데이타를 억세스하여 모든 작업을 완료하면, 버스제어기(13)는 READY신호를 발생하여 서브프로세서(14)로 입력한다. 서브프로세서(14)는 모든 동작이 끝나면 HOLD신호를 디어설트(Deassert)하고, 따라서 BREQ도 디어설트된다. 이 때, 메인프로세서(11)는 BGNT를 디어설트하고, 모든 제어를 메인프로세서 자신이 실행한다.When the subprocessor 14 accesses data from the memory 15 to complete all tasks, the bus controller 13 reads READY. A signal is generated and input to the subprocessor 14. The subprocessor 14 deasserts the HOLD signal at the end of all operations and thus BREQ. Also deasserted. At this time, the main processor 11 deasserts the BGNT, and the main processor itself executes all control.

표1은 메모리 공유장치를 제어하기 위한 버스제어기의 논리함수식을 도시한다.Table 1 shows the logic function of the bus controller for controlling the memory sharing device.

READY신호는 서브프로세서에 입력되는 데이타 READY신호로서, RESET가 하이(HIGH), ADS가 하이, STATE가 S4이면 로우(LOW)로 액티브(Active)되어, 서브프로세서에게 현재의 데이타억세스 작업이 완료하였음을 알린다.READY The signal is a data read signal input to the subprocessor and is reset. High, ADS Is high, and if STATE is S4, it is activated low to inform the subprocessor that the current data access operation is completed.

[표1. 버스제어기의 논리함수식]Table 1. Logic Function of Bus Controller]

AS신호는 ADS신호에 따라 서브프로세서가 버스마스터가 되었을 때 발생하여 메모리를 억세스할 수 있도록 한다. 이 때, AS신호는 메인프로세서에서 요구되는 만큼의 사이클 동안 발생되지 않기 때문에, 논리함수식의 조건에 따라 AS신호를 로우로 유지하도록 하여, 메모리로 부터 데이타를 억세스할 수 있게 한다.AS Signal is ADS Occurs when a subprocessor becomes a busmaster, depending on the signal, to allow access to memory. At this time, AS Since the signal is not generated for as many cycles as required by the main processor, the AS Keep the signal low, making the data accessible from memory.

BUSEN신호는 서브프로세서가 버스마스터가 되는 조건일 때, 메모리의 데이타를 억세스하기 위하여 메인프로세서로 입력되는 RT(Read Transaction), RD(Read Strobe), As(Address Strobe) 등과 같은 제어신호를 발생할 수 있도록 제어한다.BUSEN The signal is input to the main processor to access data in memory when the subprocessor is the bus master. (Read Transaction), RD (Read Strobe), As Control to generate a control signal such as (Address Strobe).

LANWR신호는 서브프로세서로 부터 버스마스터가 되었을 때의 리드/라이트 스트로브(Read/Write Strobe)신호인 LAN_RD신호에 따라, 메인프로세서의 DWE(Byte Write Enable Strobes)신호에 연결되는 서브프로세서의 BE(Byte Enable)신호를 인에이블(Enable)시킨다. 서브프로세서가 버스마스터가 되었을 때, 메인프로세서의 메모리 라이트사이클을 발생시키기 위하여 서브프로세서는 BE신호로 구동한다.LANWR The signal is LAN_RD, the read / write strobe signal when the bus is mastered from the subprocessor. According to the signal, enable the BE (Byte Enable) signal of the subprocessor connected to the DWE (Byte Write Enable Strobes) signal of the main processor. When the subprocessor becomes the bus master, the subprocessor runs on the BE signal to generate the memory write cycle of the main processor.

상태도는 주어진 조건에 따라 S1에서 S4로 상태가 흘러간다. IDLE상태는 BGNT신호가 하이, AS신호가 로우, REFRESH신호가 하이, DRASO신호가 하이인 경우로, 다음 상태로 넘어가지 않고 멈춘다, 만일 이 조건을 만족하지 아니하면 S1으로 상태가 돌아간다.The state diagram flows from S1 to S4 according to the given conditions. In IDLE state, BGNT signal is high and AS Signal is low, REFRESH Signal is high, DRASO If the signal is high, it stops without going to the next state. If this condition is not satisfied, the state returns to S1.

상태 S1에서는 DRASO신호가 로우, REFRESH신호가 하이이면 S2상태로 계속 진행된다. DRASO신호가 하이, REFRESH신호가 로우이면 메모리 리프레쉬가 메모리 억세스보다 우선순위가 높으므로 메모리 리프레쉬가 끝날 때까지 상태 S1을 계속 유지한다. 그리고, BGNT신호가 로우로 되면 메인프로세서가 버스를 그랜트하지 않겠다는 것을 알리므로 IDLE상태로 돌아간다.DRASO in state S1 Signal is low, REFRESH If the signal is high, it continues to S2 state. DRASO Signal is high, REFRESH If the signal is low, memory refresh takes precedence over memory access, so state S1 is maintained until memory refresh is complete. If the BGNT signal goes low, the main processor informs it that it will not grant the bus and returns to the IDLE state.

상태 S3에서 ADS신호가 로우로 되면 다시 버스를 요구하게 되며, 상태 S1으로 되돌아간다. 그 외에는 상태 S4를 계속 진행한다.ADS in state S3 If the signal goes low, it will request the bus again and return to state S1. Otherwise, the state S4 is continued.

제3도는 제3도에 도시한 메모리 공유장치에 관련되는 파형도로서, 각각에 대한 신호명은 다음과 같다. 제3A도는 MCLK신호, 제3B도는 어드레스버스신호, 제3C도는 HOLD신호, 제3D도는 BREQ신호, 제3E도는 BGNT신호, 제3F도는 ADS신호, 제3G도는 AS신호, 제3H도는 RD신호, 제31도는 RT신호, 제3J도는 DRASO신호, 제3K도는 DCASO신호, 제3L도은 READY신호, 그리고 3M도는 데이타버스신호이다.FIG. 3 is a waveform diagram relating to the memory sharing apparatus shown in FIG. 3, and signal names for each are as follows. FIG. 3A is an MCLK signal, FIG. 3B is an address bus signal, FIG. 3C is a HOLD signal, and FIG. 3D is a BREQ. Signal, FIG. 3E is BGNT signal, FIG. 3F is ADS Signal, 3G or AS Signal, 3H or RD Signal, Figure 31 is RT Signal, FIG. 3J is a DRASO signal, FIG. 3K is a DCASO signal, and FIG. 3L is a READY Signal, and 3M is a data bus signal.

상술한 바와 같이 본 발명에 의하면, 메인프로세서와 서브프로세서가 메모리를 서로 공유하면서 동작할 수 있다.As described above, according to the present invention, the main processor and the subprocessor can operate while sharing the memory with each other.

Claims (1)

메모리제어기를 내장하는 메인프로세서와 랜을 제어하는 서브프로세서가 메모리를 서로 공유하기 위한 방법에 있어서, 상기 서브프로세서가 외부버스마스터를 요구하는지의 여부를 판단하는 제1단계; 상기 제1단계에서 상기 서브프로세서가 외부버스마스터를 요구하면, 상기 서브프로세서의 버스요구 데이타를 상기 메인프로세서에게 전달하는 제2단계; 상기 제2단계를 수행한 후에 상기 메인프로세서가 버스를 획득하였으면 이를 상기 서브프로세서에게 전달하는 제3단계; 상기 제3단계를 수행한 후에 상기 서브프로세서가 버스사이클의 시작을 상기 메인프로세서에게 전달하는 제4단계; 상기 메인프로세서가 버스사이클의 시작을 인지하였으면, 상기 서브프로세서가 메모리를 공유하여, 메모리의 데이타를 엑서스하는 제5단계; 및 상기 제5단계에서 상기 서브프로세서에 의한 데이타 억세스 완료되면, 완료인지 데이타를 상기 메인프로세서에서 전달하는 제6단계를 포함함을 특징으로 하는 메인프로세서와 서브프로세서의 메모리공유방법.A method for sharing a memory between a main processor having a memory controller and a subprocessor controlling a LAN, the method comprising: a first step of determining whether the subprocessor requires an external bus master; A second step of transferring bus request data of the subprocessor to the main processor when the subprocessor requests an external bus master in the first step; A third step of, if the main processor acquires a bus after performing the second step, transferring the bus to the subprocessor; A fourth step of transmitting, by the subprocessor, the start of a bus cycle to the main processor after performing the third step; If the main processor recognizes the start of a bus cycle, the subprocessor shares a memory to access data in the memory; And a sixth step of transferring data from the main processor to completion of data access by the subprocessor in the fifth step.
KR1019940003968A 1994-02-28 1994-02-28 Memory shared method of main processor and co-processor KR970011890B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019940003968A KR970011890B1 (en) 1994-02-28 1994-02-28 Memory shared method of main processor and co-processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019940003968A KR970011890B1 (en) 1994-02-28 1994-02-28 Memory shared method of main processor and co-processor

Publications (2)

Publication Number Publication Date
KR950025556A KR950025556A (en) 1995-09-18
KR970011890B1 true KR970011890B1 (en) 1997-07-18

Family

ID=19378193

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019940003968A KR970011890B1 (en) 1994-02-28 1994-02-28 Memory shared method of main processor and co-processor

Country Status (1)

Country Link
KR (1) KR970011890B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100816038B1 (en) * 2006-11-21 2008-03-21 엠텍비젼 주식회사 Method for accessing shared memory in multi-processor system
KR102335798B1 (en) * 2015-02-11 2021-12-07 삼성전자주식회사 Storage apparatus and method for processing a plurality of client data

Also Published As

Publication number Publication date
KR950025556A (en) 1995-09-18

Similar Documents

Publication Publication Date Title
US4737932A (en) Processor
US4602327A (en) Bus master capable of relinquishing bus on request and retrying bus cycle
US5535341A (en) Apparatus and method for determining the status of data buffers in a bridge between two buses during a flush operation
US5574868A (en) Bus grant prediction technique for a split transaction bus in a multiprocessor computer system
US5892978A (en) Combined consective byte update buffer
US6272580B1 (en) Apparatus and method for dynamically elevating a lower level bus master to an upper level bus master within a multi-level arbitration system
GB2286910A (en) Apparatus and method for prefetching data to load buffers in a bridge between two buses in a computer
US5319388A (en) VGA controlled having frame buffer memory arbitration and method therefor
GB2263378A (en) Computer bus system with virtual memory data transfer capability
KR950012175A (en) Apparatus for coordinating access requests from a plurality of processors
KR930002787B1 (en) Universal peripheral controller self-configuring bootloadable ramware
KR100310399B1 (en) Method and apparatus for transferring data over a processor interface bus
KR100259596B1 (en) A data processing system
US6567881B1 (en) Method and apparatus for bridging a digital signal processor to a PCI bus
US5968144A (en) System for supporting DMA I/O device using PCI bus and PCI-PCI bridge comprising programmable DMA controller for request arbitration and storing data transfer information
US5933613A (en) Computer system and inter-bus control circuit
US6442632B1 (en) System resource arbitration mechanism for a host bridge
US5097483A (en) Tri-statable bus with apparatus to drive bus line to first level and then second level for predetermined time before turning off
KR970011890B1 (en) Memory shared method of main processor and co-processor
US6047336A (en) Speculative direct memory access transfer between slave devices and memory
US6278467B1 (en) Display memory control apparatus
US5212775A (en) Method and apparatus for observing internal memory-mapped registers
US5850529A (en) Method and apparatus for detecting a resource lock on a PCI bus
JP3766377B2 (en) Bus control device and information processing system
US5809534A (en) Performing a write cycle to memory in a multi-processor system

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: 20051028

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee