Background technology
High-speed data recording is communicated by letter and is had important status in (news) with being stored in scientific research and modern data, in fields such as the big system of test, data communication, scientific experimentation, video editings, all needs to adopt the high-speed data memory device.Present magnanimity recording storage equipment is Disk Array and magnetic tape recorder normally, the memory capacity of tape is big but speed is slower, the speed of disk is higher, especially with scsi interface (Small Computer System Interface, small computer system interface) disk is for very, disk size is also increasing, can be easily constitutes a high-speed high capacity storage system in the mode of disk array.
But in the past general SCSI card or the embedded methods of adopting of disk storage system realize more, general SCSI card must directly be managed by main frame, the topological structure that is limited to the common computer system, not only take a lot of times of CPU and I/O passage, reduced the average transmission efficient of disk, and real-time is difficult to guarantee.And present embedded disk storage device, although can guarantee that real-time lacks and the dirigibility of main-machine communication.
No matter disk storage system adopts in the past general SCSI card still be that embedded method realizes, employing all are special chips, at the specific function demand time, design and lack dirigibility.Present electronics, the communications industry generally adopt SOC (System OnChip, SOC (system on a chip)) with IP (Intellectual Property, intellecture property) nuclear designs, but also there is not scsi system controller IP kernel at present, can only adopt special chip, function is single-minded, operation underaction, HardwareUpgring inconvenience.
Summary of the invention
The objective of the invention is to solve existing weak point in the above-mentioned technology, a kind of scsi disk pen recorder and method of novelty is provided.The scsi disk pen recorder has the characteristics of embedded and general scsi device concurrently, main frame and peripheral hardware timesharing and scsi disk array apparatus communicate, peripheral hardware is with Embedded mode real time access scsi disk array apparatus, main frame communicates with the scsi disk array apparatus in normal way, and main frame also can communicate, monitor the data and the behavior of peripheral hardware with peripheral hardware.At the technical matters that adopts special chip to exist, all circuit function modules are the form of soft nuclear, adopt Verilog HDL (Verilog Hardware Language, the Verilog hardware description language) designs, have good transplantability, cutting out property and functions expanding ability, can realize on the programming device at the scene easily.
Above-mentioned purpose of the present invention is achieved by the following scheme: towards digital peripherals, scsi disk array apparatus, three I/O ports of main frame, an integrated scsi system controller of supporting three port interconnections in a field programmable device, the scsi system controller is made of scsi disk controller soft nuclear, the soft nuclear of information processing controller, the soft nuclear of pci bus controller, Peripheral Interface controller soft nuclear, the soft nuclear of sdram controller, these soft nuclears are realized with the Verilog hardware description language, realize its hardware capability with field programmable device.Scsi system controller outside respectively with PCI (Peripheral Component Interconnection, peripheral element extension interface) bus interface, by a FIFO with read pointer restore funcitons and Peripheral Interface, by LVTTL-LVDS level transferring chip and scsi disk array apparatus interface, constitute one three port scsi system control card.For improving the performance of host access disk, scsi system controller outside has connected a slice SDRAM conduct at the plate buffer memory.
Peripheral hardware writes Disk Array by the scsi system control card with peripheral data, and while main frame and peripheral communication, record peripheral hardware are write the behavior of the deposit position of disk, the copy data that reads peripheral hardware, monitoring peripheral access Disk Array at every turn.When the peripheral hardware charged timeout or when all record finishes, main frame is by scsi system control card visit disk, and according to the peripheral hardware that the is write down position of depositing at every turn, the reading disk data realize the quick playback of data.
Compared with the prior art, three port I/O topological structure scsi disk pen recorders of this novelty, can guarantee the high-speed real-time of peripheral data storage, main frame can be monitored all data and the behavior of peripheral hardware again easily, also can realize the quick playback of data according to note down visit disk, flexible operation has overcome the non real-time of general SCSI memory device and the problem of embedded SCSI memory device and main-machine communication inconvenience.Scsi system controller in the scsi disk pen recorder, have the characteristics of embedded and general scsi controller concurrently, adopt the form of soft nuclear, realize, overcome the technical matters of scsi controller special chip function singleness, operation underaction, HardwareUpgring inconvenience with field programmable device.
Embodiment
With reference to figure 1, this illustrates the I/O structural drawing of scsi disk pen recorder of the present invention, and peripheral hardware, main frame and scsi disk array apparatus are by three port I/O topological structures of three port scsi system control cards, 1 interconnection.This scsi system control card is its core circuit with field programmable device 2, the integrated scsi system controller of supporting three port interconnections, scsi system controller outside respectively with pci bus interface, by a FIFO with read pointer restore funcitons and Peripheral Interface, by LVTTL-LVDS level transferring chip and scsi disk array apparatus interface, constitute one three port scsi system control card.Peripheral hardware, main frame timesharing visit Disk Array can only support the host access disk maybe can only support the limitation of the simple function of peripheral access disk with the function that breaks through present scsi controller special chip.
With reference to figure 2, this illustrates the internal circuit configuration figure of scsi system controller of the present invention, the scsi system controller comprises scsi disk controller, information processing controller, pci bus controller, Peripheral Interface controller, sdram controller and buffer zone FIFO1, FIFO4, all circuit modules are the form of soft nuclear, realize its circuit function with field programmable device 2.
The data of digital peripherals are controlled by information processing controller, in real time data buffer zone outside sheet is write Disk Array by FIFO1 and scsi disk controller, information processing controller is notified main frame simultaneously, and main frame reads the peripheral hardware operation information, record data deposit position and frame sign thereof.Write in real time in the process of disk at peripheral hardware, main frame is not done any intervention, but main frame can read the copy data of peripheral hardware, all data and the action of monitoring peripheral hardware by FIFO4, and the scsi disk pen recorder can be carried out the dual role that peripheral data deposit in real time and host monitor are shown simultaneously.
After peripheral data has write down, recorded data deposit position when main frame is write disk according to peripheral hardware, by the quick reading disk of information processing controller, data are write SDRAM from disk by scsi disk controller and FIFO3, main frame reads the data among the SDRAM again.
With reference to figure 3, this illustrates the circuit structure diagram of scsi disk controller soft nuclear of the present invention.Scsi disk controller soft nuclear is made of specific implementation SCSI instruction access layer, SCSI transmission protocol layer and SCSI physical connection layer protocol SCSI agreement microcontroller, SCSI information register group, parity checker, digital filter.SCSI agreement microcontroller is to adopt the structure identical with the risc processor control assembly to be realized according to the SCSI agreement, support scsi bus phases such as selection, message input, order, data, message output, state, and the function of communicating by letter with information processing controller is provided.The information register group comprises information output register group and information input register group, information output register group comprises SCSI instruction, the formation of message output register, being used for the register information processing controller waits instruction, the startup person's message sent out to send to target device.Information input register group comprises state and the formation of message input register, is used to deposit state, the input message that target device sends.Digital filter is in order to eliminate the shake that scsi bus signal causes along long parallel cable transmission.Parity checker is used for the information on the SCSI bus is carried out parity checking and produce parity check bit when information is exported.
Fig. 4 is the single stage transition graph that starts the multiple goal SCSI bus that illustrates.For the scsi disk pen recorder, SCSI instruction and message, be defined in the scope that scsi disk is supported, the SCSI instruction is all determined with message, because device has only a main control equipment, thereby the scsi disk controller is when starting SCSI bus visit disk, can remove arbitration phase and choice phase again from.When peripheral hardware makes the scsi disk controller start a disk write operation by the control of Message Processing controller, SCSI bus directly enters the choice phase from idle phase, the scsi disk controller sends to the ID of main control equipment on the SCSI bus with the ID of target device, do not respond if disk is overtime, then bus is got back to idle phase, just can enter the message output stage when disk provides busy signal.The scsi disk controller continues identification message (80h) is sent on the SCSI bus, just carries out retry operation if disk detects parity error, if there is not parity error, main control equipment was set up with being connected of disk, can the entry instruction stage.The scsi disk controller sends to the instruction in the output register group on the SCSI bus according to the order of sequence according to the REQ/ACK handshake, just carries out retry operation if disk detects parity error, if there is not parity error, then can enter data phase.In data transmission procedure, if detecting parity error, disk just carries out retry operation, Magnetic Disk Controller resends the data of peripheral hardware by the data pointer of interrupt notification information processing controller recovery external data impact damper simultaneously, if there is not parity error, after finishing data transmission, bus just gets the hang of the stage.In state phase, if detecting parity error, the scsi disk controller just carries out retry, if there is not parity error, SCSI bus enters the message input phase.At the message input phase, if detecting parity error, the scsi disk controller just carries out retry operation, if there is not parity error, SCSI bus just enters idle phase, a writing task of peripheral hardware just is through with.For the operation that main frame is read disk, the scsi bus phase migration is identical therewith.
With reference to figure 5, this illustrates the circuit structure diagram of the soft nuclear of information processing controller of the present invention.The service object of information processing controller is towards main frame, peripheral hardware, Magnetic Disk Controller, responds specifically that PCI hits, the outer if physical discontinuity pulse of Magnetic Disk Controller, and control assembly generates control signals such as cmd_rdy, mark_ext, retry in good time.When response external was interrupted, PCI hit than peripheral hardware priority of interrupt height, and the scsi disk controller interrupts for PCI access cycle or the peripheral access cycle is normal or the statement of improper end.When being in when writing PCI access cycle, peripheral hardware the intact or pointer of disk task and recovering retry, control assembly provides the mark_ext control signal, and when response PCI instruction or the response peripheral hardware interrupts and its message is made LBA calculates when finishing, provide the cmd_rdy signal, the sequential maker calculated address of Notify Address and with the sequential output of information in the order register heap.
With reference to figure 6, this illustrates the workflow diagram of the soft nuclear of information processing controller of the present invention.After system powers on, by the application program of main frame by driver to the information processing controller essential informations such as the capacity that obtains each scsi disk in the magnetic disc storage instrument system, sector-size that send instructions, these information that read main frame write down and with the disk parameter table of these information writing information processing controllers, set up wide synchronous transmission agreement, storage system is carried out loopback test, abandon control then, wait for the interruption of peripheral hardware information manager by message handler system.
When peripheral hardware is write disk, the peripheral hardware information manager at first obtain desire record the peripheral hardware frame data size and send out interruption to information processing controller, control assembly is had no progeny in removing and being somebody's turn to do, enable totalizer and calculate LBA, size with the frame data of peripheral hardware, LBA and SCSI microcode are combined into the SCSI instruction, sequential address generator calculated address of while, address and SCSI instruction are issued Magnetic Disk Controller according to the order of sequence, control assembly is sent out by pci controller and is interrupted giving main frame simultaneously, main frame is had no progeny in receiving, write down the Frame size of this transmission and deposit data in the position of disk, and read the copy data of peripheral hardware, play the effect of monitoring.Simultaneously, Magnetic Disk Controller starts quick synchronous transmission after accepting instruction, and the data of peripheral hardware are served SCSI bus according to the order of sequence, and waits for the interruption of scsi disk controller.If the SCSI bus state is CHECK CONDITION, send out and interrupt giving information processing controller, the latter is interrupted route with this and is given main frame, and main frame sends REQUEST SENSE instruction and obtains the abortive reason of the current command for analyzing; If this frame data normal transmission finishes, at this moment, Magnetic Disk Controller is sent out and is interrupted giving information processing controller, so the interruption once more of peripheral hardware information manager is handled or waited for to information processing controller, continues the data disk write operation of peripheral hardware.When the address of LBA allowed addressing range greater than the maximum of disk, comparer provided the dr_s signal LBA is put 0, and disk number adds 1, automatically switches to next disk.Information processing is to connect concurrent working by rigid line.
When main frame reads peripheral hardware and is stored in the data of disk, system mask is fallen peripheral hardware and is interrupted, read the data in the disk fast and write the SDRAM buffer memory according to the peripheral hardware deposit position of being write down before, send out interruption pulse by information processing controller again and give pci controller, main frame is had no progeny in receiving, and reads data among the SDRAM with the direct mapping mode of internal memory again.
From the above description as can be known, constitute three port scsi system control cards by scsi system controller and the peripheral chip thereof of supporting three port I/O, Peripheral Interface controller soft nuclear, the soft nuclear of information processing controller, scsi disk controller soft nuclear, pci bus interface controller soft nuclear, the soft nuclear of sdram controller are combined into scsi system controller soft nuclear, scsi system controller soft nuclear is carried out the back comprehensively with adaptive, its configuration data is programmed in the configuring chip of the field programmable device on the scsi system control card by programmable device or online programming mode.Three port scsi system control cards and digital peripherals, scsi disk array apparatus, host interconnection are formed the scsi disk pen recorder.Start computing machine, install driver is write application program and USBDI according to concrete application, just can realize the scsi disk pen recorder of special-purpose.