CN1294494C - System for detecting master USB interface transfer rate and method thereof - Google Patents

System for detecting master USB interface transfer rate and method thereof Download PDF

Info

Publication number
CN1294494C
CN1294494C CNB031431887A CN03143188A CN1294494C CN 1294494 C CN1294494 C CN 1294494C CN B031431887 A CNB031431887 A CN B031431887A CN 03143188 A CN03143188 A CN 03143188A CN 1294494 C CN1294494 C CN 1294494C
Authority
CN
China
Prior art keywords
described
usb
controls chip
peripheral controls
firmware program
Prior art date
Application number
CNB031431887A
Other languages
Chinese (zh)
Other versions
CN1553334A (en
Inventor
刘文涵
宋建福
李冰
Original Assignee
英业达股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 英业达股份有限公司 filed Critical 英业达股份有限公司
Priority to CNB031431887A priority Critical patent/CN1294494C/en
Publication of CN1553334A publication Critical patent/CN1553334A/en
Application granted granted Critical
Publication of CN1294494C publication Critical patent/CN1294494C/en

Links

Abstract

The present invention relates to a system for detecting the transmission rate of a USB interface of a host machine and a method thereof. A test for the transmission rate of a host machine is directly carried out by a storage area in a USB2.0 chip through a firmware program. The system comprise a computer host machine which is composed of a USB controller and a driving module, a controller chip of a periphery device, which is composed of a storing module and a firmware processing module, and a connecting circuit, wherein a USB driver program is firstly started; then, a firmware program of the USB driver program is downloaded to the controller chip of the periphery device; subsequently, the type of the USB controller is determined; then, data is transmitted according to the type of the USB controller to determine transmission time; finally, the transmission rate of the USB controller is determined according to the transmission of the data and the transmission time.

Description

Detect the method for main frame USB interface transfer rate

Technical field

The present invention relates to a kind of method that detects main frame USB interface transfer rate, particularly about a kind of method of directly utilizing the storage area in the USB2.0 chip to carry out the test of usb host transfer rate by firmware program.

Background technology

Data Holding Equipment is the important composition part in the computer equipment, in current various practical applications, the data that the user need store increase gradually, and that the USB storage facilities has is convenient, the data storing characteristics of carrying out of high capacity, two-forty, as the hard disk of USB interface, wherein the peak transfer rate based on the USB1.0 mode is 12Mbps, especially up to 480Mbps, and its capacity is big based on the USB2.0 mode, and volume is little, support hot-swappablely, obtained using very widely.

Exactly because the widespread use of USB storage facilities detects just to become to the transfer rate of the USB interface on the host computer and is even more important, it is the important assurance of the normal operation of USB device.Traditional detection mode, be to carry out the data that detect by storing by external storage device such as hard disks, and carrying out large-scale USB transfer rate when detecting, just need a large amount of hard disk or other external storage device, because the cost of hard disk is very high, and reading writing harddisk may make it damage for a long time, will improve the cost of test virtually like this.

At this moment, just need a kind of method that detects main frame USB interface transfer rate cheaply to address the above problem.

Summary of the invention

In view of this, the present invention addresses the above problem a kind of method that detects main frame USB interface transfer rate that proposed, and directly utilizes the storage area in the USB2.0 chip to carry out the test of usb host transfer rate by firmware program.

The present invention proposes a kind of method that detects main frame USB interface transfer rate, this method comprises the steps: at first to start the USB driver; Then the firmware program in this USB driver is downloaded in the peripheral controls chip, and the type of definite USB controller; Next, according to these USB controller type transmission data, determine the transmission time; Determine at last the transfer rate of this USB controller according to volume of transmitted data and this transmission time.

Compare with existing method, the method of detection main frame USB interface transfer rate provided by the invention, directly utilize the storage area in the USB2.0 chip to carry out the test of usb host transfer rate, required test limit is established peripheral equipment and only is USB2.0 chip and preferred circuit assembly thereof, but not hard disk of the prior art, thereby reduced testing cost to a great extent, effectively avoided the waste of resource.

Description of drawings

Fig. 1 is the overview flow chart of the method for detection main frame USB interface transfer rate of the present invention;

Fig. 2 is the process flow diagram of startup USB driver proposed by the invention;

Fig. 3 downloads in the peripheral controls chip for the firmware program with in this USB driver proposed by the invention and determines the process flow diagram of the type of USB controller;

Fig. 4 is a realization proposed by the invention process flow diagram to the control of peripheral controls chip;

The chip that Fig. 5 receives for basis proposed by the invention is provided with the process flow diagram that the packet situation is carried out corresponding operating;

The chip that Fig. 6 receives once more for basis proposed by the invention is provided with the process flow diagram that the packet situation is carried out corresponding operating;

Fig. 7 is the process flow diagram of this peripheral controls chip being controlled according to this USB controller type proposed by the invention; And

Fig. 8 is the module rack composition of the system of detection main frame USB interface transfer rate proposed by the invention.

Wherein, description of reference numerals is as follows:

Step 110 starts the USB driver

Step 120 downloads to the firmware program in this USB driver in the peripheral controls chip

Step 130 is determined the type of USB controller

Step 140 is determined the transmission time according to these USB controller type transmission data

Step 150 is determined the transfer rate of this USB controller according to volume of transmitted data and this transmission time

Step 210 reads this peripheral controls chip information

Step 220 determines not have firmware program in this peripheral controls chip

Step 310 firmware program restarts this peripheral controls chip after downloading and finishing

Step 320 is carried out this firmware program in this peripheral controls chip

Step 330 reads the peripheral controls chip information again, determines the firmware program in this peripheral controls chip

Step 340 is controlled this peripheral controls chip according to this USB controller type

Step 410 is carried out the firmware program initialization

Step 420 begins to receive the look-at-me of this peripheral controls chip

Step 430 is provided with the packet situation according to the chip that receives and carries out corresponding operating

Step 440 is provided with the packet situation according to the chip that receives once more and carries out corresponding operating

Step 510 is carried out corresponding operating for when receiving this packet according to the content of this packet

Step 520 postpones to continue to prepare to receive this packet after 1 second kind when not receiving this packet

Step 610 is carried out device interrupt request wherein when receiving this packet once more

Step 620 is determined the situation that is provided with that usb bus idle marker and delay are handled when not receiving this packet once more

Step 630 is provided with situation according to this and carries out associative operation

Step 710 is when this usb bus idle marker and postpone to handle when all being provided with, and postpones the processing to this packet

When step 720 is not provided with when this usb bus idle marker, this sign is set then

When step 730 is not provided with when this delay processing, delay then is set handles

810 host computers

811 USB controllers

812 driver modules

820 peripheral controls chips

821 storage modules

822 firmware handle modules

830 connecting circuit

Embodiment

The present invention is described in detail below in conjunction with accompanying drawing:

Illustrate that by Fig. 1 this figure is the overview flow chart of the method for detection main frame USB interface transfer rate of the present invention, is described as follows:

At first start USB driver (step 110); Then the firmware program in this USB driver is downloaded in the peripheral controls chip (step 120); Determine the type (step 130) of USB controller again; Next, according to these USB controller type transmission data, determine the transmission time (step 140); Determine at last the transfer rate (step 150) of this USB controller according to volume of transmitted data and this transmission time.

USB driver (USB Driver) can be the USB driver under Windows or the Linux, decides according to the type of operating system.Wherein, the USBDriver under the Windows operating system can make amendment on the code base that kit provided that cypress company provides, thereby obtains detecting required USB Driver; It is by the dabusb driver that carries in the (SuSE) Linux OS is made amendment that USB Driver under the (SuSE) Linux OS does not have the software program that can directly use, the present invention, thereby obtains detecting required firmware program.

The prior USB standard comprises two kinds of USB1.0 and USB2.0, corresponding different respectively USB controllers.

By the firmware program in the performance period edge equipment controller chip (for example EZ-USB FX2 chip of Cypress company), USB Driver just can control this peripheral controls chip reading of data, and obtain data quantity transmitted and transmission time thus, with transmitted data amount/transmission time, just can detect the transfer rate of this USB controller.

Below, further specify flow process of the present invention.

See also Fig. 2, this figure is the process flow diagram of startup USB driver proposed by the invention, is described as follows:

At first read this peripheral controls chip information (step 210); Determining does not then have firmware program (step 220) in this peripheral controls chip.

This peripheral controls chip can be the USB2.0FX2 chip, and common chip all contains firmware program, and firmware program is in the ROM (read-only memory) (ROM) of imprinting in this chip, but does not have ROM in the USB2.0 chip used in the present invention.

See also Fig. 3, this figure is that the firmware program with in this USB driver proposed by the invention downloads in the peripheral controls chip and the process flow diagram of the type of definite USB controller, is described as follows:

Firmware program restarts this peripheral controls chip (step 310) after downloading and finishing; In this peripheral controls chip, carry out this firmware program (step 320); Again read this peripheral controls chip information, determine the firmware program (step 330) in the peripheral controls chip; According to this USB controller type this peripheral controls chip is controlled (step 340).

Owing to do not have ROM in the USB2.0 chip used in the present invention, do not comprise firmware program, so just can make full use of the characteristic of USB2.0 chip, firmware program in the USB Driver is write direct in the storage area in the FX2, according to this USB controller type, carry out detection then by the storage area that this firmware program is controlled in this FX2.

See also Fig. 4, this figure is the process flow diagram of this peripheral controls chip being controlled according to this USB controller type proposed by the invention, is described as follows:

Carry out firmware program initialization (step 410); Begin to receive the look-at-me (step 420) of this peripheral controls chip; According to the chip that receives the packet situation is set and carries out corresponding operating (step 430); According to the chip that receives once more the packet situation is set and carries out corresponding operating (step 440).

What in fact this firmware program was controlled is the storage area in the FX2 in the USB2.0 chip, because in dissimilar USB controllers, the end points of its FIFO (First In Fist Out) is different, in the firmware program initialization procedure, just need be according to the characteristics of each FIFO end points, carry out allocation of space and correlation buffer setting, thereby realize control, carry out and detect the peripheral controls chip.

See also Fig. 5, this figure is that the chip that basis proposed by the invention receives is provided with the process flow diagram that the packet situation is carried out corresponding operating, is described as follows:

When receiving this packet, carry out corresponding operating (step 510) according to the content of this packet; When not receiving this packet, postpone to continue to prepare to receive this packet (step 520) after 1 second kind.

Content in this packet comprises: relevant informations such as device interrupt request, usb bus idle marker and being provided with of postponing to handle are the important evidence of chip executable operations.

See also Fig. 6, this figure is that the chip that basis proposed by the invention receives once more is provided with the process flow diagram that the packet situation is carried out corresponding operating, is described as follows:

When receiving this packet once more, carry out device interrupt request (step 610) wherein; When not receiving this packet once more, determine that the situation that is provided with (step 620) that usb bus idle marker and delay are handled is provided with situation execution associative operation (step 630) according to this.

See also Fig. 7, this figure proposed by the invention is provided with the process flow diagram that situation is carried out associative operation according to this, is described as follows:

When this usb bus idle marker and postpone to handle when all being provided with, postpone processing (step 710) to this packet; When this usb bus idle marker is not provided with, this sign (step 720) is set then; When this delay processing is not provided with, delay then is set handles (step 730).

See also Fig. 8, this figure is the module rack composition of the system of detection main frame USB interface transfer rate proposed by the invention, as shown in the figure, comprise: the host computer of forming by USB controller 811 and driver module 812 810, the peripheral controls chip of forming by storage module 821 and firmware handle module 822 820, and be used to provide connecting circuit 830 between this host computer and this peripheral controls chip.

Wherein, this peripheral controls chip is a USB2.0 chip peripheral controls chip, this USB controller 811 is used to provide the USB interface of carrying out detection, this driver module 812 is used to generate the firmware program that detection is provided, this storage module 821 is the storage area in the FX2 in the USB2.0 chip, be used to store the firmware program that detection is provided, this firmware handle module 822 is used to carry out this firmware program.

The following describes with two kinds of preferable USB Driver examples.

USB Driver under the Windows operating system makes amendment on the code base that kit provided that cypress company provides, and obtains detecting required USB Driver, and its step is as follows:

(1) the Hex2C software of application and development bag changes firmware program * .hex into c language codes * .c;

(2) * .c is joined in the download array;

(3) before the code of download firmware program, add to judge the peripheral equipment informational function, be the download firmware program or peripheral equipment controlled with decision;

(4) use Windows DDK build program and obtain * .sys USB driver; And

(5) with * .sys and corresponding * .inf document copying to the Windows system directory.

After this program generates,, just firmware program can be downloaded to the storage area in the FX2 in the USB2.0 chip, carry out in the USB2.0 chip by it and finish testing process by carrying out USB Driver.

Not having the USB Driver program that can directly use, the present invention under the (SuSE) Linux OS is by the dabusb driver that carries in the (SuSE) Linux OS being made amendment, obtain detecting required driver, and its step is as follows:

(1) the Hex2C software of application and development bag changes firmware program * .hex into c language codes * .c;

(2) * .c is joined in the download array;

(3) before the code of download firmware program, add to judge the peripheral equipment informational function, be the download firmware program or peripheral equipment controlled with decision;

(4) the product id and the vendorid of our peripheral equipment of interpolation in the dabusb of linux code;

(5) in the probe function, fpga and interface are partly made amendment;

(6) condition that reports an error of modification open function cooperates with our peripheral equipment;

(7) the endpoint setting of bulk transmission is made amendment, use the exchanges data that copy_from_user and copy_to_user carry out driver and application;

(8) application gcc compiles and obtains dabusb.o; And

(9) application scenarios control realizes loading driver.

After this program generates,, just firmware program can be downloaded to the storage area in the FX2 in the USB2.0 chip, carry out in the USB2.0 chip by it and finish testing process by carrying out USB Driver.

The above person only is the present invention's preferred embodiment wherein, is not to be used for limiting practical range of the present invention; Be that all equalizations of doing according to content of the present invention change and improvement, all should belong to claim of the present invention.

Claims (7)

1, a kind of method that detects main frame USB interface transfer rate is characterized in that, described method may further comprise the steps at least:
Start the USB driver;
Firmware program in the described USB driver is downloaded in the peripheral controls chip, and the type of definite USB controller;
According to described USB controller type transmission data, determine the transmission time; And
Determine the transfer rate of described USB controller according to volume of transmitted data and described transmission time.
2, the method for detection main frame USB interface transfer rate as claimed in claim 1 is characterized in that, the step that starts the USB driver is further comprising the steps of:
Read described peripheral controls chip information; And
Determining does not have firmware program in the described peripheral controls chip.
3, the method for detection main frame USB interface transfer rate as claimed in claim 1 is characterized in that, described peripheral controls chip is the USB2.0 chip.
4, the method for detection main frame USB interface transfer rate as claimed in claim 1 is characterized in that, the step that the firmware program in the described USB driver is downloaded to the type of also determining the USB controller in the peripheral controls chip is further comprising the steps of:
Firmware program restarts described peripheral controls chip after downloading and finishing;
In described peripheral controls chip, carry out described firmware program;
Again read the peripheral controls chip information, determine the firmware program in the described peripheral controls chip; And
According to described USB controller type described peripheral controls chip is controlled.
5, the method for detection main frame USB interface transfer rate as claimed in claim 4 is characterized in that, and is further comprising the steps of according to the step that described USB controller type is controlled described peripheral controls chip:
Carry out the firmware program initialization;
Begin to receive the look-at-me of described peripheral controls chip;
When receiving the packet that is provided with according to described peripheral controls chip, carry out corresponding operating according to the content of described packet;
When not receiving described packet, postpone follow-up continued access of a second and receive described packet;
When receiving packet once more, carry out device interrupt request wherein, when not receiving packet once more, the situation that is provided with of determining the usb bus idle marker and postponing to handle, and according to the described situation execution associative operation that is provided with.
6, the method for detection main frame USB interface transfer rate as claimed in claim 5 is characterized in that, the execution firmware program is initialized as the buffer zone end points according to the USB controller, and allocation space is also carried out the correlation buffer setting.
7, the method for detection main frame USB interface transfer rate as claimed in claim 5, it is characterized in that, carry out in the step of associative operation in the situation that is provided with of determining the usb bus idle marker and postponing to handle and according to the described situation that is provided with, described being operating as: when described usb bus idle marker and postpone to handle when all being provided with, postpone processing to described packet; When described usb bus idle marker is not provided with, described sign is set then; When described delay processing is not provided with, delay then is set handles.
CNB031431887A 2003-06-05 2003-06-05 System for detecting master USB interface transfer rate and method thereof CN1294494C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031431887A CN1294494C (en) 2003-06-05 2003-06-05 System for detecting master USB interface transfer rate and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031431887A CN1294494C (en) 2003-06-05 2003-06-05 System for detecting master USB interface transfer rate and method thereof

Publications (2)

Publication Number Publication Date
CN1553334A CN1553334A (en) 2004-12-08
CN1294494C true CN1294494C (en) 2007-01-10

Family

ID=34324054

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031431887A CN1294494C (en) 2003-06-05 2003-06-05 System for detecting master USB interface transfer rate and method thereof

Country Status (1)

Country Link
CN (1) CN1294494C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727375B (en) * 2008-10-22 2012-11-07 英业达集团(天津)电子技术有限公司 System and method for testing new-generation peripheral component interconnect express
CN104267331A (en) * 2014-09-16 2015-01-07 四川和芯微电子股份有限公司 USB chip testing method
CN104317684A (en) * 2014-09-28 2015-01-28 浪潮电子信息产业股份有限公司 Method for synchronously automatic testing of bandwidth and transmission rate of multiple USB (Universal Serial Bus) interfaces
CN104391200A (en) * 2014-11-27 2015-03-04 英业达科技有限公司 Connection port test device
CN106649015A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Testing device and testing method of USB interface

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119190A (en) * 1996-11-06 2000-09-12 Intel Corporation Method to reduce system bus load due to USB bandwidth reclamation
CN1392480A (en) * 2002-06-07 2003-01-22 威盛电子股份有限公司 Method for detecting host controller transmission rate for USB device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119190A (en) * 1996-11-06 2000-09-12 Intel Corporation Method to reduce system bus load due to USB bandwidth reclamation
CN1392480A (en) * 2002-06-07 2003-01-22 威盛电子股份有限公司 Method for detecting host controller transmission rate for USB device

Also Published As

Publication number Publication date
CN1553334A (en) 2004-12-08

Similar Documents

Publication Publication Date Title
JP2015046175A (en) Data storage device
KR101035473B1 (en) Direct boot arrangement using a nand flash memory
CN1230829C (en) Data processing method in large capacity quick electric erasing and writing programmable read-only memory system
US8527744B2 (en) Board module for providing alternative board functions which are not called by UEFI compatible programs for driving platform service in silicon components
CN1277211C (en) Repair method for computer operation system
KR102074329B1 (en) Storage device and data porcessing method thereof
CN1185578C (en) Central processing unit capable of testing and debugging program easily
CN1262927C (en) Data memory unit and data deletion method
CN1324468C (en) Information processor, information processing method, computer readble memory medium
CN1205545C (en) Method of running ramdisk-based microsoft windows 95/98/Me
CN1293466C (en) Implementation of in-system programming to update firmware on memory cards
CN1261868C (en) Method of rapid computer start-up
CN1315042C (en) Method and system for creating and using operation system with optional functions
US20070136555A1 (en) Logically-addressed file storage methods
JP2007257636A (en) Method, system and computer program for allocating dma address space
US8296521B2 (en) Method of configuring non-volatile memory for a hybrid disk drive
KR20140145254A (en) User device including nonvolatile memory device and write method thereof
CN1200342C (en) Command converting device and method
CN1282100C (en) General serial bus-unit controlling method and general serial bus-unit controller
JP2011513823A (en) Extended usage range for memory devices
CN1290005C (en) Installation method of device drive program
CN1262932C (en) Apparatus and method for establishing data transmission mode by recognition of inserting card
US8706952B2 (en) Flash memory storage device, controller thereof, and data programming method thereof
US7240190B2 (en) Resource compatible system for computer system reads compressed filed stored in legacy BIOS and decompresses file using legacy support operating system driver
CN1207851C (en) Apparatus and method for interfacing between modem and memory in mobile station

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070110

Termination date: 20110605