[go: up one dir, main page]

CN103812607A - Method for simulating packet errors in transmission process of USB 3.0 - Google Patents

Method for simulating packet errors in transmission process of USB 3.0 Download PDF

Info

Publication number
CN103812607A
CN103812607A CN201310651603.3A CN201310651603A CN103812607A CN 103812607 A CN103812607 A CN 103812607A CN 201310651603 A CN201310651603 A CN 201310651603A CN 103812607 A CN103812607 A CN 103812607A
Authority
CN
China
Prior art keywords
bag
adds
packet
error
mismatch piece
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.)
Pending
Application number
CN201310651603.3A
Other languages
Chinese (zh)
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.)
ANHUI HONGZHUANG MICROELECTRONICS Co Ltd
Original Assignee
ANHUI HONGZHUANG MICROELECTRONICS Co Ltd
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 ANHUI HONGZHUANG MICROELECTRONICS Co Ltd filed Critical ANHUI HONGZHUANG MICROELECTRONICS Co Ltd
Priority to CN201310651603.3A priority Critical patent/CN103812607A/en
Publication of CN103812607A publication Critical patent/CN103812607A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for simulating packet errors in transmission process of USB 3.0. According to the method, by designing an error code, the injection of various errors of various packets in the transmission process of USB 3.0 is achieved, so that various error conditions of packets which may occur in the transmission process of USB 3.0 are simulated. The method disclosed by the invention can achieve that the injection of various errors of whole field can be performed on various packets defined in the USB 3.0 protocol, and can be used in functional verification of a USB 3.0 host/device controller IP core, so as to improve the quality and efficiency of verification.

Description

In a kind of USB3.0 of simulation transmitting procedure, contract out wrong method
Technical field
The present invention relates to contract out wrong method in a kind of USB3.0 of simulation transmitting procedure.
Background technology
1, initialism and Key Term definition
USB:Universal Serial Bus, USB.
IP kernel: Intellectual Property core is one section of hardware description language code with particular electrical circuit function, this section of code and concrete integrated circuit technology are irrelevant, produce chip in the middle of can being transplanted to different semiconductor technologies.
LMP:Link Management Packet, link management bag.
TP:Transaction Packet, transaction packet.
DP:Data Packet, packet.
ITP:Isochronous Timestamp Packet, synchronized timestamp bag.
CRC:Cyclic Redundancy Check, cyclic redundancy check (CRC) code.
ACK TP:Acknowledgement Transaction Packet, confirms transaction packet.
2, up to the present, USB technology has successively experienced USB1.0/USB1.1, USB2.0 and USB3.0/USB3.1 three phases altogether.USB2.0 has widened the range of application of USB technology greatly, and progressively becomes the main flow interface of computer.But along with people are day by day urgent to the demand of Large Volume Data transmission, the transmission speed of USB2.0 cannot meet the needs of practical application already, and USB3.0 just arises at the historic moment.The message transmission rate of USB3.0 is 10 times of existing USB2.0, has met the active demand of current people to Large Volume Data transmission, and USB3.0 becomes the most general USB interface by progressively replacing USB2.0.And the core of USB3.0 technology is the design of USB3.0 host/device controller IP kernel at present.
Checking is as the important component part of integrated circuit (IC) design, and it has run through whole design cycle all the time.And functional verification is the core content of integrated circuit verification work, cover all stages of Front-end Design, be the most consuming time in whole checking work be also the most important stage.In current integrated circuit (IC) design, functional verification accounts for the more than 70% of whole design cycle.Have data to show, cause in the middle of the various factors of chip flow failure first, the ratio of logic function mistake is up to more than 60%, and therefore, the importance of functional verification is self-evident.In the modern integrated circuits design that is designed to core with IP kernel, the key that the design efficiency of IP kernel and correctness become and improve integrated circuit (IC) design efficiency, guarantee integrated circuit (IC) design correctness.And the design efficiency of IP kernel and correctness depend primarily on quality and the efficiency of functional verification.Therefore in USB3.0 host/device controller IP kernel R&D process, studying concrete function verification method, is to improve the design efficiency of IP kernel and the key of correctness, has larger practical significance.
Due in actual USB3.0 transmitting procedure, in transmission package, may there are various error situations, as packet loss, CRC check mistake, bag sequence number mistake etc.Therefore need to be in the middle of the functional verification of USB3.0 host/device controller IP kernel, provide a kind of method that is easy to realize to simulate above-mentioned all error situations that may occur, to verify that can USB3.0 host/device controller IP kernel correctly process above-mentioned all error situations that may occur.
Summary of the invention
The technical problem to be solved in the present invention is to provide in a kind of USB3.0 of simulation transmitting procedure and contracts out wrong method.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: in a kind of USB3.0 of simulation transmitting procedure, contract out wrong method, comprise the following steps:
(1) produce normal bag and the error coded corresponding with normal bag by the packet generation module of verification platform;
(2) packet generation module is by normally bag and the error coded corresponding with normal bag send to the bag of verification platform to add mismatch piece;
(3) bag adds mismatch piece and receives after the normal bag and the error coded corresponding with normal bag sending from packet generation module, according to the type of normal bag, the error coded receiving is decoded, and obtains and add wrong key element;
Describedly add wrong key element and comprise Enable, Dppabort/Reserved, Error Field, Error Pattern;
(4) bag adds mismatch piece and judge whether the Enable adding in wrong key element is 1, and if so, bag adds mismatch piece improper value is injected into the field of Error Field appointment, if not, does not add mistake;
(5) bag adds mismatch piece and will send to USB3.0IP core through the erroneous packets that adds fault reason.
As preferably, the described bag of step (3) adds the normal bag that mismatch piece receives and comprises: packet and non-packet.(non-packet only has a beginning order collection; Packet is made up of data packet head and packet load, and data packet head is the same with non-packet all only has one to start order collection, and packet load has a beginning order collection and an afterbody order collection)
Bag adds wrong situation and can be divided into: bag order collection adds mistake, CRC adds mistake and neither add mistake by CRC neither bag order collection adds mistake.Bag order collection adds mistake and has comprised: packet bag order collection adds mistake and non-packet bag order collection adds mistake.Packet bag order collection adds mistake and is also divided into packet afterbody order collection and adds the wrong and non-afterbody order of packet collection and add mistake.
As preferably, the described bag of step (4) adds mismatch piece improper value is injected into the field that Error Field specifies, and specifically comprises the following steps:
1. bag add mismatch piece according to bag type be judged as non-packet, and be judged as non-packet bag order collection according to Error Field and add and stagger the time, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of non-packet bag order collection is added to mistake;
Wherein Error Pattern low four corresponding one by one with four characters of packet bag order collection or non-packet bag order collection.
2. bag add mismatch piece according to bag type be judged as packet, and be judged as packet afterbody order collection according to Error Field and add mistake, judge whether described Dppabort is 1, if, bag adds mismatch piece the normal ending of bag is added to the wrong ending for invalid bag, and if not, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
The ending of described invalid bag is the DPPABORT order collection of USB3.0 protocol definition;
Error Pattern low four corresponding one by one with four characters of packet bag order collection or non-packet bag order collection, wherein Error Pattern low four corresponding one by one with four characters of packet afterbody order collection.
3. bag add mismatch piece according to bag type be judged as packet, and add and stagger the time according to the order collection that Error Field is judged as the non-afterbody of packet, bag adds mismatch piece and judges that successively Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
Error Pattern low four corresponding one by one with four characters of packet bag order collection or non-packet bag order collection, wherein Error Pattern low four corresponding one by one with four characters of the order collection of the non-afterbody of packet.
4. bag adds mismatch piece and is judged as CRC and adds and stagger the time, and bag adds mismatch piece and directly crc value is revised as to improper value;
5. bag adds the judgement of mismatch piece and neither add mistake by CRC neither bag order collection adds mistake, bag adds mismatch piece the value of the field of Error Field appointment is replaced with to the improper value that Error Pattern specifies, then bag adds mismatch piece according to specifically adding wrong position, recalculate CRC-5 or CRC-16, and by the value of the CRC-5 recalculating or the CRC-16 value original CRC-5 of replacement or CRC-16.
The invention has the beneficial effects as follows:
Can simulate the various error situations that in USB3.0 transmitting procedure, bag may occur, and bag add miss journey can by one independently functional module complete, be beneficial to the modularization of the function checking testing platform of USB3.0 host/device controller IP kernel.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Fig. 1 is that the bag of the embodiment of the present invention adds wrong system module schematic diagram;
Fig. 2 is the formal definition of error coded in the embodiment of the present invention;
Description of symbols in Fig. 2: 21-Enable, 22-Reserved, 23-Dppabort/Reserved, 24-Reserved, 25-Error Field, 26-Reserved, 27-Error Pattern.
Fig. 3 is the embodiment of the present invention 1 flow chart;
Fig. 4 is the embodiment of the present invention 2 flow charts;
Fig. 5 is the embodiment of the present invention 3 flow charts;
Fig. 6 is the embodiment of the present invention 4 flow charts;
Fig. 7 is the embodiment of the present invention 5 flow charts;
Fig. 8 is the embodiment of the present invention 6 flow charts;
Fig. 9 is the embodiment of the present invention 7 flow charts.
Embodiment
The present invention proposes in a kind of USB3.0 of simulation transmitting procedure and contract out wrong method, the bag that uses this method to realize adds mismatch piece using the part as the function checking testing platform of USB3.0 host/device controller IP kernel, the excitation that its effect produces various erroneous packets according to checking demand exactly, can correctly process these error situations with checking IP kernel, as shown in Figure 1.First, test platform needs a packet generation module that can produce according to USB3.0 transmission requirement various normal bags, and can produce the error coded corresponding with each bag according to checking demand, then the normal bag producing is offered to bag with corresponding error coded and add mismatch piece, after adding wrong resume module, bag sends to again IP kernel, finally re-use checking module and complete the inspection to IP kernel response, can complete checking demand.
Fig. 2 is the formal definition of error coded in the present invention, comprise: Enable21, Reserved22, Dppabort/Reserved23, Reserved24, Error Field25, Reserved26, Error Pattern27, wherein, Reserved22, Reserved24 and Reserved26 are for retaining position.
In following embodiment, the each field implication of error coded refers to table 1.
Embodiment 1
Fig. 3 is embodiment 1 flow chart, and this embodiment comprises the following steps:
Step 31: the packet generation module by verification platform produces normal bag and the error coded corresponding with normal bag;
Step 32: packet generation module is by normally bag and the error coded corresponding with normal bag send to the bag of verification platform to add mismatch piece;
Step 33: bag adds mismatch piece and receives after the normal bag and the error coded corresponding with normal bag sending from packet generation module, decodes to the error coded receiving according to the type of normal bag, and obtains and add wrong key element;
Describedly add wrong key element and comprise Enable, Dppabort/Reserved, Error Field, Error Pattern;
As preferably, bag described in step 33 adds the normal bag that mismatch piece receives and comprises: packet and non-packet.(non-packet only has a beginning order collection; Packet is made up of data packet head and packet load, and data packet head is the same with non-packet all only has one to start order collection, and packet load has a beginning order collection and an afterbody order collection)
Bag adds wrong situation and can be divided into: bag order collection adds mistake, CRC adds mistake and neither add mistake by CRC neither bag order collection adds mistake.Bag order collection adds mistake and has comprised: packet bag order collection adds mistake and non-packet bag order collection adds mistake.Packet bag order collection adds mistake and is also divided into packet afterbody order collection and adds the wrong and non-afterbody order of packet collection and add mistake.
Step 34: bag adds mismatch piece and judge whether the Enable adding in wrong key element is 1, if so, bag adds mismatch piece improper value is injected into the field of Error Field appointment, if not, does not add mistake;
As preferably, bag described in step 34 adds mismatch piece improper value is injected into the field that Error Field specifies, and comprises the following steps:
1. bag add mismatch piece according to bag type be judged as non-packet, and be judged as non-packet bag order collection according to Error Field and add and stagger the time, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of non-packet bag order collection is added to mistake;
Wherein low four of Error Pattern is one to one with four characters of packet bag order collection or non-packet bag order collection;
2. bag add mismatch piece according to bag type be judged as packet, and be judged as packet afterbody order collection according to Error Field and add mistake, judge whether described Dppabort is 1, if, bag adds mismatch piece the normal ending of bag is added to the wrong ending for invalid bag, and if not, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
The ending of described invalid bag is the DPPABORT order collection of USB3.0 protocol definition;
Low four of Error Pattern is one to one with four characters of packet bag order collection or non-packet bag order collection, wherein Error Pattern low four corresponding one by one with four characters of packet afterbody order collection.
3. bag add mismatch piece according to bag type be judged as packet, and add and stagger the time according to the order collection that Error Field is judged as the non-afterbody of packet, bag adds mismatch piece and judges that successively Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
Low four of Error Pattern is one to one with four characters of packet bag order collection or non-packet bag order collection, wherein Error Pattern low four corresponding one by one with four characters of the order collection of the non-afterbody of packet.
4. bag adds mismatch piece and is judged as CRC and adds and stagger the time, and bag adds mismatch piece and directly crc value is revised as to improper value;
5. bag adds the judgement of mismatch piece and neither add mistake by CRC neither bag order collection adds mistake, bag adds mismatch piece the value of the field of Error Field appointment is replaced with to the improper value that Error Pattern specifies, then bag adds mismatch piece according to specifically adding wrong position, recalculate CRC-5 or CRC-16, and by the value of the CRC-5 recalculating or the CRC-16 value original CRC-5 of replacement or CRC-16.
35: bag adds mismatch piece and will send to USB3.0IP core through the erroneous packets that adds fault reason.
Embodiment 2
Fig. 4 is embodiment 2 flow charts, and this embodiment is for adding mistake by CRC neither wrap order collection in simulation USB3.0 transmitting procedure.This embodiment comprises the following steps:
Step 41: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 42, otherwise wait for;
Preferably, in simulation USB3.0 transmitting procedure, the sequence number (Seq Num) of DP (packet) in Error Field is added to mistake, it is 9 o'clock that sequence number value is added to mistake, and to add the error coded corresponding with normal bag that mismatch piece receives be 0x80300009 to bag.
Step 42: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0x80300009 is decoded, and obtains and adds wrong key element E=1, da/r=0, Error Field=0x03, Error Pattern=0x0009.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 43: bag adds mismatch piece and judge that the Enable adding in wrong key element is 1, the value that bag adds the field that mismatch piece specifies Error Field replaces with the improper value of Error Pat tern appointment;
Wherein, described bag adds the value of field that mismatch piece specifies Error Field and replaces with the improper value that Error Pattern specifies, and is specially: bag adds improper value 9 that mismatch piece specifies Error Pattern carrys out the value of replacement data bag Central Plains Seq Num.
Step 44: bag adds mismatch piece according to specifically adding wrong position, recalculates CRC-5 or CRC-16, and by the value of the CRC-5 recalculating or the CRC-16 value original CRC-5 of replacement or CRC-16.Return to step 41.
Embodiment 3
Fig. 5 is embodiment 3 flow charts, and this embodiment adds mistake for simulating CRC in USB3.0 transmitting procedure, and this embodiment comprises the following steps:
Step 51: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 52, otherwise wait for;
Preferably, in simulation USB3.0 transmitting procedure, the CRC-16 of ACK TP in Error Field (confirmation transaction packet) is added to mistake, to add the error coded corresponding with normal bag that mismatch piece receives be 0x81000000 to bag.
Step 52: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0x81000000 is decoded, and obtains and adds wrong key element E=1, da/r=0, Error Field=0x10, Error Pattern=0x0000.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 53: bag adds mismatch piece and judge that the Enable adding in wrong key element is 1, and bag adds mismatch piece and be judged as CRC-16 and add mistake, wraps and adds mismatch piece and directly CRC-16 value in Error Field is revised as to improper value.Return to step 51.
Wherein, described bag adds mismatch piece and is judged as CRC-16 and adds mistake and judge for 0x10 by judging Error Field value.
Embodiment 4
Fig. 6 is embodiment 4 flow charts, and this embodiment adds mistake for simulating non-packet bag order collection in USB3.0 transmitting procedure, and this embodiment comprises the following steps:
Step 61: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 62, otherwise wait for;
Preferably, in simulation USB3.0 transmitting procedure, non-packet bag order collection in Error Field is added and staggered the time, for example the 2nd character of the HPSTART order collection (beginning of the bag being made up of 4 characters) to Set Link Function LMP (chain circuit function link management bag is set) adds mistake, and to add the error coded that mismatch piece receives be 0x80000002 to bag.
Step 62: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0x80000002 is decoded, and obtains that to add wrong key element be E=1, da/r=0, Error Field=0x00, Error Pattern=0x0002.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 63: bag adds mismatch piece and judges that the Enable adding in wrong key element is 1, and bag adds mismatch piece and is judged as non-packet according to bag type, and be judged as non-packet bag order collection according to Error Field and add and stagger the time, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of non-packet bag order collection is added to mistake.Return to step 61.
Wherein, low four of described Error Pattern is one to one with four characters of non-packet bag order collection.
Wherein, described bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of non-packet bag order collection is added to mistake, be specially: bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern=0x0002's is low four, in the time judging the value of the 2nd of Error Pattern and be 1, bag adds mismatch piece and just the 2nd character of non-packet bag order collection is added to mistake, by the 2nd character change of the HPSTART order collection of Set Link Function link management bag, realization adds mistake.
Embodiment 5
Fig. 7 is embodiment 5 flow charts, and this embodiment adds mistake for simulating packet afterbody order collection in USB3.0 transmitting procedure, and this embodiment comprises the following steps:
Step 71: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 72, otherwise wait for;
Preferably, in simulation USB3.0 transmitting procedure, the afterbody order of packet is integrated to the ending (DPPABORT order collection) that (ending of packet be made up of 4 characters) adds the wrong invalid bag as USB3.0 protocol definition, wrap that to add the error coded that mismatch piece receives be 0xa1600000.
Step 72: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0xa1600000 is decoded, and obtains and adds wrong key element E=1, da/r=1, Error Field=0x16, Error Pattern=0x0000.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 73: bag adds mismatch piece and judges that the Enable adding in wrong key element is 1, and bag adds mismatch piece and is judged as packet according to bag type, and be judged as packet afterbody order collection according to Error Field and add mistake, and judge that described Dppabort is 1, bag adds mismatch piece the ending of normally wrapping is added to the wrong ending for invalid bag.Return to step 71.
Wherein, the ending of described invalid bag is the DPPABORT order collection of USB3.0 protocol definition.
Wherein, described bag adds mismatch piece the ending of normally wrapping is added to the wrong ending for invalid bag, is specially: the normal ending (DPPEND order collection) that bag adds mismatch blocks of data bag adds the ending (DPPABORT order collection) that mistake is invalid bag.
Embodiment 6
Fig. 8 is embodiment 6 flow charts, and this embodiment adds mistake for simulating packet afterbody order collection in USB3.0 transmitting procedure, and this embodiment comprises the following steps:
Step 81: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 82, otherwise wait for;
Preferably, the 3rd character of the afterbody order collection (ending of packet be made up of 4 characters) to packet in simulation USB3.0 transmitting procedure adds mistake, wraps that to add the error coded that mismatch piece receives be 0x81600004.
Step 82: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0x81600004 is decoded, and obtains and adds wrong key element E=1, da/r=0, Error Field=0x16, Error Pattern=0x0004.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 83: bag adds mismatch piece and judges that the Enable adding in wrong key element is 1, and bag adds mismatch piece and is judged as packet according to bag type, and be judged as packet afterbody order collection according to Error Field and add mistake, when judging that described Dppabort is 0, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake.Return to step 81.
Error Pattern low four corresponding one by one with four characters of packet afterbody order collection;
Wherein, described bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake, be specially: bag adds mismatch piece and from low level to a high position, judges successively that Error Pattern=0x0004's is low four, when the 3rd that determines Error Pattern be 1, bag adds mismatch piece the 3rd character value of the afterbody order collection of packet is revised, and realizes and adds mistake.
Embodiment 7
Fig. 9 is embodiment 7 flow charts, and this embodiment is that the order collection of the non-afterbody of packet in simulation USB3.0 transmitting procedure adds mistake, and this embodiment comprises the following steps:
Step 91: when bag adds mismatch piece and receives the normal bag that sends from packet generation module and the error coded corresponding with normal bag, carry out step 92, otherwise wait for;
Preferably, the 4th character of the DPPSTART order collection (beginning of packet load be made up of 4 characters) to packet in simulation USB3.0 transmitting procedure adds mistake, wraps that to add the error coded that mismatch piece receives be 0x81400008.
Step 92: bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, and obtain and add wrong key element Enable21, Dppabort/Reserved22, Error Field25, Error Pattern27;
Wherein, Enable is abbreviated as E, and Dppabort/Reserved is abbreviated as da/r.
Wherein, bag adds mismatch piece decodes to the error coded receiving according to the type of normal bag, error coded 0x81600004 is decoded, and obtains and adds wrong key element E=1, da/r=0, Error Field=0x14, Error Pattern=0x0008.
Wherein, the value that adds the reservation position of wrong key element is all set to 0.
Step 93: bag adds mismatch piece and judges that the Enable adding in wrong key element is 1, and bag adds mismatch piece and is judged as packet according to bag type, and add and stagger the time according to the order collection that Error Field is judged as the non-afterbody of packet, bag adds mismatch piece and judges that successively Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake.Return to step 91.
Error Pattern low four corresponding one by one with four characters of the order collection of the non-afterbody of packet;
Wherein, described bag adds mismatch piece and judges that successively Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake, be specially: bag adds mismatch piece and judges that successively Error Pattern=0x0008's is low four, be 1 when determining the value of the 4th, bag adds mismatch piece by the 4th character change of the DPPSTART order collection of packet, realizes and adds mistake.
Table 1: the each field implication of error coded
Figure BSA0000098621410000131
Figure BSA0000098621410000141
Figure BSA0000098621410000161
Figure BSA0000098621410000171
Figure BSA0000098621410000181
Figure BSA0000098621410000191
Figure BSA0000098621410000201
Figure BSA0000098621410000211
Figure BSA0000098621410000231
Above-described embodiment of the present invention, does not form limiting the scope of the present invention.Any modification of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in claim protection range of the present invention.

Claims (4)

1. simulate in USB3.0 transmitting procedure and contract out a wrong method, it is characterized in that comprising the following steps:
(1) produce normal bag and the error coded corresponding with normal bag by the packet generation module of verification platform;
(2) packet generation module is by normally bag and the error coded corresponding with normal bag send to the bag of verification platform to add mismatch piece;
(3) bag adds mismatch piece and receives after the normal bag and the error coded corresponding with normal bag sending from packet generation module, according to the type of normal bag, the error coded receiving is decoded, and obtains and add wrong key element;
Describedly add wrong key element and comprise Enable, Dppabort/Reserved, Error Field, Error Pattern;
(4) bag adds mismatch piece and judge whether the Enable adding in wrong key element is 1, and if so, bag adds mismatch piece improper value is injected into the field of Error Field appointment, if not, does not add mistake;
(5) bag adds mismatch piece and will send to USB3.0IP core through the erroneous packets that adds fault reason.
2. simulate according to claim 1 in USB3.0 transmitting procedure and contract out wrong method, it is characterized in that: the normal bag that the described bag of step (3) adds the reception of mismatch piece comprises: packet and non-packet.
3. simulate according to claim 1 in USB3.0 transmitting procedure and contract out wrong method, it is characterized in that: the described bag of step (4) adds mismatch piece improper value is injected into the field that Error Field specifies, and specifically comprises the following steps:
1. bag add mismatch piece according to bag type be judged as non-packet, and be judged as non-packet bag order collection according to Error Field and add and stagger the time, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of non-packet bag order collection is added to mistake;
2. bag add mismatch piece according to bag type be judged as packet, and be judged as packet afterbody order collection according to Error Field and add mistake, judge whether described Dppabort is 1, if, bag adds mismatch piece the normal ending of bag is added to the wrong ending for invalid bag, and if not, bag adds mismatch piece and just from low level to a high position, judges successively that Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
3. bag add mismatch piece according to bag type be judged as packet, and add and stagger the time according to the order collection that Error Field is judged as the non-afterbody of packet, bag adds mismatch piece and judges that successively Error Pattern's is low four, in the time determining the value of a certain position and be 1, bag adds mismatch piece and just this character of packet bag order collection is added to mistake;
4. bag adds mismatch piece and is judged as CRC and adds and stagger the time, and bag adds mismatch piece and directly crc value is revised as to improper value;
5. bag adds the judgement of mismatch piece and neither add mistake by CRC neither bag order collection adds mistake, bag adds mismatch piece the value of the field of Error Field appointment is replaced with to the improper value that Error Pattern specifies, then bag adds mismatch piece according to specifically adding wrong position, recalculate CRC-5 or CRC-16, and by the value of the CRC-5 recalculating or the CRC-16 value original CRC-5 of replacement or CRC-16.
4. simulate according to claim 3 in USB3.0 transmitting procedure and contract out wrong method, it is characterized in that: described Error Pattern low four corresponding one by one with four characters of packet bag order collection or non-packet bag order collection; The ending of described invalid bag is the DPPABORT order collection of USB3.0 protocol definition.
CN201310651603.3A 2013-12-04 2013-12-04 Method for simulating packet errors in transmission process of USB 3.0 Pending CN103812607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310651603.3A CN103812607A (en) 2013-12-04 2013-12-04 Method for simulating packet errors in transmission process of USB 3.0

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310651603.3A CN103812607A (en) 2013-12-04 2013-12-04 Method for simulating packet errors in transmission process of USB 3.0

Publications (1)

Publication Number Publication Date
CN103812607A true CN103812607A (en) 2014-05-21

Family

ID=50708862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310651603.3A Pending CN103812607A (en) 2013-12-04 2013-12-04 Method for simulating packet errors in transmission process of USB 3.0

Country Status (1)

Country Link
CN (1) CN103812607A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331351A (en) * 2014-10-23 2015-02-04 东南大学成贤学院 Method for simulating link instruction errors in USB (universal serial bus) transmission process
CN106301994A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 A kind of network service abnormality test method and apparatus
CN114520710A (en) * 2022-01-27 2022-05-20 络源(上海)半导体科技有限公司 USB2.0 protocol five-bit cyclic redundancy check method, device and equipment
WO2022141732A1 (en) * 2020-12-29 2022-07-07 芯启源(上海)半导体科技有限公司 Hardware implementation method based on usb 3.2 protocol 16-bit cyclic redundancy check

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1031930A2 (en) * 1999-01-19 2000-08-30 Sun Microsystems, Inc. Universal serial bus test system
KR20010061526A (en) * 1999-12-28 2001-07-07 박종섭 USB System and method for discriminating peripheral device the same
TWI223745B (en) * 2002-10-25 2004-11-11 Inventec Corp Test method of universal serial bus (USB) port
US20050097403A1 (en) * 2003-10-20 2005-05-05 Ker-Min Chen USB interface and testing method thereof
CN102479137A (en) * 2010-11-30 2012-05-30 亚旭电脑股份有限公司 Detection device and detection method for detecting universal serial bus port of test equipment
CN102591757A (en) * 2011-01-05 2012-07-18 上海华虹集成电路有限责任公司 Verification method and verification environment platform based on intelligent card universal serial bus (IC-USB) interface module of verification methodology (VMM)
CN103309787A (en) * 2013-06-28 2013-09-18 飞天诚信科技股份有限公司 Detection method of nonstandard USB protocol compatibility

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1031930A2 (en) * 1999-01-19 2000-08-30 Sun Microsystems, Inc. Universal serial bus test system
KR20010061526A (en) * 1999-12-28 2001-07-07 박종섭 USB System and method for discriminating peripheral device the same
TWI223745B (en) * 2002-10-25 2004-11-11 Inventec Corp Test method of universal serial bus (USB) port
US20050097403A1 (en) * 2003-10-20 2005-05-05 Ker-Min Chen USB interface and testing method thereof
CN102479137A (en) * 2010-11-30 2012-05-30 亚旭电脑股份有限公司 Detection device and detection method for detecting universal serial bus port of test equipment
CN102591757A (en) * 2011-01-05 2012-07-18 上海华虹集成电路有限责任公司 Verification method and verification environment platform based on intelligent card universal serial bus (IC-USB) interface module of verification methodology (VMM)
CN103309787A (en) * 2013-06-28 2013-09-18 飞天诚信科技股份有限公司 Detection method of nonstandard USB protocol compatibility

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331351A (en) * 2014-10-23 2015-02-04 东南大学成贤学院 Method for simulating link instruction errors in USB (universal serial bus) transmission process
CN106301994A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 A kind of network service abnormality test method and apparatus
CN106301994B (en) * 2015-06-24 2023-11-03 北京京东尚科信息技术有限公司 Network communication abnormity testing method and device
WO2022141732A1 (en) * 2020-12-29 2022-07-07 芯启源(上海)半导体科技有限公司 Hardware implementation method based on usb 3.2 protocol 16-bit cyclic redundancy check
CN114520710A (en) * 2022-01-27 2022-05-20 络源(上海)半导体科技有限公司 USB2.0 protocol five-bit cyclic redundancy check method, device and equipment

Similar Documents

Publication Publication Date Title
CN105205249B (en) A kind of SOC debugging verification systems and its software-hardware synergism method
CN103812607A (en) Method for simulating packet errors in transmission process of USB 3.0
CN109558649B (en) A register single event effect simulation method for aerospace chips
CN103529820A (en) Fault injection testing system and testing method applied to embedded equipment
CN105224702A (en) A kind of layout design method and layout design system
CN101957764A (en) Method for remotely updating remote terminal program
CN114924778B (en) Program upgrading method based on ZYNQ redundancy backup
Shi et al. Software hardware co-simulation and co-verification in safety critical system design
CN108073479A (en) A kind of fault filling method for spaceborne computer reliability demonstration
CN104320224B (en) A kind of reliability communications method based on 1553B buses
CN103870617B (en) Low frequency chip automatic placement and routing method
CN103078740B (en) RFID smart card digital baseband checking system
CN103389923B (en) Random access memory access bus ECC calibration equipment
CN116300800B (en) Signal verification method and device, vehicle and storage medium
CN103378849A (en) Method of chip input and output design
CN102495778B (en) System and method for testing single-packet regular matching logic
CN103391537B (en) Method and device for writing international mobile equipment identify (IMEI) number through mobile terminal
CN115168083A (en) Functional board card, data verification method, data verification device and electronic equipment
CN103144657B (en) Main processing subsystem provided with check plate and used for general trackside safety platform
CN103389924B (en) Be applied to the ECC storage system of random access memory
CN104484256B (en) Method for verifying error correction and detection function of regfile of SPARC V8 processor
CN209182817U (en) Direct fault location board based on 1553B bus protocol layer
CN115831209B (en) A functional verification device and system compatible with RAM read and write logic and ECC logic
CN106100920A (en) A kind of reusable model verification method of network interconnection chip
Kim et al. System-level development and verification of the FlexRay communication controller model based on SystemC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140521

WD01 Invention patent application deemed withdrawn after publication