KR960003649B1 - Microcomputer system for communication - Google Patents
Microcomputer system for communication Download PDFInfo
- Publication number
- KR960003649B1 KR960003649B1 KR1019870013222A KR870013222A KR960003649B1 KR 960003649 B1 KR960003649 B1 KR 960003649B1 KR 1019870013222 A KR1019870013222 A KR 1019870013222A KR 870013222 A KR870013222 A KR 870013222A KR 960003649 B1 KR960003649 B1 KR 960003649B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- memory
- bus
- frame
- communication
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
Abstract
내용 없음.No content.
Description
제1도는 본 발명에 관한 시리얼 통신 장치를 구성하는 DMA 콘트롤러의 1실시예를 도시한 블럭도.1 is a block diagram showing one embodiment of a DMA controller constituting a serial communication apparatus according to the present invention.
제2도는 본 발명이 적용되는 시리얼 통신 시스템의 1예를 도시한 블럭도.2 is a block diagram showing an example of a serial communication system to which the present invention is applied.
제3도는 본 발명에 관한 DMA 콘트롤러에 의한 프레임 전송 순서의 1예를 도시한 플로우챠트.3 is a flowchart showing an example of a frame transfer procedure by the DMA controller according to the present invention.
제4도는 통신 제어 장치 및 DMA 콘트롤러로 이루어지는 시리얼 통신 장치를 구비한 마이크로컴퓨터 시스템의 구성예를 도시한 블럭도.4 is a block diagram showing an example of the configuration of a microcomputer system having a serial communication device comprising a communication control device and a DMA controller.
본 발명은 통신 제어 기술, 더 나아가서는 마이크로프로세서사이의 시리얼 통신에 적용하여 특히 유효한 기술에 관한 것으로, 예를 들면 송신 데이타 및 수신 데이타를 퍼스트 인 퍼스트 아웃 방식의 메모리(이하, FIFO라고 한다)와 랜덤 액세스 방식의 메모리사이에서 전송시키는 DMA(다이렉트 메모리 액세스) 콘트롤러를 갖는 시리얼 통신 장치에 이용하여 유효한 기술에 관한 것이다.TECHNICAL FIELD The present invention relates to a communication control technique, and more particularly to a serial communication between microprocessors. The present invention relates to, for example, transmitting data and receiving data in a first in first out type memory (hereinafter referred to as FIFO) and The present invention relates to a technology effective for use in a serial communication device having a DMA (direct memory access) controller for transferring between random access memory.
종래, 마이크로프로세서사이에서 시리얼 통신을 실행할 수 있도록 하기 위해, 일본전기주식회사제 μPD7201A와 같은 통신용 LSI가 제공되어 있다. 제4도에는 이 통신용 μPD7201A를 사용한 시스템의 1예가 도시되어 있다. 즉, 마이크로프로세서 PU에 시스템 버스 BUS를 거쳐서 메모리 MEM과 함께 DMA 콘트롤러 DMAC 및 시리얼 통신용 LSI SIO가 접속되어 있다.Conventionally, in order to be able to execute serial communication between microprocessors, a communication LSI such as µPD7201A manufactured by Nippon Electric Co., Ltd. has been provided. 4 shows an example of a system using this communication μPD7201A. That is, the microprocessor PU is connected to the memory MEM, DMA controller DMAC, and LSI SIO for serial communication via the system bus BUS.
이 시스템에서는 마이크로프로세서 CPU가 도시되어 있지 않은 다른 마이크로프로세서에 대해서 송신하고 싶은 데이타가 있는 경우, 마이크로프로세서 CPU에서 DMA 콘트롤러 DMAC에 대하여 코멘트를 보낸다. 그렇게 하면, DMA 콘트롤러 DMA가 시스템 버스 BUS 상에 어드레스를 출력하여 메모리 MEM 내의 바라는 송신 데이타를 리드하여 통신용 LSI SIO에 공급한다. 통신용 LSI SIO에 공급된 송신 데이타는 일단 내부 FIFO에 저장되고 나서 시리얼 데이타로 변환되어 출력된다.In this system, when there is data that the microprocessor CPU wants to send to another microprocessor not shown, the microprocessor CPU sends a comment about the DMA controller DMAC. In doing so, the DMA controller DMA outputs an address on the system bus BUS, reads the desired transmission data in the memory MEM and supplies it to the communication LSI SIO. The transmission data supplied to the communication LSI SIO is stored in the internal FIFO and then converted into serial data and output.
한편, 외부에서 통신용 LSI SIO에 수신 데이타가 들어오면, 1바이트마다 패러렐데이타로 변환되어 수신용의 FIFO에 저장되고, FIFO가 풀로 되면, 마이크로프로세서 CPU에 인터럽트를 걸어 알린다. 그렇게 하면, 마이크로프로세서 CPU에서 DMA 콘트롤러 DMAC에 리드 코멘드가 보내지고, DMA 콘트롤러 DMAC가 FIFO 내의 수신 데이타를 메모리 MEM에 전송한다. 그후, 마이크로프로세서 CPU가 메모리 MEM을 액세스 하는 것에 의해, 수신 데이타를 얻을 수 있도록 되어 있다(일본전기주식회사가 1984년에 발행한 NEC 전자디바이스 μPD7201A 사용자 메뉴얼” P.1~P.5, P,24~P, 26참조).On the other hand, when received data enters the communication LSI SIO from the outside, it is converted into parallel data every byte and stored in the receiving FIFO. When the FIFO becomes full, an interrupt is notified to the microprocessor CPU. The read command is then sent from the microprocessor CPU to the DMA controller DMAC, which transfers the received data in the FIFO to the memory MEM. Thereafter, the microprocessor CPU accesses the memory MEM to obtain the received data. (NEC Electronic Devices μPD7201A User's Manual issued in 1984 by Nippon Electric Co., Ltd.) P.1 to P.5, P, 24 ~ P, 26).
상기 통신용 LSIμPDPD7201A는 데이타를 프레임이라고 하는 단위로 전송하는 HDLC(high level data link control) 프로토콜에 따른 제어를 실행하는 LSI이다. 프레임 단위로 데이타 통신을 실행하는 프로토콜에서는 수신한 프레임마다 마이크로프로세서가 수신 데이타의 해석 등을 실행하고 싶은 경우가 있다. 그래서, 상기 통신용 LSI μPD7201A를 사용한 시스템에서는 하나의 프레임의 종료를 나타내는 최종 데이타가 들어올때마다 마이크로프로세서에 대해서 인터럽트 신호가 보내지도록 구성되어 있다.The communication LSI μPDPD7201A is an LSI that performs control according to a high level data link control (HDLC) protocol for transmitting data in units of frames. In a protocol for performing data communication on a frame-by-frame basis, a microprocessor may want to perform interpretation of received data for each received frame. Therefore, in the system using the communication LSI μPD7201A, an interrupt signal is sent to the microprocessor whenever the last data indicating the end of one frame is received.
그러나, 상기와 같이 하나의 프레임마다 마이크로프로세서에 대해서 인터럽트를 거는 방식에서는 인터럽트에 의해 마이크로프로세서에 버스 사용권이 넘어가서 마이크로프로세서에 의한 처리가 실행되면, 그 사이 DMA 콘트롤러에 의한 메모리 MEM으로의 데이타 이송이 중단되어 버린다. 그 결과, FIFO에 수신되어 있는 다음 프레임의 메모리 MEM으로의 전송이 불능으로 되어 연속해서 여러개의 프레임이 전송되어 오는 경우의 송신 효율을 저하시키는 원인으로 된다.However, in the method of interrupting the microprocessor every one frame as described above, when the bus license is transferred to the microprocessor by an interrupt and processing by the microprocessor is executed, data is transferred to the memory MEM by the DMA controller in the meantime. Will be interrupted. As a result, transmission of the next frame received by the FIFO to the memory MEM is disabled, which causes a decrease in the transmission efficiency in the case where several frames are transmitted in succession.
그래서, 본 발명자는 상기와 같이 프레임이 어느 정도 연속하여 송신되어 오는 경우는 FIFO에 수신되어 있는 프레임의 메모리로의 전송을 우선하는 방식에 대해서 검토하였다. 즉, 먼저 연속하여 보내져오는 프레임을 모두 수신하여 메모리 MEM에 전송한다. 다음에, DMA 콘트롤러등에서 마이크로프로세서에 인터럽트를 거는 것에 의해, 마이크로프로세서가 DMA 콘트롤러 대신 버스 마스터로 됨과 동시에 마이크로프로세서가 상기 메모리 MEM에 전송되어 있는 프레임에 대한 처리를 실행한다.Thus, the present inventors have studied the method of prioritizing the transmission of the frame received in the FIFO to the memory when the frames are continuously transmitted to some extent as described above. That is, first, all frames sent in succession are received and transmitted to the memory MEM. Then, by interrupting the microprocessor in the DMA controller or the like, the microprocessor becomes the bus master instead of the DMA controller and the microprocessor executes processing for the frame transferred to the memory MEM.
그러나, 종래의 시스템내에는 수신한 프레임수를 카운트하는 기능을 갖지 않으므로, 메모리 MEM으로의 프레임 전송 종료후에 마이크로프로세서가 처리해야할 프레임수를 알 수 없다. 즉, DMA 콘트롤러 등이 마이크로프로세서에 보내야할 인터럽트 요구 신호의 길이 또는 횟수를 알 수 없게 되어, 정상적인 해석이 실행되지 않게 될 우려가 있다. 이것이 본 발명자의 검토에 의해 명확하게 되었다. 또, 전송종료후에 마이크로프로세서가 메모리 MEM 내의 수신 데이타를 모두 리드하는 것에서 메모리수를 아는 것도 가능하지만, 그와 같은 방식에서는 프레임수를 아는 절차만으로도 상당히 긴 시간을 요한다.However, since the conventional system does not have a function of counting the number of received frames, the number of frames to be processed by the microprocessor after the end of the frame transfer to the memory MEM is unknown. That is, the length or the number of interrupt request signals to be sent to the microprocessor by the DMA controller or the like cannot be known, and there is a possibility that the normal analysis is not executed. This has been made clear by the inventor's review. It is also possible to know the number of memories by the microprocessor reading all of the received data in the memory MEM after the end of the transfer. However, in such a method, the procedure of knowing the number of frames requires a very long time.
본 발명의 목적은 프레임 단위로 데이타 전송을 실행하는 시리얼 통신 장치를 구비한 마이크로컴퓨터 시스템에 있어서, 데이타를 수신할 때의 오버헤드를 적게 해서, 통신 효율을 향상시킴과 동시에 마이크로프로세서의 부담을 경감하여 시스템의 스루풋의 향상을 도모하는 것이다.SUMMARY OF THE INVENTION An object of the present invention is to provide a microcomputer system having a serial communication device that performs data transmission on a frame-by-frame basis, thereby reducing the overhead of receiving data, improving communication efficiency and reducing the burden on the microprocessor. This is to improve the throughput of the system.
본 발명의 상기 및 그 밖의 목적과 새로운 특징은 본 명세서의 기술 및 첨부 도면에 의해 명확하게 될 것이다.The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
본원에 있어서 개시되는 발명중 대표적인 것의 개요를 설명하면 다음과 같다.The outline | summary of the typical thing disclosed in this application is as follows.
프레임이 어느 정도 연속하여 수신되고 있는 경우에는 메모리로의 데이타 전송이 우선되고, 마이크로프로세서가 버스 마스터로 되는 것이 금지된다. 또, 수신한 프레임의 수를 카운트하는 카운터가 시스템내에 마련된다. 이 카운터에 카운트된 카운트값의 카운트 다운은 마이크로프로세서가 하나의 프레임에 대한 처리가 종료할 때마다 실행된다. 또한 프레임이 어느 정도 연속하여 수신되고 있는 것의 확인 방법으로서는 예를들면, 수신 프레임이 하나라도 FIFO 내에 존재하고 있을 때에, 연속 수신되고 있다고 판단하는 방법이 고려된다. 수신 프레임의 FIFO에서 메모리로의 전송 동작이 연속하고 있음에도 불구하고, FIFO 내에 수신 프레임이 존재하고 있다고 하는 것은 프레임이 어느 정도 연속하여 수신되고 있다고 고려되기 때문이다.In the case where frames are continuously received to some extent, data transfer to the memory is prioritized, and the microprocessor is prohibited from becoming a bus master. In addition, a counter is provided in the system for counting the number of frames received. The countdown of the count value counted to this counter is executed whenever the microprocessor finishes processing one frame. As a method of confirming that the frames are continuously received to some extent, for example, a method of determining that the frames are continuously received when any of the received frames exist in the FIFO is considered. Although the reception frame is continuously transmitted from the FIFO to the memory, the fact that the reception frame exists in the FIFO is because the frames are considered to be continuously received to some extent.
상술한 수단에 의하면 일련의 프레임 수신이 연속하고 있는 동안은 상기 프레임이 DMA 콘트롤러에 의해 메모리에 전송되고, 최종 프레임 수신후에 마이크로프로세서에 의한 메모리내의 프레임에 대한 처리가 개시된다. 이것에 의해, DMA 전송의 중단을 초래하는 마이크로프로세서의 인터럽트 처리를 방지하여 통신 효율의 향상을 도모할 수 있다. 또 일련의 프레임 수신후에 마이크로프로세서가 통신 데이타를 해석할 때에, 수신 프레임수를 카운터의 값에서 즉시 알 수 있도록 하여, 마이크로프로세서의 부담을 경감하고, 시스템의 스루풋의 향상을 도모한다고 하는 상기 목적을 달성할 수 있다.According to the above-described means, the frame is transmitted to the memory by the DMA controller while the series of frame reception is continuous, and processing of the frame in the memory by the microprocessor is started after the final frame reception. As a result, interrupt processing of the microprocessor causing interruption of the DMA transfer can be prevented and communication efficiency can be improved. When the microprocessor interprets the communication data after receiving a series of frames, it is possible to immediately know the number of frames received by the counter value, thereby reducing the burden on the microprocessor and improving the throughput of the system. Can be achieved.
또한, 연속한 일련의 프레임중 최종 프레임이 수신된 것의 확인 방법으로서는 예를들면, 수신 데이타가 FIFO 내에 존재하지 않게 되었을 때에 최종 프레임이 수신되었다고 판단하는 방법이 고려된다. FIFO 내에 프레임 데이타를 메모리에 순차 전송한 결과, 수신 프레임이 저장되는 FIFO 내에 데이타가 존재하지 않게 되었다는 것은 일련의 프레임 수신이 끝났다고 판단할 수 있기 때문이다.In addition, as a method of confirming that the last frame of the continuous series of frames has been received, for example, a method of determining that the last frame has been received when the received data does not exist in the FIFO is considered. As a result of sequentially transmitting the frame data in the FIFO to the memory, the absence of data in the FIFO in which the received frame is stored is because it can be determined that the reception of a series of frames has been completed.
제1도에는 HLDC 프로토콜에 따른 통신 제어용 LSI(SIO)와 함께 시리얼 통신 기능을 갖는 마이크로컴퓨터 시스템을 구성하는 DMA 콘트롤러의 하나의 실시예가 도시되어 있다.1 illustrates one embodiment of a DMA controller constituting a microcomputer system having a serial communication function together with an LSI (SIO) for communication control in accordance with the HLDC protocol.
이 실시예의 DMA 콘트롤러는 마이크로 ROM(read only memory)(1)과 데이타가 전송되는 메모리의 어드레스를 발생하는 어드레스 발생부(2), 콘트롤 레지스터나 스테이터스 레지스터 등을 갖고, 콘트롤러 내부의 동작 모드를 결정하거나 하는 제어부(3) 등에 의해 구성되어 있다. 상기 마이크로 ROM(1)은 통신 제어장치 SIO 내의 수신용 데이타 FIFO에서 호스트 컴퓨터측의 메모리로의 수신 데이타의 DMA 전송 등을 실행하기 위한 일련의 마이크로 명령군으로 이루어지는 마이크로프로그램이 저장되고, 리드된 마이크로 명령에 따라 콘트롤러 내부의 각부에 대한 제어 신호를 발생한다.The DMA controller of this embodiment has a micro ROM (read only memory) 1, an address generator 2 for generating an address of a memory to which data is transferred, a control register or a status register, and the like to determine an operation mode inside the controller. It consists of the
그리고, DMA 콘트롤러 DMAC는 통신 제어 장치 SIO에서 DMA 전송 요구 신호 DTR이 들어오면, 마이크로 ROM(1)이 기동되고, 대응하는 일련의 마이크로 명령군이 리드되고, 이것에 의해 어드레스 발생부(2)가 제어되고 데이타가 전송되는 곳을 나타내는 데스티네이션 어드레스가 차례로 발생되고, 이것이 시스템의 어드레스 버스(11)상에 출력된다(이때, 메모리상에 준비된 데이타 저장 영역의 선두 어드레스는 마이크로프로세서에 의해 미리 어드레스 발생부(2) 내의 레지스터에 설정되어 있다). 또 어드레스의 출력과 함께, DMA 콘트롤러 DMAC는 통신 제어 장치 SIO에 대해서 아크놀로지 신호 RXACK를 보낸다. 그렇게 하면, 통신 제어 장치 SIO내의 FIFO에서 1프레임분의 수신 데이타가 자동적으로 리드되어 데이타 버스(12)상으로 출력된다. FIFO에서 리드된 수신 데이타는 일단 DMA 콘트롤러내에 로드되고 나서 메모리로 전송하도록 하여도 좋지만, 이 실시예에서는 FIFO 내의 수신 데이타가 데이타 버스(12)상으로 출력되는 것에 대응하여, DMA 콘트롤러에서 어드레서 버스(11)상으로 데스티네이션 어드레스가 출력된다. 이 때문에, 데이타 버스(12)상의 데이타가 그대로 호스트 컴퓨터측의 메모리내에 저장된다.When the DMA transfer request signal DTR is received from the communication control device SIO, the DMA controller DMAC activates the micro ROM 1 and reads a corresponding series of micro instructions, thereby causing the address generator 2 to read. A destination address is generated which in turn indicates where the data is to be controlled and transmitted, which is output on the
또한, 이 실시예에서는 수신 프레임의 수를 카운트하는 카운터 회로(4)가 마련되어 있으며, 통신 제어 장치 SIO에서 DMA 콘트롤러에 대해서 프레임 종료 신호 FES가 공급되면, 마이크로 ROM(1)에서 프레임 종료 처리 신호가 출력되고, 이것에 의해, 카운터 회로(4)가 카운트 업 동작하도록 되어 있다. 그리고, 이 카운터 회로(4)는 예를들면, 카운터의 각 비트의 논리합을 취하여, 그것을 마이크로프로세서에 대한 인터럽트 요구 신호 IRQ로서 출력하도록 되어 있다. 또 카운터 회로(4)는 마이크로프로세서가 외부에서 언제라도 리드되도록 되어 있고, 이 때문에 카운터에는 어드레스가 할당되고, 또한 DMA 콘트롤러내에는 어드레스 디코더(5)가 마련되어 있다. 또한, 상기 DMA 전송 요구 신호 DTR은 통신 제어 장치 SIO 내의 FIFO에 수신 데이타가 저장되어 있는 경우에, 예를들면 고레벨로 된다. 이것에 의해 DMA 콘트롤러 DMAC에 대한 전송 요구가 발생한다. 또한, 상기 FIFO 내에 수신 데이타가 저장되어 있지 않은 경우에 DMA 전송 요구 신호 DRT이 저레벨로 된다. 이것에 의해, DMA 콘트롤러 DMAC에 대한 전송 요구가 삭감된다.In this embodiment, a
이 실시예의 DMA 콘트롤러를 사용한 시리얼 통신 기능이 있는 마이크로컴퓨터 시스템에서는 DMA 콘트롤러 DMAC에서 출력되는 상기 인터럽트 요구 신호 IRQ가 DMA 콘트롤러 DMAC에 대한 DMA 전송 요구 신호 DTR보다도 우선도가 낮은 신호로서 취급되도록 된다. 이것에 의해, 통신 제어 장치 SIO에서 DMA 콘트롤러에 대해서 공급된 프레임 종료 신호 FES에 의해 카운터 회로(4)가 카운트 업되고, 인터럽트 요구신호 IRQ가 출력되어도, 다음 수신 프레임이 있으면 DMA 전송 요구 신호 DTR이 우선되고, 마이크로프로세서에 의한 수신 데이타의 해석 등의 처리가 개시되지 않는다. 즉, 이 실시예의 시스템에서는 마이크로프로세서에 의한 인터럽트 처리는 통신 회선에서 최종 프레임이 들어와서 그 전송이 종료하고, DMA 콘트롤러에 의한 버스의 점유상태가 해제된 후에 모아서 실행되게 된다. 이 때문에, 종래 시스템과 같이, 프레임의 수신이 도중에서 중지되는 일이 없어, 통신 효율이 향상된다.In the microcomputer system having a serial communication function using the DMA controller of this embodiment, the interrupt request signal IRQ output from the DMA controller DMAC is treated as a signal having a lower priority than the DMA transfer request signal DTR for the DMA controller DMAC. As a result, even if the
또한, 특히 제한되지 않지만, 이 실시예의 DMA 콘트롤러 DMAC는 스테이터스 레지스터에 마련된 인에이블 비트가 마이크로프로세서에 의해 “1”로 설정되어 있는 것을 하나의 조건으로 하여 DMA 전송 제어가 실행되도록 구성되어 있다. 예를들면, DMA 콘트롤러 DMAC에 의해, 전송되는 데이타가 저장되는 영역의 선두 어드레스가 어드레스 발생부(2) 내의 레지스터에 설정되는 것에 의해 상기 인에이블 비트가 “1”로 설정된다.In addition, although not particularly limited, the DMA controller DMAC of this embodiment is configured such that DMA transfer control is executed on the condition that the enable bit provided in the status register is set to "1" by the microprocessor. For example, by the DMA controller DMAC, the enable bit is set to "1" by setting the head address of the area in which the data to be transmitted is stored in a register in the address generator 2.
제2도는 본 발명의 다른 실시예를 도시한 것이다.2 shows another embodiment of the present invention.
이 실시예에서는 마이크로프로세서 CPU, DMA 콘트롤러 DMAC, 통신 제어장치 SIO 및 버스 콘트롤러 BC가 동일 반도체 기판상에 형성된다. 이 1칩 반도체는 통신 제어용 프로세서 NPU를 구성한다. 마이크로프로세서 CPU, DMA 콘트롤러 DMAC 또는 통신 제어 장치 SIO와의 사이에 마련되는 제어 신호, 즉 프레임 종료 신호 FES, DMA 전송 요구 신호 DTR, 아크놀로지 신호 RXACK 및 인터럽트 요구 신호 IRQ는 각각 제1도에 도시한 동신호의 제어 신호와 같은 역할을 갖고 있다. 이 실시예에서는 통신 제어용 프로세서 NPU 내에 내부 버스를 위한 버스 콘트롤러 BC가 마련되어 있다. 버스 콘트롤러 BC는 DMA 콘트롤러 DMAC에서의 버스 점유 요구 신호 RE1을 받고, 이것을 확인한 때는 아크놀로지 신호 ACK1을 DMA 콘트롤러 DAMC에 송출한다. 또한, 마이크로프로세서 CPU에서의 버스 점유 요구 신호 RE2를 받고, 이것을 확인한 때는 아크놀로지 신호 ACK2를 마이크로프로세서 CPU에 송출한다. 상기 버스 점유 요구 신호 RE1과 RE2가 동시에 발생하고 있는 경우에는 DMA 콘트롤러 DMAC의 버스권 취득이 우선된다. 이 실시예에서는 상기 DMA 전송 요구 신호 DTR의 발생에 따라 버스 점유 요구 신호 RE1이 발생한다. 또한, 인터럽트 요구 신호 IR1의 발생에 따라 버스 점유 요구 신호 RE2가 발생한다.In this embodiment, a microprocessor CPU, a DMA controller DMAC, a communication controller SIO and a bus controller BC are formed on the same semiconductor substrate. This one-chip semiconductor constitutes a processor NPU for communication control. Control signals provided between the microprocessor CPU, the DMA controller DMAC, or the communication control device SIO, that is, the frame end signal FES, the DMA transfer request signal DTR, the arc signal signal RXACK, and the interrupt request signal IRQ, respectively, are shown in FIG. It has the same role as the control signal of the signal. In this embodiment, a bus controller BC for an internal bus is provided in the processor NPU for communication control. The bus controller BC receives the bus occupancy request signal RE1 from the DMA controller DMAC and, upon confirming this, sends an acknowledgment signal ACK1 to the DMA controller DAMC. When the bus occupancy request signal RE2 is received from the microprocessor CPU, and this is confirmed, the acknowledgment signal ACK2 is sent to the microprocessor CPU. When the bus occupancy request signals RE1 and RE2 occur at the same time, bus ticket acquisition of the DMA controller DMAC is given priority. In this embodiment, a bus occupancy request signal RE1 is generated in accordance with the generation of the DMA transfer request signal DTR. In addition, the bus occupancy request signal RE2 is generated in response to the occurrence of the interrupt request signal IR1.
제3도에는 상기 실시예의 DMA 콘트롤러 DMAC 내에 있어서의 마이크로프로세서에 의한 프레임 수신처리의 순서의 일예가 도시되어 있다.3 shows an example of the procedure of frame reception processing by the microprocessor in the DMA controller DMAC of the above embodiment.
콘트롤러(3)내의 스테이터스 레지스터에 마련된 상기 인에이블비트가 “1”로 되어 있으면, DMA 콘트롤러는 먼저 통신 제어 장치 SIO에서 DMA 전송 요구 신호 DTR이 들어왔는가 아닌가 판정한다(루틴 R1). 그리고, DMA 전송 요구가 있으면, FIFO 내에 바이트 단위로 저장되어 있는 수신 데이타를 1바이트만 리드하여 메모리로 전송한다(루틴 R2). 그리고 나서, 프레임 종료 신호 FES를 보고 프레임이 종료하였는가 아닌가 판정한다(루틴 R3). 여기서, 프레임이 종료하지 않았다고 판정하면, 루틴 R2로 돌아가서 다시 데이타의 전송을 반복한다. 그리고, 프레임이 종료하면, 프레임 종료 처리루틴 R4를 실행함과 동시에 카운터회로(4)를 카운트 업시킨다(루틴 R5). 그리고 나서, 다시 루틴 R1로 돌아가서 상기 동작을 반복한다. 여기서, 프레임 종료 처리 루틴이라함은 예를들면, 수신 데이타내에 에러가 있는가 없는가의 검사 및 에러의 종류 등이 판별되고, 그 결과가 통신 제어 장치 SIO 내의 스테이터스 레지스터(도시하지 않음)에 저장되는 등의 동작을 말한다.If the enable bit provided in the status register in the
또한, 상기 실시예의 카운터 회로(4)는 예를들면, 마이크로프로세서가 제어부(3) 내의 스테이터스 레지스터에 마련된 프레임 종료 비트에 “1”을 라이트하는 것에 의해, 카운트 다운시키도록 구성되어 있다.Further, the
일련의 프레임 수신이 종료하면, 바스 사용권이 마이크로프로세서로 넘어가고, 수신 데이타의 해석 등이 실행된다. 상기 일련의 프레임의 수신 종료는 통신 제어 장치 SIO 내의 FIFO에 저장되어 있던 수신 데이타가 메모리에 전송되고, FIFO 내가 비게 되는 것에 의해, 판단할 수 있다. 그리고, 1프레임에 대한 마이크로프로세서에 의한 프레임 처리가 종료하면, 상기 프레임 종료 비트에 “1”이 라이트되고, DMA 콘트롤러 DMAC 내의 카운터 회로(4)가 카운트 다운된다. 이렇게 해서, 카운터의 값이 “0”으로 될 때까지 마이크로프로세서에 대한 인터럽트 신호 IR1가 계속 공급되므로, 마이크로프로세서는 아직 최종 프레임까지의 처리가 끝나지 않은 것을 인식하고 다음 프레임의 처리로 이행한다.When the reception of a series of frames ends, the bath right is transferred to the microprocessor, and the received data is analyzed and the like. The reception termination of the series of frames can be determined by the reception data stored in the FIFO in the communication control device SIO being transferred to the memory and the inside of the FIFO being empty. When the frame processing by the microprocessor for one frame ends, "1" is written to the frame end bit, and the
이와같이 상기 실시예에서는 DMA 콘트롤러가 계속해서 여러개의 수신 프레임의 전송 처리를 실행하여도 전송 완료후에 마이크로프로세서는 프레임의 수만큼 수신 데이타 해석 등의 프레임 처리를 반복할 수 있다. 따라서, 마이크로프로세서는 수신 프레임이 연속하여 전송된 경우에도, 전송후에 일일이 스테이터스를 해독하여 프레임의 말미를 찾지 않아도 프레임 종료 인터럽트의 수 또는 인터럽트 처리에 필요한 기간을 정확히 알 수 있다. 이 때문에, 이와같은 프레임수의 확인을 위한 수속을 실행할 필요가 없고, 시스템의 스루풋이 향상되게 된다.As described above, in the above embodiment, even if the DMA controller continuously executes the transmission processing of several reception frames, the microprocessor can repeat the frame processing such as the reception data analysis by the number of frames after the transmission is completed. Therefore, even when the received frames are transmitted continuously, the microprocessor can accurately know the number of end-of-frame interrupts or the period required for interrupt processing without having to decode the status after transmission and find the end of the frame. For this reason, it is not necessary to perform the procedure for confirming such a number of frames, and the throughput of a system will be improved.
또한, 상기 실시예에서는 통신 제어 장치 SIO 및 DMA 콘트롤러의 수신 기능에 대해서만 설명하였지만, 통상 이들 LSI 내에는 송신부가 병행해서 마련되는 일이 많고, 이 실시예도 예외가 아니다.In the above embodiment, only the reception functions of the communication control apparatus SIO and the DMA controller have been described, but in general, these LSIs are often provided in parallel with the transmitter, and this embodiment is no exception.
이상 설명한 바와같이, 상기 실시예는 프레임 단위로 데이타 전송을 실행하는 시리얼 통신 장치를 구비한 마이크로컴퓨터 시스템에 있어서, 수신한 프레임의 데이타가 저장된 FIFO에서 메모리로 데이타를 전송하는 DMA 콘트롤러 DMAC 내에 프레임 종료 신호를 카운트하는 카운터가 마련된다. 이 카운터의 카운트값이 “1” 이상인 동안은 연속해서 마이크로프로세서에 대해, DMA 전송 요구 신호 DTR 보다도 우선도가 낮은 인터럽트 요구 신호 IRQ를 공급하도록 하였으므로, 일련의 프레임 수신이 계속하고 있는 동안은 프레임이 접수되어 DMA 콘트롤러에 의해서 메모리에 전송된다. 또 일련의 프레임 수신후에 마이크로프로세서에 의한 프레임의 인터럽트 처리가 개시된다. 이 경우 상기 카운터에 카운트된 카운트값의 카운트 다운은 마이크로프로세서가 하나의 프레임에 대한 처리가 종료할 때마다 실행된다. 이것에 의해, 마이크로프로세서의 인터럽트 처리에 따르는 DMA 전송의 중단이 방지된다고 하는 작용에 의해, 통신 효율이 향상된다는 효과가 있다. 또 일련의 프레임 수신 종료후에 마이크로프로세서가 통신 데이타를 해석할 때에 카운터의 값에서 수신 프레임수를 즉시 알 수 있다고 하는 작용에 의해, 마이크로프로세서의 부담이 경감되고, 시스템의 스루풋이 향상된다고 하는 효과가 있다.As described above, the embodiment is a microcomputer system having a serial communication device for performing data transmission on a frame-by-frame basis, in which a frame is terminated in a DMA controller DMAC for transferring data from a FIFO in which data of a received frame is stored to a memory. A counter for counting signals is provided. As long as the counter value is "1" or more, the microprocessor is continuously supplied with the interrupt request signal IRQ, which has a lower priority than the DMA transfer request signal DTR. It is received and sent to the memory by the DMA controller. In addition, after receiving a series of frames, the interrupt processing of the frame is started by the microprocessor. In this case, the countdown of the count value counted to the counter is executed each time the microprocessor finishes processing one frame. As a result, the effect of preventing interruption of the DMA transfer due to the interrupt processing of the microprocessor has the effect of improving the communication efficiency. In addition, when the microprocessor interprets the communication data after a series of frame reception ends, the microprocessor can immediately recognize the number of frames received by the counter value, thereby reducing the burden on the microprocessor and improving the throughput of the system. have.
이상, 본 발명자에 의해 이루어진 발명을 상기 실시예에 따라 구체적으로 설명하였지만, 본 발명은 상기 실시예에 한정되는 것은 아니고 그 요지를 이탈하지 않는 범위에서 여러가지로 변경가능한 것은 물론이다.As mentioned above, although the invention made by this inventor was demonstrated concretely according to the said Example, this invention is not limited to the said Example and can be variously changed in the range which does not deviate from the summary.
예를들면, 수신 프레임수를 카운트하는 카운트는 DMA 콘트롤러 DMAC 내에 마련되어 있지만, 이것에 한정되지 않고, 다른 어떠한 장소에 마련하여도 좋다.For example, a count for counting the number of received frames is provided in the DMA controller DMAC, but is not limited to this, and may be provided in any other place.
또, 실시예는 일예로서 HDLC 프로토콜에 따른 시리얼 통신 장치에 적용한 경우에 대해서 설명하였지만, 통신 프로토콜은 HDLC에 한정되지 않고 일련의 통신 데이타를 여러개로 분할하여 전송하는 다른 형식의 프로토콜에 따른 시리얼 통신 장치에 대해서도 마찬가지로 적용할 수 있다.In addition, the embodiment has been described in the case of applying to the serial communication device according to the HDLC protocol as an example, the communication protocol is not limited to the HDLC serial communication device according to another type of protocol for dividing a series of communication data into multiple transmissions The same applies to.
이상의 설명에서는 주로 본 발명자에 의해 이루어진 발명을 그 배경으로된 이용 분야인 시리얼 통신용의 DMA 콘트롤러에 적용한 것에 대해서 설명하였지만, 본 발명은 이것에 한정되지 않고, DMA 콘트롤러 일반에 이용할 수 있다.In the above description, the invention mainly applied to the DMA controller for serial communication, which is the field of use as the background, has been described. However, the present invention is not limited to this, and can be used for the general DMA controller.
Claims (19)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61-308449 | 1986-12-26 | ||
JP61308449A JPH084278B2 (en) | 1986-12-26 | 1986-12-26 | Microcomputer system with serial communication function |
Publications (2)
Publication Number | Publication Date |
---|---|
KR880008169A KR880008169A (en) | 1988-08-30 |
KR960003649B1 true KR960003649B1 (en) | 1996-03-21 |
Family
ID=17981156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019870013222A KR960003649B1 (en) | 1986-12-26 | 1987-11-24 | Microcomputer system for communication |
Country Status (2)
Country | Link |
---|---|
JP (1) | JPH084278B2 (en) |
KR (1) | KR960003649B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112835826A (en) * | 2021-03-04 | 2021-05-25 | 深圳市广和通无线股份有限公司 | Communication method, device, equipment and readable storage medium |
-
1986
- 1986-12-26 JP JP61308449A patent/JPH084278B2/en not_active Expired - Fee Related
-
1987
- 1987-11-24 KR KR1019870013222A patent/KR960003649B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
JPH084278B2 (en) | 1996-01-17 |
KR880008169A (en) | 1988-08-30 |
JPS63164654A (en) | 1988-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR0167818B1 (en) | Method and apparatus for arbitrating for a bus to enable split transaction bus protocols | |
US5133062A (en) | RAM buffer controller for providing simulated first-in-first-out (FIFO) buffers in a random access memory | |
JP3340738B2 (en) | Method and apparatus for a parallel packet bus | |
US5604866A (en) | Flow control system having a counter in transmitter for decrementing and incrementing based upon transmitting and received message size respectively for indicating free space in receiver | |
EP0867814B1 (en) | System and method for controlling a bus | |
KR0161101B1 (en) | Network adapter with host interrupt and indication management | |
EP0241129A2 (en) | Addressing arrangement for a RAM buffer controller | |
KR20000053380A (en) | A port manager controller for connecting various function modules | |
US8402180B2 (en) | Autonomous multi-packet transfer for universal serial bus | |
KR930002787B1 (en) | Universal peripheral controller self-configuring bootloadable ramware | |
US5142628A (en) | Microcomputer system for communication | |
KR100708096B1 (en) | Bus system and execution scheduling method for access commands thereof | |
KR100480605B1 (en) | Method of controlling transmitting buffer and receiving buffer of network controller, and the network controller | |
EP1591907B1 (en) | Resource management | |
KR960003649B1 (en) | Microcomputer system for communication | |
JPH0744567B2 (en) | Communication interface device | |
EP0378422B1 (en) | Look ahead bus transfer request | |
KR970005743B1 (en) | Data transfer controller | |
KR100451722B1 (en) | apparatus for controlling direct memory access | |
JP2000276437A (en) | Dma controller | |
KR100737904B1 (en) | interface device between master/slave devices and method thereof | |
KR100199033B1 (en) | A multi-interrupt control device and method using compromised type on pci bus | |
KR100199021B1 (en) | A multi-interrupt control device and method by interrupt order on pci bus | |
JP3353368B2 (en) | Bus relay device | |
JPH09259071A (en) | Communication controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
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: 20020307 Year of fee payment: 7 |
|
LAPS | Lapse due to unpaid annual fee |