KR0147709B1 - Data transfer control apparatus using single buffer and its method - Google Patents
Data transfer control apparatus using single buffer and its methodInfo
- Publication number
- KR0147709B1 KR0147709B1 KR1019950015801A KR19950015801A KR0147709B1 KR 0147709 B1 KR0147709 B1 KR 0147709B1 KR 1019950015801 A KR1019950015801 A KR 1019950015801A KR 19950015801 A KR19950015801 A KR 19950015801A KR 0147709 B1 KR0147709 B1 KR 0147709B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- buffer
- bus
- value
- ring
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- 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
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4221—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0036—Small computer system interface [SCSI]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Bus Control (AREA)
Abstract
본 발명은 SCSI(Small Computer System Interface) 버스와 주변 저장장치 사이의 테이타 전송을 제어하는 장치 및 방법에 관한 것으로, 특히 하나의 링-버퍼(Ring Buffer)를 사용하여 SCSI 버스로부터 테이터를 받으면서 동시에 주변 저장장치에 데이터를 보내거나 또는 주변 저장장치에서 데이터를 받으면서 동시에 SCSI 버스에 데이터를 보내는 단일버퍼를 이용한 데이터 전송 제어장치 및 방법에 관한 것이다.The present invention relates to an apparatus and a method for controlling data transfer between a small computer system interface (SCSI) bus and a peripheral storage device. In particular, the present invention relates to receiving and receiving data from a SCSI bus using a single ring buffer. The present invention relates to a data transfer control apparatus and method using a single buffer that sends data to a storage device or receives data from a peripheral storage device and simultaneously sends data to a SCSI bus.
Description
제1도는 본 발명에 따른 단일버퍼를 이용한 데이터 전송 제어장치의 구성 블록도1 is a block diagram of a data transmission control apparatus using a single buffer according to the present invention
제2도는 링-버퍼 관련 읽기 지정 레지스터 및 쓰기지정 레지스터와 주변 회로도Figure 2 shows ring-buffered read and write registers and peripheral circuit diagrams.
제3도는 버퍼 제어회로내의 FSM의 블록 다이어그램3 is a block diagram of an FSM in a buffer control circuit.
제4도는 FSM의 처리 흐름도4 is a flow chart of the FSM
*도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings
10:SCSI 디스크 제어장치 12:마이크로프로세서10: SCSI disk controller 12: Microprocessor
16:디스크 인터페이스부 20:고속 디스크16: Disc interface 20: High speed disc
24:SCSI 버스 데이터 제어부 34:링-버퍼24: SCSI bus data control section 34: Ring buffer
37:디스크 데이터 제어부 38:에러검출/정정부37: disk data controller 38: error detection / correction
50:버퍼 제어부50: buffer control part
본 발명은 SCSI(Small Computer System Interface) 버스와 주변 저장장치 사이의 데이터 전송을 제어하는 장치 및 방법에 관한 것으로, 특히 하나의 링-버퍼(Ring buffer)를 사용하여 SCSI 버스로부터 데이터를 받으면서 동시에 주변 저장장치에 데이터를 보내거나 또는 주변 저장장치에서 데이터를 받으면서 동시에 SCSI 버스에 데이터를 보내는 단일 버퍼를 이용한 데이터 전송 제어장치 및 방법에 관한 것이다.The present invention relates to an apparatus and a method for controlling data transfer between a small computer system interface (SCSI) bus and a peripheral storage device. In particular, the present invention relates to receiving data from a SCSI bus using a single ring buffer, A data transfer control apparatus and method using a single buffer for sending data to or receiving data from a peripheral storage device and simultaneously sending data to a SCSI bus.
종래의 데이터 전송 제어장치 및 방법은 두 개의 버퍼를 이용하여 하나의 버퍼에 데이터를 받는 동안 이미 데이터를 받아놓은 다른 버퍼에서는 데이터를 전송하도록 한다. 그리고, 데이터를 받는 버퍼가 꽉 차고 데이터를 보내는 버퍼가 완전히 비면 서로의 역할이 뒤바뀌게 된다.The conventional data transmission control apparatus and method uses two buffers to transmit data in another buffer which has already received data while receiving data in one buffer. When the buffers receiving data are full and the buffers sending data are completely empty, the roles of each other are reversed.
그러나, 상기와 같이 데이터를 전송하기 위해서는 두 개 이상의 버퍼가 필요하며, SCSI 버스와 주변 저장장치 사이의 전송속도 차이에서 비롯되는 데이터 블록과 잠복기간을 감수해야 하는 문제점이 따랐다.However, as described above, two or more buffers are required to transmit data, and a problem arises in that a data block and a latency period resulting from a transfer rate difference between a SCSI bus and a peripheral storage device are taken.
상기와 같은 종래기술의 문제점을 해결하기 위하여 안출된 본 발명은, 하나의 링-버퍼로 다수의 버퍼를 동시에 읽고 쓸 수 있도록 단일화하여 읽기 포인터(Read-pointer)와 쓰기 포인터(Write-pointer)의 차이를 스레숄드(Threshold)로 정의하고 이를 조정함으로써 주변 저장장치와 SCSI버스의 전송속도 차이를 수용하도록 한 단일버퍼를 이용한 데이터 전송 제어장치 및 방법을 제공하는데 그 목적이 있다.In order to solve the problems of the prior art as described above, the present invention provides a single ring-buffer to simultaneously read and write a plurality of buffers, thereby unifying read-pointer and write-pointer. It is an object of the present invention to provide a data transfer control apparatus and method using a single buffer to define a difference as a threshold and adjust the difference to accommodate a transfer rate difference between a peripheral storage device and a SCSI bus.
상기 목적을 달성하기 위하여 본 발명의 단일버퍼를 이용한 데이터 전송 제어장치는 SCSI 버스 신호를 입력받고, 외부의 마이크로 프로세서와 내부 제어버스를 통해 연결되는 SCSI 버스 데이터 제어부; 직렬 제어버스를 통해 상기 SCSI 버스 데이터 제어부와 연결되어 버퍼를 경유하는 데이터 전송을 제어하는 버퍼 제어부; 직렬 제어버스를 통해 상기 버퍼 제어부와 연결되고, 버퍼 입력 버스와 버퍼 출력 버스를 통해 버퍼에 데이터를 주고 받는 디스크 데이터 제어부; 직렬 제어버스를 통해 상기 디스크 데이터 제어부와 연결되고, 디스크 인터페이스에 보내는 데이터를 인코드하고 디스크 인터페이스에서 받은 신호를 디코드하는 오류 감지 및 정정부; 상기 버퍼제어부의 제어를 받아 상기 SCSI 버스 데이터 제어부와 디스크 데이터 제어부로 데이터를 입력 또는 출력하는 단일 버퍼를 구비하여 이루어진 것을 특징으로 한다.In order to achieve the above object, a data transfer control apparatus using a single buffer according to the present invention includes a SCSI bus data controller which receives a SCSI bus signal and is connected through an external microprocessor and an internal control bus; A buffer control unit connected to the SCSI bus data control unit through a serial control bus to control data transmission via a buffer; A disk data control unit connected to the buffer control unit through a serial control bus, and transmitting and receiving data to and from a buffer through a buffer input bus and a buffer output bus; An error detection and correction unit connected to the disc data controller via a serial control bus, for encoding data sent to the disc interface and decoding a signal received from the disc interface; And a single buffer for inputting or outputting data to the SCSI bus data controller and the disk data controller under the control of the buffer controller.
또한, 본 발명은 FSM(Finite State Machine)과 링-버퍼를 사용하여 SCSI버스와 디스크 메모리간의 데이터 전송을 제어하는 방법에 있어서, FSM을 포즈 상태로 초기화하는 제1단계; 데이터 전송 명령이 있는가 판단하여 포즈상태를 리셋하고 데이터 전송을 준비하며, 없으면 상기 제1단계로 회귀하는 제2단계; 링-버퍼에 쓸 수 있는 신호 또는 링-버퍼로부터 읽을 수 있는 신호를 판단하여 SCSI 버스로부터 데이터 블록수와 블록당 바이트수를 지정된 카운터에 저장하며, 두 신호가 모두 발생하지 않았으며 제1단계로 분기하는 제3단계; 바이트카운터를 1만큼 감소시키는 제4단계; SCSI버스에 오류발생 여부를 검사하여 오류가 발생했으며 제1단계로 회귀하고, 오류가 발생하지 않았으면 SCSI 버스로부터 데이터 전송요구가 있는가를 검사하는 제5단계; 상기 제5단계 수행후 전송요구가 없으면 제5단계로 분기하고, 전송요구가 있으면 링-버퍼로부터 1바이트를 읽거나 링-버퍼에 1바이트를 쓰는 제6단계; 상기 제6단계 수행후 바이트카운터의 값이 0인가 판단하여 0이 아니면 제4단계로 분기하고, 0이면 블록카운터를 1만큼 감소시키는 제7단계; 블록데이터 전송중 SCSI 버스 또는 링-버퍼의 데이터버스에서 패리티 오류가 발생했는지 검사하여 오류가 발생했으면 제1단계로 회귀하고, 오류가 발생하지 않았으면 모든 블록을 전송완료했는가 검사하고, 남은 데이터 블록이 있으면 제3단계로 분기하는 제8단계; 데이터 전송절차를 모두 마쳤는가 판단하여, 전송절차를 모두 마쳤으면 제1단계로 회귀하고, 그렇지 않으면 제3단계로 분기하는 제9단계를 포함하여 이루어지는 것을 특징으로 한다.In addition, the present invention provides a method for controlling data transfer between a SCSI bus and a disk memory using a finite state machine (FSM) and a ring-buffer, the method comprising: initializing the FSM to a pause state; A second step of resetting the pause state by determining whether there is a data transmission command and preparing for data transmission, and returning to the first step if not; Determines the signals that can be written to the ring buffer or the signals that can be read from the ring buffer, and stores the number of data blocks and the number of bytes per block from the SCSI bus in the specified counters. A third step of branching; A fourth step of decreasing the byte counter by one; A fifth step of checking whether an error has occurred on the SCSI bus and returning to step 1, and if there is no error, checking whether there is a data transfer request from the SCSI bus; A sixth step if the transfer request is not performed after the fifth step, and if there is a transfer request, a sixth step of reading one byte from the ring-buffer or writing one byte to the ring-buffer; Determining whether the value of the byte counter is zero after performing the sixth step, and branching to the fourth step if the value is not 0, and decreasing the block counter by one if it is zero; During the block data transfer, check whether the parity error occurred on the SCSI bus or the ring-buffer data bus. If an error occurs, return to step 1. If the error does not occur, check whether all blocks have been transferred. An eighth step of branching to a third step, if present; It is determined whether all data transmission procedures have been completed, and if the transmission procedures have been completed, the method returns to the first step, and otherwise comprises a ninth step branching to the third step.
이하, 첨부된 도면 제1도 내지 제4도를 참조하여 본 발명의 일 실시예를 상세히 설명한다.Hereinafter, an embodiment of the present invention will be described in detail with reference to FIGS. 1 to 4.
제1도는 본 발명에 따른 단일버퍼를 이용한 데이터 전송 제어장치의 구성 블록도로서, 10은 SCSI 디스크 제어장치(이하, SDC IC라 칭함), 12는 마이크로프로세서, 16은 디스크 인터페이스부, 20은 고속 디스크, 24는 SCSI 버스 데이터 제어부, 34는 링-버퍼, 37은 디스크 데이터 제어부, 38은 에러검출/정정부, 50은 버퍼 제어부를 각각 나타낸다.1 is a block diagram of a data transmission control apparatus using a single buffer according to the present invention, 10 is a SCSI disk controller (hereinafter referred to as SDC IC), 12 is a microprocessor, 16 is a disk interface unit, 20 is a high speed A disk, 24 denotes a SCSI bus data controller, 34 denotes a ring-buffer, 37 denotes a disk data controller, 38 denotes an error detection / correction, and 50 denotes a buffer controller.
도면에 도시된 바와 같이 본 발명의 SDC IC(10)는 병렬버스(14)를 통하여 마이크로프로세서(12)에 연결된다. 마이크로프로세서(12)는 SCSI 프로토콜, 패리티 검사, SDC IC(10)등을 관장하며 이에는 제안된 방법의 초기화도 포함된다. SDC IC(10)와 마이크로프로세서(12)는 병렬 버스(14)를 통하여 디스크 인터페이스부(16)를 제어한다.As shown in the figure, the SDC IC 10 of the present invention is connected to the microprocessor 12 through the parallel bus 14. The microprocessor 12 manages the SCSI protocol, parity check, SDC IC 10, etc., which includes the initialization of the proposed method. The SDC IC 10 and the microprocessor 12 control the disk interface unit 16 via the parallel bus 14.
디스크 인터페이스부(16)는 직렬 버스(18)를 통하여 고속 디스크(20)에 연결된다. 고속 디스크(20)는 회전하는 섹터들에 데이터를 저장하며 SCSI 표준에 따라 최대 512바이트까지 저장한다. 데이터는 직렬 버스(18)의 데이터 라인을 통하여 고속 디스크(20)와 디스크 인터페이스부(16)사이에 전송된다. 디스크 인터페이스부에 전송된 데이터는 출력 직렬 버스(40)와 입력 직렬버스(42)를 통하여 SDC IC(10)에 연결된다.The disk interface 16 is connected to the high speed disk 20 via the serial bus 18. The high speed disk 20 stores data in rotating sectors and stores up to 512 bytes according to the SCSI standard. Data is transferred between the high speed disk 20 and the disk interface 16 via the data line of the serial bus 18. Data transmitted to the disk interface is connected to the SDC IC 10 via the output serial bus 40 and the input serial bus 42.
SDC IC(10)의 다른 한쪽은 SCSI버스(22)에 연결된다. SCSI 버스(22)는 궁극적으로 고속 디스크(20) 쓰여지는 데이터를 보내고 고속 디스크(20)에서 읽은 데이터를 받는다. 이들 데이터는 고속 디스크(20)의 한 섹터에 저장된 바이트 수의 정수배로 전송되는 것이 보통이다.The other side of the SDC IC 10 is connected to the SCSI bus 22. The SCSI bus 22 ultimately sends data written to the high speed disk 20 and receives data read from the high speed disk 20. These data are usually transmitted at an integer multiple of the number of bytes stored in one sector of the high speed disk 20.
SDC IC(10) 안에는 SCSI 버스 신호들이 SCSI 버스 데이터 제어부(24)에 연결되며, 여기에서 내부제어버스(23)에 연결되는 제어신호와 버퍼입력버스(30)와 버퍼출력버스(32)를 통하여 링-버퍼(34)에 연결되는 데이터로 나누어진다.In the SDC IC 10, SCSI bus signals are connected to the SCSI bus data control unit 24, where a control signal connected to the internal control bus 23 and a buffer input bus 30 and a buffer output bus 32 are connected. Divided into data connected to the ring-buffer 34.
디스크 인터페이스(16)의 인터페이스 신호들은 직렬버스들(40,42)을 통하여 오류감지/정정회로(38)에 연결된다. 디스크(20)가 데이터를 보낼 때는 직렬버스(42)를 통하여, 데이터를 받을 때는 직렬 버스(40)를 통하여 직렬 비트 스트림이 오류감지/정정회로(38)에 전달된다. 오류감지/정정회로는 디스크 인터페이스(16)에 보내는 데이터를 이코드하고 디스크 인터페이스(16)에서 받은 데이터를 인코드한다.The interface signals of the disk interface 16 are connected to the error detection / correction circuit 38 via serial buses 40 and 42. The serial bit stream is transmitted to the error detection / correction circuit 38 via the serial bus 42 when the disk 20 sends data, and via the serial bus 40 when receiving data. The error detection / correction circuit encodes the data sent to the disk interface 16 and encodes the data received at the disk interface 16.
오류가 없는 데이터는 직렬버스들(44,46)을 통하여 오류감지/정정회로와 디스크 데이터 제어부(37)사이에 전송된다. 디스크 데이터 제어부(37)는 버퍼 입력버스(30)와 버퍼 출력버스(32)을 통하여 링-버퍼(34)에 데이터를 주고 받는다. 디스크 데이터 제어부(37)는 병렬버스들(30,32)과 직렬버스들(44,46) 사이의 직렬 데이터를 병렬 데이터로, 그리고 병렬 데이터를 직렬 데이터로 전환하여 주는 일을 포함한다.Error free data is transmitted between the error detection / correction circuit and the disk data control unit 37 via the serial buses 44 and 46. The disk data controller 37 exchanges data with the ring buffer 34 through the buffer input bus 30 and the buffer output bus 32. The disk data controller 37 includes converting serial data between the parallel buses 30 and 32 and the serial buses 44 and 46 into parallel data and converting the parallel data into serial data.
디스크 데이터 제어부(37)의 제어정보는 내부제어버스(23)에 연결된다. 또다른 직렬 제어버스들(48,49)을 통하여 디스크 데이터 제어부(37)는 버퍼 제어부(50)와 연결된다. 버퍼 제어부(50)는 직렬 제어버스들(52,54)을 통하여 SCSI 버스 데이터 제어부(24)에 연결되며 제어신호(55)로 링-버퍼(34)를 제어한다. 따라서, 제어회로들(24,37,50)의 입출력은 버스(14), 마이크로프로세서(12) 및 디스크 인터페이스(16)에 공통으로 연결된다.The control information of the disc data control unit 37 is connected to the internal control bus 23. The disk data control unit 37 is connected to the buffer control unit 50 via further serial control buses 48 and 49. The buffer controller 50 is connected to the SCSI bus data controller 24 via the serial control busses 52 and 54 and controls the ring buffer 34 with the control signal 55. Thus, the input and output of the control circuits 24, 37, 50 are commonly connected to the bus 14, the microprocessor 12 and the disk interface 16.
버퍼 제어부(50)는 링-버퍼(34)를 경유하는 데이터 전송을 제어하는 바, 링-버퍼(34)가 데이터 송,수신을 동시에 행하게 하며, 다음에 설명한 스레숄드를 설정/계산하여 이를 수행한다.The buffer controller 50 controls the data transmission via the ring buffer 34, and causes the ring buffer 34 to perform data transmission and reception at the same time, and sets and calculates the threshold described below. .
이상에서 본 발명의 전반적인 동작을 설명하였다.The overall operation of the present invention has been described above.
다음에는 중요부인 버퍼 제어부(50) 및 이의 제어를 받아 동작하는 링-버퍼(34)에 대하여 설명한다.Next, a description will be given of the buffer control section 50, which is an important part, and the ring-buffer 34 operating under the control thereof.
링-버퍼(34)는 그 크기에 제한이 없으나 편의상 512바이트로 구성되어 있다고 생각한다. 각각의 바이트 단위로 지정하여 쓰고 읽을 수 있어야 한다. 어떤 시간축에서 볼 때 1번째의 바이트에 데이터를 쓰고 k번째 바이트의 내용을 동시에 읽어내는 것이 가능하다. 이와 같은 구조의 버퍼는 이미 알려진 방법, 예를 들면 레지스터 파일로 구현이 가능하나 이 구현방법에 국한될 필요는 없다. 데이터를 쓸 바이트로 지정하기 위하여 10비트로 된 쓰기 지정 레지스터를 두고 이의 내용을 i라 한다. 읽을 데이터를 담고 있는 바이트를 지정하기 위하여 10비트로 된 읽기 지정 레지스터를 두고 이의 내용을 k라고 한다. (i-k)값은 스레숄드라고 정의한다. 읽기 지정 레지스터 및 쓰기 지정 레지스터의 비트수는 버퍼의 크기에 따라 정해지는 것이 명백하며, 따라서 10비트로 한정할 필요는 없다. 본 발명에서는 버퍼의 크기 512바이트보다 1bit씩 더 큰 읽기 지정 레지스터 및 쓰기 지정 레지스터를 사용하였는데 이는 (i-k)값을 계산하기 쉽게 하도록 하기 위함이다.The ring buffer 34 is not limited in size but is considered to be composed of 512 bytes for convenience. Each byte must be specified to be able to write and read. On some time bases, it is possible to write data to the first byte and to read the contents of the kth byte at the same time. A buffer of this structure can be implemented in a known manner, for example a register file, but need not be limited to this implementation. To specify the data to be written to, write a 10-bit write register and call its contents i. To specify the byte containing the data to read, a 10-bit read register is placed and its contents are called k. The value (i-k) is defined as the threshold. It is apparent that the number of bits of the read designation register and the write designation register is determined according to the size of the buffer, and therefore it is not necessary to limit it to 10 bits. In the present invention, a read designation register and a write designation register larger by 1 bit than the size of the buffer of 512 bytes are used to make it easy to calculate (i-k) values.
링-버퍼(34)를 통한 데이터 전송을 위하여는, 다음에도 언급될 것과 같이, 관련된 장치들의 초기화가 선행된다. 여기서는 읽기 지정 레지스터 및 쓰기 지정 레지스터들이 초기화되는 것, 데이터 전송이 진행됨에 따라 동작하는 방법 및 스레숄드 계산방법 등을 제2도를 참조하여 설명한다.For data transmission via the ring-buffer 34, as will be mentioned later, the initialization of the relevant devices is preceded. Herein, the read designation register and the write designation register are initialized, a method of operating as the data transmission proceeds, a threshold calculation method, and the like will be described with reference to FIG.
제2도는 링-버퍼 관련 읽기 지정 레지스터 및 쓰기 지정 레지스터와 주변 회로도로서, 쓰기 지정 레지스터(101)와 읽기 지정 레지스터(102)는 같은 값을 갖도록 초기화된다. 각 레지스터의 값을 각각 i,k라고 하면 i=k가 되도록 초기화되며, 여기서는 편의상 i=k=0이라고 한다. 링-버퍼(34)를 통한 데이터 전송은 먼저 데이터를 받아 링-버퍼에 쓰는 것으로부터 시작된다. 이 쓰는 동작이 완료되면 증분기(103)가 동작하여 쓰기 지정 레지스터(101)의 값이 1만큼 증가, 즉 i=i+1, 한다. 연산기(105)는 쓰기 지정 레지스터(101)의 값과 읽기 지정 레지스터(102)값의 차이(i-k)값을 계산한다. 사용자 지정 레지스터(107)에는 사용자가 설정한 값이 저장되어 있는데 제1비교기(106)는 연산기(105)의 결과값과 사용자 지정 레지스터(107)의 값을 비교하여 링-버퍼(34)로부터 데이터를 읽을 수 있도록 하는 읽기 인에이블신호(108)을 출력한다. 연산기(105)의 결과값이 사용자 지정 레지스터(107)의 값보다 크거나 같으면 읽기 인에이블신호(108)가 발생한다.2 is a ring-buffer related read designation register and write designation register and a peripheral circuit diagram, in which the write designation register 101 and the read designation register 102 are initialized to have the same value. If the values of each register are i and k, respectively, they are initialized to be i = k. Here, i = k = 0 for convenience. Data transfer through ring-buffer 34 begins with first receiving data and writing to the ring-buffer. When the write operation is completed, the incrementer 103 is operated to increase the value of the write designation register 101 by 1, i.e., i = i + 1. The calculator 105 calculates a difference i-k between the value of the write designation register 101 and the value of the read designation register 102. The user-specified register 107 stores a value set by the user. The first comparator 106 compares the result of the operator 105 with the value of the user-specified register 107 to obtain data from the ring-buffer 34. A read enable signal 108 is outputted to enable reading of the signal. If the result value of the operator 105 is greater than or equal to the value of the user specified register 107, the read enable signal 108 is generated.
읽기 인에이블신호(108)가 발생하기 전까지는 링-버퍼(34)에 쓰는 동작만이 진행되게 되므로 읽기 지정 레지스터(101)의 값은 변함이 없게 된다. 읽기 인에이블 신호(108)가 발생하면 링-버퍼(34)로부터의 데이터 읽기가 가능해 지고 1바이트의 데이터를 읽을때마다 증분기(104)가 동작하여 읽기 지정 레지스터(102) 값이 1만큼 증가, 즉 k=k+1, 된다. 쓰기 지정 레지스터(101)는 증분기(103)와 합하여 이진 증가 카운터처럼 동작한다. 읽기 지정 레지스터(102)도 증분기(104)와 합하여 같은 동작을 하므로 버퍼크기만큼의 데이터를 읽거나 쓰면 다음의 버퍼 크기 만큼의 데이터를 읽거나 쓰는 동안에 레지스터들(101,102)의 최상위 비트값은 0에서 1, 또는 1에서 0으로 바뀐 상태를 유지한다.Until the read enable signal 108 is generated, only the operation of writing to the ring-buffer 34 proceeds, so that the value of the read designation register 101 remains unchanged. When the read enable signal 108 occurs, data read from the ring-buffer 34 becomes possible, and the incrementer 104 operates by reading one byte of data, increasing the value of the read designation register 102 by one. , K = k + 1. The write designation register 101 acts like a binary increment counter in combination with the incrementer 103. Since the read designation register 102 also performs the same operation in combination with the incrementer 104, reading or writing as much data as the buffer size causes the most significant bit value of the registers 101 and 102 to be zero while reading or writing as much data as the next buffer size. Keeps changing from 1 to 1, or from 1 to 0.
따라서 연산기(105)로 쓰기 지정 레지스터(101)값과 읽기 지정 레지스터(102)값의 차이를 계산하기 쉽도록 스레숄드값 저장장치(111)를 두는바, 이는 쓰기 지정 레지스터(101)의 최상위 비트 값이 0이고 읽기 지정 레지스터(102)의 최상위 비트값이 1인 상태로 천이할 경우 이를 쓰기 지정 레지스터(101)의 최상위 비트를 1로 읽기 지정 레지스터(102)의 최상위 비트를 0으로 바꾸어 줄 수 있도록 신호(112)를 발생시킨다.Therefore, the threshold value storage device 111 is placed so that it is easy to calculate the difference between the write designation register 101 value and the read designation register 102 value by the operator 105, which is the most significant bit value of the write designation register 101. Is 0 and the most significant bit value of the read designation register 102 is changed to 1 so that the most significant bit of the write designation register 101 can be changed to 1 so that the most significant bit of the read designation register 102 can be changed to 0. Generate signal 112.
제2비교기(109)는 쓰기 대기(write-hold)신호(110)를 발생시켜 이미 저장된 데이터가 읽혀지기도 전에 다른 데이터로 겹쳐 써지게(over write)되는 것을 방지한다. 제2비교기(109)의 입력으로는 쓰기 지정 레지스터(101) 및 읽기 지정 레지스터(102)의 하위 9비트 값과 같으면 쓰기 동작을 정지시키게 된다.The second comparator 109 generates a write-hold signal 110 to prevent the data previously stored from being overwritten with other data before being read. If the second comparator 109 is equal to the lower 9-bit value of the write designation register 101 and the read designation register 102, the write operation is stopped.
버퍼 제어부(50)는 링-버퍼(34)를 통한 SCSI 버스(22)와 고속 디스크(20)간의 데이터 전송을 제어한다. 버퍼 제어부(50)내에는 파이나이트 스테이트 머신(Fimite State Machine;이하 FSM이라 칭함)(200)을 두어 SCSI 버스(22)와 디스크 데이터 제어부(37)사이의 데이터 전송을 제어한다.The buffer controller 50 controls data transfer between the SCSI bus 22 and the high speed disk 20 through the ring buffer 34. In the buffer controller 50, a fine state machine (hereinafter referred to as an FSM) 200 is provided to control data transfer between the SCSI bus 22 and the disk data controller 37.
제3도는 FSM(200)의 블록 다이어그램으로, 도시된 바와 같이 FSM(200)은 SCSI송신(SCSISEND)신호, SCSI수신(SCSIREC)신호, 디스크간 전송(Transfer To/From Disk Terminated)(TERM)신호, SCSI 서브 시스템 오류에 대한 오류 종류(SEQRES)신호, 버퍼 패리티 오류(Buffer Parity Error)(SBPER)신호, SCSI 데이터 버스 패리티 오류(SDBPER)신호, 읽기 인에이블신호(108), 쓰기 대기신호(110), 블록 카운터=0(EOP), SCSI버스의 데이터 전송요구(SREQLS) 신호의 10개의 입력을 갖고 있다.3 is a block diagram of the FSM 200. As illustrated, the FSM 200 includes a SCSI transmission signal, a SCSI reception signal, and a transfer to / from disk terminated (term) signal. , Error type (SEQRES) signal for SCSI subsystem error, Buffer Parity Error (SBPER) signal, SCSI Data Bus Parity Error (SDBPER) signal, read enable signal 108, write wait signal 110 It has 10 inputs: block counter = 0 (EOP) and SCSI bus data transfer request (SREQLS) signals.
또한, FSM(200)은 버스 버퍼 인액티브(Pause)신호; 전송되는 데이터블록수와 블록당 바이트수를 지정된 카운터에 저장(LDBTCT); 블록 카운터감소(DBLKC)신호; 버스 바이트 카운터 감소(DSBC)신호; 시퀀스 종료신호(RSTSR); 및 버스 스테이트머신 액티브(SSMACT)의 6개의 출력을 낸다.In addition, the FSM 200 may include a bus buffer inactive signal; Storing the number of transmitted data blocks and the number of bytes per block in a designated counter (LDBTCT); Block counter decrement (DBLKC) signal; Bus byte counter decrement (DSBC) signal; A sequence end signal (RSTSR); And six outputs of bus state machine active (SSMACT).
상기와 같은 입출력을 갖는 FSM(200)의 동작은 제4도의 흐름도에 도시된 바와 같다.Operation of the FSM 200 having the above input and output is as shown in the flowchart of FIG.
본 발명에서는 FSM(200)의 상태도를 따로이 정의하지 않는바, 이는 다음의 설명으로부터 구현될 수 있는 FSM은 여러 가지가 될 수 있으며 또한 관련지식을 갖고 있으면 쉽게 그 중의 하나를 선택하여 구현할 수 있기 때문이다. 다시 말하면 다음의 설명을 구현하는 방법 및 그 결과가 본 발명에서 정의하는 FSM을 한정하는 것은 아니다.In the present invention, the state diagram of the FSM 200 is not separately defined, since the FSM that can be implemented from the following description may be various and also having related knowledge, one of them can be easily selected and implemented. to be. In other words, the method and the result of implementing the following description do not limit the FSM defined in the present invention.
제1도 내지 제4도를 참조하여 SCSI 버스(22)와 링-버퍼(34)간에 데이터를 전송하는 방법을 설명한다.A method of transferring data between the SCSI bus 22 and the ring buffer 34 will be described with reference to FIGS.
마이크로 프로세서(12)는 데이터 전송 제어방법 전체를 초기화(300)하며 일단 초기화되면 자동적으로 순차적인 수행을 한다. 이어서, FSM(200)의 포즈(Pause)=1로 셋하여(302) SCSI의 데이터 전송 명령어가 내려졌는지를 검사하도록 한다. SCSIREC명령어를 검사하여(304) 명령이 되었으면 (305)경로를 따라 포즈=0으로 리셋한다.(306) 명령이 되지 않았으면 (331)경로를 따라 SCSI SEND 명령이 내려졌는지를 검사하여 (360),(361)경로를 따라 포즈=0으로 리셋한다(362). 그렇지 않으면 (333),(391)경로를 따라 포즈=1로 셋한다(302).The microprocessor 12 initializes the entire data transmission control method 300 and automatically performs sequential operation once initialized. Subsequently, Pause = 1 of the FSM 200 is set (302) to check whether a SCSI data transfer command is issued. Check the SCSIREC command (304) and if it is a command (305), reset it to pose = 0 along the path (306) if it does not (331) check if the SCSI SEND command was issued along the path (360) , 361 resets pose = 0 along the path (362). Otherwise, set pose = 1 along the path (333) and (391) (302).
먼저 (304)에서 SCSIREC명령을 받은 경우를 설명한다. 경로(305)를 따라 (306)에서는 포즈=0으로 출력하여 데이터 전송이 있음을 나타낸다. 다음에는 경로(307)을 따라 (308)에서는 전송되는 데이터 블록의 수와 각 블록당 데이터 바이트수를 버퍼제어부(50)내에 있는 카운터1과 카운터2에 각각 써넣는다. 경로(309)를 따라 (310)에 이르면 신호(108)이 발생했는가, 즉 스레숄드가 사용자 지정 레지스터(107)에 설정된 값보다 커서 링-버퍼로부터 버퍼 출력 버스(32)를 통하여 SCSI 버스 데이터 제어부(24)로 데이터를 읽어 낼 수 있는 가를 판단한다. 그렇지 않으면 경로 (335),(391)를 따라 TERM을 수행하든가 또는 경로 (337)을 따라 (310)에 이르는 대기행동을 수행한다.First, the case where the SCSIREC command is received at 304 is described. Along path 305, 306 outputs a pause = 0 indicating that there is data transmission. Next, at 308 along the path 307, the number of data blocks transmitted and the number of data bytes per block are written to the counter 1 and the counter 2 in the buffer control unit 50, respectively. If path 310 is reached along 310, signal 108 is generated, i.e., the threshold is greater than the value set in user-specified register 107, and thus the SCSI bus data control unit from the ring-buffer through buffer output bus 32; 24) determine whether the data can be read. Otherwise perform TERM along paths 335 and 391 or wait to 310 along path 337.
신호(108)이 발생한 것으로 (310)에서 판단되면 경로(313)을 따라 (314)에 이르러 카운터2를 1만큼 감소시키고 경로(315)를 따라 (316)에서 SEQRES이 발생하지 않았으면 경로(317)을 따라 (318)에서 SREQLS에 따라 다음의 수행을 결정하게 된다. (316)에서 SEQRES가 발생했으면 경로(339),(391)을 따라 리셋되어 대기 상태로 (302)에 이른다. (318)에서는 SREQLS가 발생되지 않았으면 SCSI 버스 데이터 제어부(24)가 데이터를 받을수 있는 상태가 될 때까지 경로(341)을 따라 대기하며, SREQLS가 발생된 경우에는 경로(319)를 따라 (320)에서 주어진 타이밍에 맞추어 1바이트 데이터를 SCSI 버스 데이터 제어부(24)에 보낸다. 그리고 경로(321)을 따라 (322)에서 한 블록의 데이터를 모두 전송했는가 판단한다. 한 블록의 데이터를 모두 전송하지 못한 경우에는 경로(343)(309)를 따라 1바이트 데이터 전송을 반복하며 한 블록의 데이터 전송을 마친 경우에는 경로(323)을 따라 (324)에서 블록 카운트를 1만큼 감소시킨다.If it is determined at 310 that the signal 108 has occurred, then reach 314 along path 313 to decrement counter2 by one and if SEQRES does not occur at 316 along path 315, path 317 ) Determine the next performance according to SREQLS at 318. If SEQRES has occurred at 316, it is reset along paths 339 and 391 to reach 302 in a standby state. At 318, if SREQLS has not been generated, the SCSI bus data controller 24 waits along path 341 until it is ready to receive data, and if SREQLS is generated, along path 319 (320). 1-byte data is sent to the SCSI bus data control section 24 at the timing given by " Then, it is determined whether data of one block is transmitted at 322 along the path 321. If all data of one block is not transmitted, one-byte data transmission is repeated along the paths 343 and 309. If the data transmission of one block is completed, the block count is 1 at 324 along the path 323. Decrease by.
경로(325)을 따라 (326)에 이르면 데이터 전송도중에 패리티 오류가 발생했는가(SDBPER=1)를 검사하고 오류가 발생했으면 경로(345),(391)을 따라 리셋되어 대기상태(302)에 이른다. 그렇지 않은 경우 경로(327)을 따라 (328)에서 남은 데이터 블록이 있은 가를 판단하여, 남았으면 경로(347),(309)를 따라 전송을 반복하며, 그렇지 않으면 경로(329)를 따라 (330)에서 SCSIREC 프로시저가 종료되었는가 판단한다. SCSIREC가 종료되지 않았으면 경로(349),(307)을 따라 새로운 SCSIREC를 수행하며, 그렇지 않으면 경로(351),(391)를 따라 대기상태에 이른다.At 326 along path 325, a parity error has occurred during data transfer (SDBPER = 1), and if an error has occurred, it is reset along paths 345 and 391 to reach standby state 302. . Otherwise, it is determined whether there are any remaining data blocks at 328 along path 327, and if so, repeats the transmission along paths 347 and 309; otherwise, along path 329 (330). Determines if the SCSIREC procedure has finished. If SCSIREC is not terminated, a new SCSIREC is performed along paths 349 and 307; otherwise, a standby state is performed along paths 351 and 391.
다음에는 (360)에서 SCSISEND명령을 받은 경우를 설명한다. 이의 전체적인 수행과정은 SCSIREC와 유사하므로 두 명령사이의 차이점 만을 설명한다. 먼저 SCSISEND명령은 SCSI 버스(22)로부터 데이터를 받아 링-버퍼(34)에 쓰는 일을 행한다. 따라서 (366)에서 신호(110)이 발생했는가, 즉 먼저 링-버퍼(34)에 쓰여져 고속 디스크(20)로 전송 대기중인 데이터를 겹쳐쓰기(overwrite) 않고 데이터를 쓸 수 있는 공백이 링-버퍼(34)에 남아있는 가를 검사한다. (380)에서는 SBPER, 즉 링-버퍼(34)로 전송된 데이터 블록의 전송시 패리티 오류가 발생했는지를 검사하여 적절한 경로로 분기함을 알 수 있다.Next, a case where the SCSISEND command is received at 360 will be described. Its overall implementation is similar to SCSIREC, so it only explains the differences between the two commands. First, the SCSISEND command receives data from the SCSI bus 22 and writes the data to the ring buffer 34. Therefore, at 366, the signal 110 has occurred, i.e., a space in which the data can be written without first overwriting the data waiting to be sent to the ring-buffer 34 and waiting to be transferred to the high speed disk 20 (ring-buffer). Examine the remaining (34). In operation 380, it may be determined that a parity error has occurred during transmission of the data block transmitted to the SBPER, that is, the ring buffer 34, and branches to the appropriate path.
상기와 같이 본 발명은 단일 링-버퍼로 종래의 다중 버퍼를 대체하고, 데이터 전송방법도 단일 링-버퍼에 맞도록 수정하였으며 링-버퍼 사용에 따르는 읽기 지정 레지스터 및 쓰기 지정 레지스터 관련회로를 구현하였다. 특히 스레숄드를 두어 SCSI버스와 디스크의 전송속도 차이에서 오는 데이터 블록간의 대기시간(latency)를 줄일 수 있다. 즉, 종래의 방법보다 버퍼의 개수를 줄이면서도 전송속도 차이의 완충 역할을 보다 원활히 함으로써 그 사용범위를 넓힐 수 있다.As described above, the present invention replaces the conventional multiple buffers with a single ring-buffer, modifies the data transmission method to fit a single ring-buffer, and implements a read designation register and a write designation register related circuit according to the use of the ring buffer. . In particular, thresholds can be used to reduce latency between data blocks resulting from differences in SCSI bus and disk transfer rates. That is, the use range can be widened by reducing the number of buffers and smoothing the buffer of the difference in transmission speed than the conventional method.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019950015801A KR0147709B1 (en) | 1995-06-14 | 1995-06-14 | Data transfer control apparatus using single buffer and its method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019950015801A KR0147709B1 (en) | 1995-06-14 | 1995-06-14 | Data transfer control apparatus using single buffer and its method |
Publications (2)
Publication Number | Publication Date |
---|---|
KR970002655A KR970002655A (en) | 1997-01-28 |
KR0147709B1 true KR0147709B1 (en) | 1998-09-15 |
Family
ID=19417153
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019950015801A Expired - Fee Related KR0147709B1 (en) | 1995-06-14 | 1995-06-14 | Data transfer control apparatus using single buffer and its method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR0147709B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100434335B1 (en) * | 2001-11-27 | 2004-06-04 | 학교법인 한국정보통신학원 | Control Packet and Data Burst Generation Method in Optical Burst Switching Networks |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100275891B1 (en) * | 1997-12-13 | 2001-01-15 | 구자홍 | Interface device of rom drive |
-
1995
- 1995-06-14 KR KR1019950015801A patent/KR0147709B1/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100434335B1 (en) * | 2001-11-27 | 2004-06-04 | 학교법인 한국정보통신학원 | Control Packet and Data Burst Generation Method in Optical Burst Switching Networks |
Also Published As
Publication number | Publication date |
---|---|
KR970002655A (en) | 1997-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0715735B1 (en) | Ata interface architecture employing state machines | |
US7840719B2 (en) | System and program products for facilitating input/output processing by using transport control words to reduce input/output communications | |
US5953352A (en) | Method of checking data integrity for a raid 1 system | |
US7502873B2 (en) | Facilitating access to status and measurement data associated with input/output processing | |
US4965801A (en) | Architectural arrangement for a SCSI disk controller integrated circuit | |
US4843544A (en) | Method and apparatus for controlling data transfers through multiple buffers | |
US5056010A (en) | Pointer based DMA controller | |
JP3407276B2 (en) | Data compression system | |
US6182267B1 (en) | Ensuring accurate data checksum | |
JPS581465B2 (en) | Data signal buffering method | |
US5133078A (en) | Serial frame processing system in which validation and transfer of a frame's data from input buffer to output buffer proceed concurrently | |
US5506958A (en) | Error detection for parallel data transfer between a processor and a peripheral device by comparing regisgers storing a sum of values in bytes of data transferred | |
US6678768B1 (en) | Method and apparatus for configuring redundant array of independent disks (RAID) | |
TWI528183B (en) | Method, computer readable medium and system for performing data transfers for serial ata connections using data transfer rate throttling | |
KR0147709B1 (en) | Data transfer control apparatus using single buffer and its method | |
US20020112205A1 (en) | Techniques for providing data within a data storage system | |
US4460959A (en) | Logic control system including cache memory for CPU-memory transfers | |
US5881250A (en) | Host adapter system including an integrated PCI buffer controller and XOR function circuit | |
KR100638378B1 (en) | System and method for memory structure of disk controller | |
US5867732A (en) | Hardware method for verifying that an area of memory has only zero values | |
US5991861A (en) | Method of enabling and disabling a data function in an integrated circuit | |
US5974530A (en) | Integrated PCI buffer controller and XOR function circuit | |
US6865654B2 (en) | Device for interfacing asynchronous data using first-in-first-out | |
US20070022226A1 (en) | Direct memory access system for iSCSI | |
US20250103525A1 (en) | Navigation device, navigation system including the same and operating method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 19950614 |
|
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 19950614 Comment text: Request for Examination of Application |
|
PG1501 | Laying open of application | ||
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 19980430 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 19980519 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 19980519 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
PR1001 | Payment of annual fee |
Payment date: 20010417 Start annual number: 4 End annual number: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20020417 Start annual number: 5 End annual number: 5 |
|
PR1001 | Payment of annual fee |
Payment date: 20030417 Start annual number: 6 End annual number: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20040326 Start annual number: 7 End annual number: 7 |
|
FPAY | Annual fee payment |
Payment date: 20050422 Year of fee payment: 8 |
|
PR1001 | Payment of annual fee |
Payment date: 20050422 Start annual number: 8 End annual number: 8 |
|
LAPS | Lapse due to unpaid annual fee | ||
PC1903 | Unpaid annual fee |
Termination category: Default of registration fee Termination date: 20070410 |