Background technology
SATA (Serial ATA, serial high-order hard disk structure) interface is a kind of new types of data transmission interface, uses the mode of serial transmission.The novel data transmission interface of this kind has higher debugger capacity than traditional parallel transmission interface, and can check the instruction and the data of transmission, can correct when mistake takes place, and has improved reliability of data transmission greatly.
At present the SATA specification have SATA-1 (1.5Gb/s, 150MB/s), SATA-2 (3Gb/s, 300MB/s), also have the SATA-3 that is about to release (6Gb/s, 600MB/s), so how to verify, the function of testing SA TA interface also is very important.
Traditional method of testing all is an external entity apparatus, as rigid disk, solid state hard disc and CD-ROM drive etc.Because the transmission speed of SATA-2 reality has reached 300MB/s, and the external entity device also can't reach this speed at present, as the rigid disk reading speed is 80MB/s (mean value), solid state hard disc (SSD, Solid State Disk) reading speed is 110MB/s (mean value), so the real transmission speed of SATA-2 has been limited by external entity apparatus, can't test out real transmission speed 3Gb/s of SATA-2 or 300MB/s.
In addition, traditional method of testing needs an external entity apparatus, has increased testing cost, and has used external entity apparatus that many shortcomings are arranged, and may produce bad rail and be afraid of that collision, volume are big as hard disk, and solid state hard disc has the restriction of access times etc.
Summary of the invention
In view of above content, be necessary to provide a kind of SATA interface test system, its data available round about circuit replaces external entity apparatus and carries out the test of SATA interface.
Also be necessary to provide a kind of SATA interface test method, its data available round about circuit replaces external entity apparatus and carries out the test of SATA interface.
A kind of SATA interface test system, this system comprises interconnected test computer and data round about circuit, this test computer links to each other with data round about circuit and at least one SATA interface to be measured; This data round about circuit is used to receive the data of this SATA interface transmission to be measured and according to the SATA interface mode of operation that sets in advance described data is returned corresponding SATA interface to be measured; This test computer is used to obtain the data that this data round about circuit returns, according to the data of returning whether with the data consistent that is transferred to the data round about circuit and the data transmitted in the unit interval whether in the scope of setting, to judge that whether SATA interface to be measured is by test.
A kind of SATA interface test method comprises the steps: that (a) provides interconnected test computer, data round about circuit and at least one SATA interface to be measured; (b) when the test beginning, this data round about circuit receives the data of this SATA interface transmission to be measured and according to the SATA interface mode of operation that sets in advance described data is returned corresponding SATA interface to be measured; (c) this test computer obtains the data that this data round about circuit returns, according to the data of returning whether with the data consistent that is transferred to the data round about circuit and the data transmitted in the unit interval whether in the scope of setting, to judge that whether SATA interface to be measured is by test.
Compared to prior art, described SATA interface test system and method, replace external entity apparatus with the data round about circuit and carry out the test of SATA interface, the transmission speed of SATA interface in test process reached or approaching theoretic maximum transfer speed, improve test accuracy, also reduced testing cost simultaneously.
Embodiment
As shown in Figure 1, be the system architecture diagram of SATA interface test system of the present invention preferred embodiment.This system mainly comprises measurement jig 1, test computer 2 and determinand 3.Wherein, described measurement jig 1 comprises that data round about circuit 10, buffer circuit 11, storer 12, SATA connect interface 13 and external connection interface section 14, have SATA interface 31 to be tested in the described determinand 3.In the present embodiment, described determinand 3 is for disposing the computer motherboard of SATA interface, and in other embodiments, described determinand 3 also can be other electronic installation that disposes the SATA interface.SATA interface 31 in the described determinand 3 connects interface 13 by SATA and links to each other with described measurement jig, and described SATA connection interface 13 provides one or more SATA interfaces to dock with SATA interface 31 in the determinand 3.Described test computer 2 links to each other with described determinand 3 by serial data interface or parallel data grabbing card.
Described SATA connects interface 13 and links to each other with data round about circuit 10 by buffer circuit 11, and described data round about circuit 10 links to each other with external connection interface section 14 by storer 12, and described external connection interface section 14 links to each other with test computer 2.Described data round about circuit 10 (Data Bypass Circuit) is a kind of High Speed ICs (Integrated Circuit, integrated circuit) of programmed, as FPGA (Field Programmable Gate Array, field programmable gate array) etc.Described external connection interface section 14 can be USB interface and RS232 interface etc., sees through described external connection interface section 14, and the user can be provided with the mode of operation of SATA interface in test computer 2, and the SATA interface mode of operation that is provided with is stored in the storer 12.Described storer 12 can be the storer of EEPROM (electricallyerasable ROM (EEROM)) or other form.Described data round about circuit 10 is used for receiving the test data that transmits from the SATA interface 31 of determinand 3, and according to the SATA interface mode of operation that sets in advance, passes described test data back in the determinand 3 corresponding SATA interface 31.When the test data of transmission was excessive, described buffer circuit 11 was used for the test data under temporary a part of data round about circuit 10 storages not.
Described SATA interface mode of operation comprises single head mode of operation and double end mode of operation.As shown in Figure 4, be the synoptic diagram of single head mode of operation.Under the single head mode of operation, the SATA interface of test data from determinand 3 is transferred to the data round about circuit 10 in the measurement jig 1, and then, data round about circuit 10 turns back to original SATA interface with this test data.As shown in Figure 5, be the synoptic diagram of double end mode of operation.Under the double end mode of operation, the SATA interface (SATA interface A) of test data from determinand 3 is transferred to the data round about circuit 10 in the measurement jig 1, then, data round about circuit 10 turns back to this test data the SATA interface (SATA interface B) of other setting.Synoptic diagram when as shown in Figure 6, being the many groups of test SATA interface.The mode of operation that the user can be provided with SATA interface C is the single head mode of operation, and the mode of operation of SATA interface D and SATA interface E is the double end mode of operation.
In the described test computer 2 test procedure 20 is installed, described test procedure 20 is used for the SATA interface 31 of determinand 3 is detected.
As shown in Figure 2, be the functional block diagram of test procedure shown in Fig. 1 20.Described test procedure 20 comprise module 201 be set, start module 202, judge module 203, test module 204 and test result output module 205.The alleged module of the present invention is to finish the computer program code segments of a specific function, be more suitable in describing the implementation of software in computing machine than program, therefore below the present invention to all describing in the software description with module.
Wherein, described the mode of operation that module 201 is used to be provided with all SATA interfaces 31 to be measured is set, and the SATA interface mode of operation that is provided with is stored in the storer 12 in the measurement jig 1 by external connection interface section 14.The mode of operation of described SATA interface comprises single head mode of operation and double end mode of operation.
Described startup module 202 is used to start all SATA interfaces 31.
Described judge module 203 is used to judge whether all the SATA interfaces 31 on the determinand 3 are opened, if there is the SATA interface of not opening 31 on the determinand 3, then judges test crash.
Described judge module 203 is used to also judge whether the mode of operation of all the SATA interfaces 31 on the determinand 3 is correct.Particularly, if the SATA interface mode of operation that sets in advance in the mode of operation of the SATA interface 31 on the determinand 3 and the storer 12 is inconsistent, then judge module 203 judges that the mode of operation of SATA interface 31 is incorrect, test crash.
Described test module 204 is used for according to the SATA interface mode of operation that sets in advance, the SATA interface 31 of test data from determinand 3 is transferred to data round about circuit 10 measurement jig 1, and obtain the data that described data round about circuit 10 returns, calculate the transmission speed of SATA interface according to the test data amount of transmitting in the unit interval.Suppose the test data amount (M bytes) of TD (Transfer Dara) expression transmission, T (Time) represents the transmission time (Sec), and TS (Transfer Speed) represents transmission speed (M bytes/Sec), then TS=TD/T.
Described judge module 203 is used to also judge whether test result meets the requirements.Particularly, described judge module 203 judges whether the test data that is transferred to data round about circuit 10 is consistent with the data of returning from described data round about circuit 10, reaches to judge that SATA interface transmission speed that described test module 204 calculates is whether in the scope of setting.If test data that is transferred to data round about circuit 10 and the data consistent that returns from described data round about circuit 10, and the transmission speed of SATA interface is in the scope of setting, then judge module 203 judges that test passes through; If it is inconsistent with the data of returning from described data round about circuit 10 to be transferred to the test data of data round about circuit 10, perhaps the transmission speed of SATA interface is not in the scope of setting, and then judge module 203 is judged test crash.
Described test result output module 205 is used for when test crash the information of output test crash, and when test by the time output test the information of passing through.
As shown in Figure 3, be the process flow diagram of SATA interface test method of the present invention preferred embodiment.At first, step S401 is provided with the mode of operation that module 201 is provided with all SATA interfaces 31 to be measured by described, and by external connection interface section 14 the SATA interface mode of operation that is provided with is stored in the storer 12 in the measurement jig 1.The mode of operation of described SATA interface comprises single head mode of operation and double end mode of operation.
Step S402, described startup module 202 starts all SATA interfaces 31.
Step S403, described judge module 203 judge whether all the SATA interfaces 31 on the determinand 3 are opened, if there is the SATA interface of not opening 31 on the determinand 3, then judge test crash, execution in step S408 is if all the SATA interfaces 31 on the determinand 3 are all opened execution in step S404.
Step S404, described judge module 203 judge whether the mode of operation of all the SATA interfaces 31 on the determinand 3 is correct.Particularly, if the SATA interface mode of operation that sets in advance in the mode of operation of the SATA interface 31 on the determinand 3 and the storer 12 is inconsistent, then judge module 203 judges that the mode of operation of SATA interface 31 is incorrect, test crash, execution in step S408.If the SATA interface mode of operation that sets in advance in the mode of operation of the SATA interface 31 on the determinand 3 and the storer 12 is consistent, then judge module 203 judges that the mode of operation of SATA interfaces 31 is correct, execution in step S405.
Step S405, described test module 204 is according to the SATA interface mode of operation that sets in advance, the SATA interface 31 of test data from determinand 3 is transferred to data round about circuit 10 measurement jig 1, and obtain the data that described data round about circuit 10 returns, calculate the transmission speed of SATA interface according to the test data amount of transmitting in the unit interval.
Step S406, described judge module 203 judges whether test result meets the requirements.Particularly, described judge module 203 judges whether the test data that is transferred to data round about circuit 10 is consistent with the data of returning from described data round about circuit 10, reaches to judge that SATA interface transmission speed that described test module 204 calculates is whether in the scope of setting.If test data that is transferred to data round about circuit 10 and the data consistent that returns from described data round about circuit 10, and the transmission speed of SATA interface is in the scope of setting, then judge module 203 judges that test passes through execution in step S407; If it is inconsistent with the data of returning from described data round about circuit 10 to be transferred to the test data of data round about circuit 10, perhaps the transmission speed of SATA interface is not in the scope of setting, and then judge module 203 is judged test crash, execution in step S408.
Step S407, the information that described test result output module 205 output tests are passed through.
Step S408, the information of described test result output module 205 output test crashs.
It should be noted that at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.