CN100498732C - Universal serial bus device test system and its method - Google Patents

Universal serial bus device test system and its method Download PDF

Info

Publication number
CN100498732C
CN100498732C CNB2007101110348A CN200710111034A CN100498732C CN 100498732 C CN100498732 C CN 100498732C CN B2007101110348 A CNB2007101110348 A CN B2007101110348A CN 200710111034 A CN200710111034 A CN 200710111034A CN 100498732 C CN100498732 C CN 100498732C
Authority
CN
China
Prior art keywords
serial bus
universal serial
general input
bus device
computer system
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.)
Active
Application number
CNB2007101110348A
Other languages
Chinese (zh)
Other versions
CN101059769A (en
Inventor
涂长利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Via Technologies Inc
Original Assignee
Via Technologies Inc
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 Via Technologies Inc filed Critical Via Technologies Inc
Priority to CNB2007101110348A priority Critical patent/CN100498732C/en
Publication of CN101059769A publication Critical patent/CN101059769A/en
Application granted granted Critical
Publication of CN100498732C publication Critical patent/CN100498732C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a test system of general serial bus device and a relative method, in particular to a test system of USB device for using a first computer system to process copy comparison test on USB device, wherein the test system comprises a logic analyzer and a test tool. The logic analyzer detects the storage state of the USB device and generates pulse on a drive signal when the storage operation of the USB device is error. The test tool receives the drive signal and controls a general input/output signal from high potential to low potential when receives the pulse to drive the first computer system to stop the copy comparison test. The invention can effectively drive USB protocol analyzer, without the advantages of information transmission.

Description

The test macro of universal serial bus device and method thereof
Technical field
The invention relates to a kind of USB (universal serial bus) (Universal Serial Bus, USB) Zhuan Zhi test macro, and particularly relevant for a kind of test macro of corresponding transmission information of can be effectively preserving when the USB device operating mistake.
Background technology
(Universal Serial Bus, USB) device has advantages such as plug and play, high supportive and high-transmission efficient and is widely used in the various electronic products, as card reader (Card Reader) because USB (universal serial bus).Much more general see through that computer system links the USB device and executive software repeats the USB device is carried out reproduction ratio to (Copy and Compare) operation, and see through and comprise that logic analyser (LogicAnalyzer) and usb protocol analyser analyze the transmission information that the accessing operation of USB device and demonstration comprise the instruction of USB host-host protocol and data packet respectively.
It is to drive the transmission information of usb protocol analyser reservation corresponding to this accessing operation mistake when logic analyser detects USB device generation accessing operation mistake, and so, the operator can come the USB device is carried out debug according to the transmission information of correspondence.Therefore, how finding out the means that can preserve effectively corresponding to the transmission information of USB device operating mistake is one of direction of constantly endeavouring of industry.
Summary of the invention
The invention relates to a kind of USB (universal serial bus) (Universal Serial Bus, USB) Zhuan Zhi test macro and method thereof, it can improve effectively and remaines in the legacy test system that the transmission information that corresponds to operating mistake in the usb protocol analyser is operated easily that transmission information after the wrong time point covers and the shortcoming that can't preserve effectively can drive the advantage that the usb protocol analyser keeps corresponding transmission information effectively and have in fact.
A kind of test macro of USB device is proposed, in order to the USB device is duplicated contrastive test (Copy and Compare) via first computer system according to the present invention.Test macro comprises usb protocol analytic unit, logic analyser (Logic Analyzer) and measurement jig.First computer system is connected to the USB device via the usb protocol analytic unit, the usb protocol analytic unit is in order to analyzing the USB communications protocol between first computer system and USB device, and this usb protocol analytic unit comprises that one is used to the working storage of the transmission information in the special time before and after the temporary corresponding running time point of each running time point.Logic analyser is in order to the accessing operation of detecting USB device, and produces pulse (Pulse) when the accessing operation that detects the USB device makes a mistake on drive signal.Measurement jig receives drive signal and control general input and output when receiving pulse that (General Purpose Input and Output, GPIO) level of signal becomes low level by high level and stops duplicating contrastive test to drive first computer system.
A kind of method of testing of USB device is proposed according to the present invention, comprise step: provide computer system to come the USB device is duplicated contrastive test, and provide the usb protocol analytic unit to come the USB communications protocol between computer system and USB device is analyzed, wherein this usb protocol analytic unit comprises that one is used to the working storage that each running time point is kept in the transmission information in the corresponding running time point front and back special time; Whether the accessing operation of judging the USB device makes a mistake, and is then to carry out following steps, otherwise repeats this judgement; When making a mistake, the accessing operation of USB device on drive signal, produces pulse; And respond pulse, the level that changes general input/output signal becomes low level by high level and stops to duplicate contrastive test with the control computer system.
The test macro of universal serial bus device of the present invention and method thereof have the advantage that can drive the corresponding transmission information of usb protocol analyser reservation effectively.
Description of drawings
Fig. 1 illustrates the calcspar according to the test macro of the USB device of preferred embodiment of the present invention.
Fig. 2 illustrates the oscillogram of part signal among Fig. 1.
Fig. 3 illustrates the detailed block diagram of measurement jig 128 among Fig. 1.
Fig. 4 illustrates the process flow diagram according to the method for testing of the USB device of preferred embodiment of the present invention.
Embodiment
For foregoing of the present invention can be become apparent, a preferred embodiment cited below particularly, and cooperate appended graphicly, be described in detail below.
(Universal Serial Bus, USB) Zhuan Zhi test macro sees through special measurement jig provides the signal compatible with computer system with the reproduction ratio that stops computer system when the USB device operating mistake and carry out (Copy and Compare) to be operated to the USB (universal serial bus) of present embodiment.
Please refer to Fig. 1 and Fig. 2, Fig. 1 illustrates the calcspar according to the test macro of the USB device of preferred embodiment of the present invention, and Fig. 2 illustrates the oscillogram of part signal among Fig. 1.The test macro 10 of USB device is in order to carry out reproduction ratio to (Copy andCompare) test to the USB device, the test macro 10 of present embodiment sees through USB access USB device so that it is duplicated contrastive test via carried out the computer system 120 of duplicating contrastive test by sequencing.
The USB device for example is a card reader 122 in the present embodiment, and it is connected with the storage card 124 with compatible specification, and the test macro 10 of present embodiment duplicates contrastive test in order to the function of 122 accesses of reading card machine and storage card 124.
Test macro 10 comprises logic analyser (Logic Analyzer) 126, measurement jig 128, usb protocol analyser 130 and computer system 132.Usb protocol analyser 130 respectively via USB12 and 14 and computer system 120 and card reader 122 couple, comprise the transmission information of the instruction of USB communications protocol and data packet with analysis computer system 120 when test macro 10 duplicates contrastive test and 122 of card reader.Usb protocol analyser 130 more comprises working storage (Buffer), is used to the transmission information in the special time before and after the temporary corresponding running time point of each some running time.Computer system 132 is connected to usb protocol analyser 130, in order to the action of being controlled usb protocol analyser 130 by sequencing and the analytic signal that shows correspondence.
Detection pin (not illustrating) corresponding in logic analyser 126 and the storage card 124 is connected, to detect the accessing operation of 124 of card reader 122 and storage cards according to the signal on it.Go up in drive signal Sd when the accessing operation that logic analyser 126 and being used to detects 124 of card reader 122 and storage cards makes a mistake and produce pulse (Pulse) P.Logic analyser 126 for example has BNC connector (Bayonet-Naur Connector) and comes output drive signal Sd to see through coaxial cable (Coaxial Cable).
Measurement jig 128 couples to receive drive signal Sd and to export general input and output (General Purpose Inputand Output, GPIO) signal S_GPIO with logic analyser 126 and computer system 120 respectively.The predetermined level of wherein general input/output signal S_GPIO for example is a high level.And measurement jig 128 more becomes low level to produce falling edge (Falling Edge) in order to the level of controlling general input/output signal S_GPIO in response to the rising edge (Rising Edge) of pulse P by high level.
Computer system 120 comprises that general input and output pin (not illustrating) receives general input/output signal S_GPIO, and computer system 120 is to stop duplicating contrastive test in order to the falling edge (Falling Edge) of being responded the general input/output signal S_GPIO that its general input and output pin receives by sequencing.
The test macro 10 of present embodiment drives computer system 120 via the path that comprises logic analyser 126 and measurement jig 128 and stops duplicating contrastive test when detecting the access errors of 124 of card reader 122 and storage cards, make the USB transmission of 122 of termination computer system 120 and card reader, and the data traffic on USB 12 and 14 approaches zero in fact.So, the transmission information after can avoiding in the usb protocol analyser 130 the temporary transmission information that corresponds to operating mistake by this time point effectively when access errors takes place covers and the problem that can't preserve effectively.So, the test macro 10 of present embodiment can be preserved the transmission information that corresponds to the accessing operation mistake effectively.
Please refer to Fig. 3, it illustrates the detailed block diagram of measurement jig 128 among Fig. 1.Measurement jig 128 for example comprises system-on-a-chip 128a and nonvolatile memory, and wherein nonvolatile memory for example is flash memory 128b.System-on-a-chip 128a comprises general input and output pin 131,133, processor 134 and random access memory 136.General input and output pin 131 and 133 is coupled to computer system 120 and logic analyser 126 respectively.
Processor 134 is respectively input pin and output connecting pin in order to be come setting general-purpose input and output pin 133 and 131 by sequencing, to receive drive signal Sd respectively and to export general input/output signal S_GPIO.Processor 134 is a low level by the next level that changes general input/output signal S_GPIO when general input and output pin 133 receives pulse P of sequencing more.
Wherein store procedure code among the flash memory 128b, and the procedure code of correspondence is stored in the random access memory 136 in order to the execution aforesaid operations.So, the procedure code in the processor 134 execution random access memory 136 is to be carried out above-mentioned operation by sequencing.
In the present embodiment, measurement jig 128 has the hardware configuration identical in fact with card reader 122, and its difference is that the flash memory that wherein comprises has different procedure codes, carries out different operations respectively to drive it.So, measurement jig 128 more for example comprises: USB controller 138, miniature flash memory (CompactFlash, CF) controller 140, intelligent multimedia (SmartMedia, SM)/extreme digital (Extreme Digital, xD) flash memory control 142 and secure digital (SecureDigital, SD)/multimedia card (Multimedia Card, MMC) flash memory control 144 one of them or all, it all is connected with processor 134 through internal bus.
The user is except carrying out reproduction ratio to operation in order to drive the corresponding program of computer system 120 execution in the present embodiment, the user more sees through the software development kit that the system program of computer system 120 provides, (Driver Development Kit, DDK) instrument produces driver and drives computer system 120 and respond the falling edge of the general input/output signal S_GPIO that its general input and output pin receives and stop it and duplicate compare operation the Driver Development external member that provides as Microsoft (Microsoft) operating system.
Please refer to Fig. 4, it illustrates the process flow diagram according to the method for testing of the USB device of preferred embodiment of the present invention.At first as step (a), provide computer system 120 to come the USB device is duplicated contrastive test, the USB device is the card reader 122 that couples with the storage card 124 of corresponding form in the present embodiment.
Then, judge via logic analyser 126 whether the operation of card reader 122 accessing memory cards 124 makes a mistake as step (b); If execution in step (c), logic analyser 126 go up in the drive signal Sd of its output and produce pulse P.Afterwards as step (d), measurement jig 128 is responded the level that pulse P change general input/output signal S_GPIO and is become low level by high level, and exports general input/output signal S_GPIO and stop to duplicate contrastive test to control it to computer system 120.
Wherein step (d) more for example comprises following step, wherein system single chip 128a all duplicates procedure code corresponding among the flash memory 128b to random access memory 136 in each step, and processor 134 is carried out corresponding operation in response to the procedure code of depositing at random in the storer 136.At first as step (d1), system single chip 128a begins to read corresponding procedure code in flash memory 128b, to random access memory 136, and the procedure code that processor 134 is carried out in the random access memory 136 comes to start measurement jig 128 as boot code.
Then as step (d2), processor 134 is come setting general-purpose input and output pin 133 for importing pin to receive drive signal Sd by sequencing.As step (d3), processor 134 is come setting general-purpose input and output pin 131 to be output connecting pin by sequencing then, and to export general input/output signal S_GPIO, the initial level of wherein general input/output signal S_GPIO is a high level.Then as step (d4), processor 134 is judged by sequencing whether general input and output pin 133 receives pulse P; If execution in step (d5), the level that processor 134 is controlled general input/output signal S_GPIO by sequencing becomes low level by high level.
Wherein and in step (d4), if repeated execution of steps (d4) when general input and output pin 133 does not receive pulse P.And in step (b), if repeated execution of steps (b) when the accessing operation of card reader 122 does not make a mistake.
Though be that example is done explanation to the situation of operation only in the present embodiment to produce reproduction ratio that general input/output signal S_GPIO stops computer system 120 with measurement jig 128 that card reader 122 has an identical in fact hardware configuration, so, the measurement jig of using in the present embodiment 128 is not limited to have the same hardware structure with card reader 122, and more can be other structures; As long as measurement jig 128 can produce the technical scope that corresponding general input/output signal S_GPIO person does not all break away from present embodiment in response to the pulse P among the drive signal Sd.
Though be that the situation of card reader 122 is that example is done explanation with the USB device only in the present embodiment, right, the USB device of present embodiment is not limited to card reader 122 and more can be other USB devices.
The test macro of the USB device of present embodiment is to produce general input/output signal in response to logic analyser in response to the drive signal that the accessing operation mistake of card reader provides to have the measurement jig of same hardware structure in fact with card reader to be tested, and stops reproduction ratio that computer system carries out with it (Copy and Compare) operated.So, the test macro of the USB device of present embodiment can improve effectively and remaines in the legacy test system that the transmission information that corresponds to operating mistake in the usb protocol analyser is operated easily that transmission information after the wrong time point covers and the shortcoming that can't preserve effectively can drive the advantage that the usb protocol analyser keeps corresponding transmission information effectively and have in fact.
The above only is preferred embodiment of the present invention; so it is not in order to limit scope of the present invention; any personnel that are familiar with this technology; without departing from the spirit and scope of the present invention; can do further improvement and variation on this basis, so the scope that claims were defined that protection scope of the present invention is worked as with the application is as the criterion.
Being simply described as follows of symbol in the accompanying drawing:
The test macro of 10:USB device
12、14:USB
120,132: computer system
122: card reader
124: storage card
126: logic analyser
128: measurement jig
128a: system single chip
128b: flash memory
The 130:USB protocol analyzer
131,133: general input and output pin
134: processor
136: random access memory
The 138:USB controller
140,142,144:CF controller, SM/xD controller, SD/MMC controller

Claims (6)

1. the test macro of a universal serial bus device, is characterized in that this test macro comprises in order to via one first computer system one universal serial bus device is duplicated contrastive test:
One usb protocol analytic unit, this first computer system is connected to this universal serial bus device via this usb protocol analytic unit, this usb protocol analytic unit is in order to analyzing the USB communications protocol between this first computer system and this universal serial bus device, and this usb protocol analytic unit comprises that one is used to the working storage of the transmission information in the special time before and after the temporary corresponding running time point of each running time point;
One logic analyser in order to detecting the accessing operation of this universal serial bus device, and produces a pulse on a drive signal when the accessing operation that detects this universal serial bus device makes a mistake; And
One measurement jig, the level that receives this drive signal and control a general input/output signal when receiving this pulse becomes low level by high level, stops duplicating contrastive test to drive this first computer system.
2. the test macro of universal serial bus device according to claim 1 is characterized in that, this measurement jig comprises:
One first general input and output pin and one second general input and output pin are coupled to this logic analyser and this first computer system respectively; And
One processor, be respectively input pin and output connecting pin in order to be set this first general input and output pin and this second general input and output pin by sequencing, to receive this drive signal and this general input/output signal of output respectively, this processor and the level that changes this general input/output signal when this first general input and output pin receives this pulse are low level.
3. the test macro of universal serial bus device according to claim 1 is characterized in that, more comprises:
One second computer system is connected to this usb protocol analytic unit, in order to be controlled and to show the analysis operation of this usb protocol analytic unit by sequencing.
4. the test macro of universal serial bus device according to claim 1, it is characterized in that, this first computer system is connected to this universal serial bus device, in order to access one test data in this universal serial bus device certainly, and compare this test data and comparison data and carry out this and duplicate contrastive test.
5. the method for testing of a universal serial bus device is characterized in that, comprising:
Step a: provide a computer system to come a universal serial bus device is duplicated contrastive test, and provide a usb protocol analytic unit to come the USB communications protocol between this computer system and this universal serial bus device is analyzed, wherein this usb protocol analytic unit comprises that one is used to the working storage that each running time point is kept in the transmission information in the corresponding running time point front and back special time;
Step b: whether the accessing operation of judging this universal serial bus device makes a mistake, and is then to carry out following steps c, otherwise repeats this step b;
Step c: when the accessing operation of this universal serial bus device makes a mistake, on a drive signal, produce a pulse; And
Steps d: respond this pulse, the level that changes a general input/output signal becomes low level by high level, stops to duplicate contrastive test to control this computer system.
6. the method for testing of universal serial bus device according to claim 5 is characterized in that, steps d specifically comprises:
Steps d 1: start a measurement jig, this measurement jig comprises one first general input and output pin and one second general input and output pin;
Steps d 2: set this first general input and output pin for importing pin to receive this drive signal;
Steps d 3: setting this second general input and output pin is output connecting pin this general input/output signal with the output high level;
Steps d 4: judge that whether this first general input and output pin receives this pulse, is then to carry out following steps d5, otherwise repeats this steps d 4; And
Steps d 5: the level of controlling this general input/output signal when this first general input and output pin receives this pulse becomes low level by high level.
CNB2007101110348A 2007-06-13 2007-06-13 Universal serial bus device test system and its method Active CN100498732C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101110348A CN100498732C (en) 2007-06-13 2007-06-13 Universal serial bus device test system and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101110348A CN100498732C (en) 2007-06-13 2007-06-13 Universal serial bus device test system and its method

Publications (2)

Publication Number Publication Date
CN101059769A CN101059769A (en) 2007-10-24
CN100498732C true CN100498732C (en) 2009-06-10

Family

ID=38865886

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101110348A Active CN100498732C (en) 2007-06-13 2007-06-13 Universal serial bus device test system and its method

Country Status (1)

Country Link
CN (1) CN100498732C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136083A (en) * 2011-11-29 2013-06-05 鸿富锦精密工业(深圳)有限公司 Test device and test method of universal serial bus
CN104714872B (en) * 2015-04-10 2017-03-15 南车株洲电力机车研究所有限公司 A kind of vehicle-mounted USB device performance test methods
CN106294264B (en) * 2015-05-15 2019-11-12 聚晶半导体股份有限公司 Packet data analysis method and packet data analysis system
CN109254937B (en) * 2018-07-19 2021-08-06 芯启源(上海)半导体科技有限公司 USB hub, USB device enumeration exception detection method and computer storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230290B1 (en) * 1997-07-02 2001-05-08 International Business Machines Corporation Method of self programmed built in self test
CN1402323A (en) * 2002-09-02 2003-03-12 威盛电子股份有限公司 Embedded internal storage test platform device and testing method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6230290B1 (en) * 1997-07-02 2001-05-08 International Business Machines Corporation Method of self programmed built in self test
CN1402323A (en) * 2002-09-02 2003-03-12 威盛电子股份有限公司 Embedded internal storage test platform device and testing method

Also Published As

Publication number Publication date
CN101059769A (en) 2007-10-24

Similar Documents

Publication Publication Date Title
US10929260B2 (en) Traffic capture and debugging tools for identifying root causes of device failure during automated testing
US6393588B1 (en) Testing of USB hub
CN111104269B (en) UART interface-based processor debugging method and system
US8230285B2 (en) Protocol analyzer for consumer electronics
US20040202015A1 (en) SDIO card development system
CN110058147B (en) Chip testing system and method based on fpga
CN111045964B (en) PCIE interface-based high-speed transmission method, storage medium and terminal
US8127190B2 (en) Sampling a device bus
US20130111268A1 (en) Testing device capable of simulating plugging and unplugging operations and method thereof
CN100498732C (en) Universal serial bus device test system and its method
CN114281624A (en) Method, system, device and equipment for testing I2C signal integrity
CN113010188B (en) Modular measurement and control system generation method and device, computer equipment and memory
CN110798370A (en) Bus protocol debugging method and device based on universal interface and terminal equipment
CN112395144A (en) Test method, test system, terminal equipment and readable storage medium
CN116663490A (en) Verification method, platform, device and medium of asynchronous memory chip
CN102305906B (en) Chip testing method and device
US20070265822A1 (en) Data processing system and method
US20030037257A1 (en) Debugging device
CN100511172C (en) Inter-board transparent transmission bus test device and method thereof
CN101206613A (en) High speed basic input/output system debug card
TWI361351B (en) Testing system of universal serial bus device and method thereof
CN109783417B (en) Serial port communication device and method
CN101162439A (en) Method for realizing hardware register based on built-in applied system
CN111415508A (en) Test equipment for simulating remote controller
CN1581063A (en) CPU card chip measuring method

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