CN108400903A - A kind of physical layer link status detection method and device - Google Patents

A kind of physical layer link status detection method and device Download PDF

Info

Publication number
CN108400903A
CN108400903A CN201810059570.6A CN201810059570A CN108400903A CN 108400903 A CN108400903 A CN 108400903A CN 201810059570 A CN201810059570 A CN 201810059570A CN 108400903 A CN108400903 A CN 108400903A
Authority
CN
China
Prior art keywords
flag bit
physical layer
layer link
data
high speed
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
CN201810059570.6A
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.)
Jinan Inspur Hi Tech Investment and Development Co Ltd
Original Assignee
Jinan Inspur Hi Tech Investment and Development 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 Jinan Inspur Hi Tech Investment and Development Co Ltd filed Critical Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority to CN201810059570.6A priority Critical patent/CN108400903A/en
Publication of CN108400903A publication Critical patent/CN108400903A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Communication Control (AREA)

Abstract

The present invention provides a kind of physical layer link status detection method and device, this method includes:Detect whether the SATA controller has been established physical layer link;After the physical layer link has been established in the SATA controller, at least one flag bit for the high speed serialization transceiver for including to the SATA controller is detected;According to at least one flag bit be detected as a result, determining whether the physical layer link breaks down;If so, controlling the high speed serialization transceiver transmission link by the control module that the SATA controller includes rebuilds instruction, to re-establish the physical layer link;If not, at least one flag bit for executing the high speed serialization transceiver for including to the SATA controller is detected.This programme can improve the reliability of data transmission.

Description

A kind of physical layer link status detection method and device
Technical field
The present invention relates to field of communication technology, more particularly to a kind of physical layer link status detection method and device.
Background technology
With the continuous development of electronic information technology, data volume to be processed needed for signal processing, data transmission procedure is got over Come it is bigger, it is general at present to use in order to meet high speed, the stability requirement that user proposes data transmission and data storage procedure SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment) controller realizes high speed number According to transmission.SATA controller is divided into application layer, transport layer, link layer and physical layer, the physical layer of SATA controller from top to down Including control module and high speed serialization transceiver, control module and high speed serialization transceiver be responsible for establishing host side and equipment end it Between data transmission physical layer link.SATA controller needs to ensure being normally carried out for data transmission procedure to physical layer The state of link is detected.
Currently, SATA controls are detected physical layer link by application layer, when physical layer link breaks down, lead to Application layer control lower layer functional reduction is crossed, realizes the reconnect of physical layer link.
For the method being detected at present to physical layer link, when physical layer link breaks down, under application layer control When layer function resets, need to restart entire agreement, physical layer link needs the long period that can restore to connection status, this mistake Journey be easy to cause the loss of data, causes the reliability of data transmission relatively low.
Invention content
An embodiment of the present invention provides a kind of physical layer link status detection method and device, can improve data transmission Reliability.
In a first aspect, an embodiment of the present invention provides a kind of physical layer link status detection method, it is applied to serial advanced Technical Appendix SATA controller, including:
Detect whether the SATA controller has been established physical layer link;
After the physical layer link has been established in the SATA controller, the high speed serialization that includes to the SATA controller At least one flag bit of transceiver is detected;
According to at least one flag bit be detected as a result, determine the physical layer link whether occur therefore Barrier;
If so, controlling the high speed serialization transceiver transmission link by the control module that the SATA controller includes Instruction is rebuild, to re-establish the physical layer link;
If not, execute at least one flag bit of the high speed serialization transceiver for including to the SATA controller into Row detection.
Optionally,
At least one flag bit of the high speed serialization transceiver for including to the SATA controller is detected, packet It includes:
To the alignment of data flag bit of the high speed serialization transceiver, link establishment flag bit, transmission rate flag bit and Any one or more in data transmit-receive flag bit are detected, wherein the alignment of data flag bit is described for characterizing The data that high speed serialization transceiver receives include COMMA codes, and the link establishment flag bit is for characterizing the physical layer The connection status of link, the transmission rate flag bit are used for the locked message transmission rate of characterize data communication ends, the number It is used to characterize the state that the high speed serialization transceiver is forwarded data according to transmitting-receiving flag bit.
Optionally,
The result that the basis is detected at least one flag bit determines whether the physical layer link occurs Failure, including:
When at least one flag bit includes the alignment of data flag bit, judge that the alignment of data flag bit is It is no periodically to occur according to the pre-defined period 1, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the link establishment flag bit, the link establishment flag bit is judged Whether numerical value is identical as pre-defined normal value, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the transmission rate flag bit, judge that the transmission rate flag bit is It is no periodically to occur according to pre-defined second round, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the data transmit-receive flag bit, judge that the data transmit-receive flag bit is It is no periodically to occur in pairs according to the pre-defined period 3, if not, determining that the physical layer link breaks down.
Optionally,
The control module for including by the SATA controller controls the high speed serialization transceiver transmission link weight Instruction is built, including:
The high speed serialization transceiver is controlled by the control module, makes the high speed serialization transceiver to external number Corresponding out of band data OOB signals and coding primitive are sent according to communication ends, and receives the link that the data communication ends return Receipt is established, to re-establish the physical layer link.
Optionally,
Determine whether the physical layer link is sent out in the result that the basis is detected at least one flag bit After raw failure, further comprise:
If it is determined that the physical layer link breaks down, the testing result of at least one flag bit is recorded pre- In the journal file first created.
Second aspect, the embodiment of the present invention additionally provide a kind of physical layer link status detection device, are applied to SATA and control Device processed, including:Detection unit, judging unit and execution unit;
The detection unit for detecting whether the SATA controller has been established physical layer link, and is establishing physics At least one flag bit for the high speed serialization transceiver for including to the SATA controller after layer link is detected;
The judging unit, for according to the detection unit at least one flag bit be detected as a result, Determine whether the physical layer link breaks down;
The execution unit, for when the judging unit determines that the physical layer link breaks down, by described The control module that SATA controller includes controls the high speed serialization transceiver transmission link and rebuilds instruction, described to re-establish Physical layer link, and when the judging unit determines that the physical layer link does not break down, trigger the detection unit At least one flag bit for executing the high speed serialization transceiver for including to the SATA controller is detected.
Optionally,
The detection unit, for the alignment of data flag bit of the high speed serialization transceiver, link establishment flag bit, Any one or more in transmission rate flag bit and data transmit-receive flag bit are detected, wherein the alignment of data mark Will position includes COMMA codes for characterizing the data that the high speed serialization transceiver receives, and the link establishment flag bit is used In the connection status for characterizing the physical layer link, the transmission rate flag bit is used for the locked data of characterize data communication ends Transmission rate, the data transmit-receive flag bit is for characterizing the state that the high speed serialization transceiver is forwarded data.
Optionally,
The judging unit, for executing following operation:
When at least one flag bit includes the alignment of data flag bit, judge that the alignment of data flag bit is It is no periodically to occur according to the pre-defined period 1, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the link establishment flag bit, the link establishment flag bit is judged Whether numerical value is identical as pre-defined normal value, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the transmission rate flag bit, judge that the transmission rate flag bit is It is no periodically to occur according to pre-defined second round, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the data transmit-receive flag bit, judge that the data transmit-receive flag bit is It is no periodically to occur in pairs according to the pre-defined period 3, if not, determining that the physical layer link breaks down.
Optionally,
The execution unit, for when the judging unit determines that the physical layer link breaks down, by described Control module controls the high speed serialization transceiver, so that the high speed serialization transceiver is sent to external data communication ends opposite The out of band data OOB signals and coding primitive answered, and the link establishment receipt that the data communication ends return is received, to build again Found the physical layer link.
Optionally,
The physical layer link status detection device further comprises:Recording unit;
The recording unit, for when the judging unit determines that the physical layer link breaks down, by the inspection The testing result that unit is detected at least one flag bit is surveyed to be recorded in the journal file being pre-created.
Provided in an embodiment of the present invention kind of physical layer link status detection method and device, have built up in SATA controller After physical layer link, at least one flag bit for the high speed serialization transceiver for including to SATA controller is detected, according to right The result that each flag bit is detected determines whether physical layer link breaks down, when determining that physical layer link breaks down Afterwards, the control module for including by SATA controls controls high speed serialization transceiver transmission link and rebuilds instruction, to realize physical layer Link re-establishes.When the physical layer link of SATA controller breaks down, SATA controller high speed serial transceiver Flag bit can occur to change accordingly, therefore can determine physical layer chain by detecting the flag bit of high speed serialization transceiver Whether road breaks down, and directly rebuilds instruction in physical layer transmission link after determining that physical layer link breaks down and realizes physics Layer link re-establishes, and due to being not necessarily to restart entire agreement, physical layer link can be made to restore to connecting within a short period of time State reduces the risk of loss of data, so as to improve the reliability of data transmission.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of physical layer link status detection method provided by one embodiment of the present invention;
Fig. 2 is the flow chart of another physical layer link status detection method provided by one embodiment of the present invention;
Fig. 3 is the signal of equipment where a kind of physical layer link status detection device provided by one embodiment of the present invention Figure;
Fig. 4 is a kind of schematic diagram of physical layer link status detection device provided by one embodiment of the present invention;
Fig. 5 is the schematic diagram of another physical layer link status detection device provided by one embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, an embodiment of the present invention provides a kind of physical layer link status detection method, it is applied to SATA (strings Row Advanced Technology Attachment) controller, this method may comprise steps of:
Step 101:Whether detection SATA controller has been established physical layer link;
Step 102:After physical layer link has been established in SATA controller, the high speed serialization that SATA controller includes is received and dispatched At least one flag bit of device is detected;
Step 103:According to at least one flag bit be detected as a result, determine physical layer link whether occur therefore Barrier, if so, step 104 is executed, it is no to then follow the steps 102;
Step 104:The control module control high speed serialization transceiver transmission link reconstruction for including by SATA controller refers to It enables, to re-establish physical layer link.
An embodiment of the present invention provides a kind of physical layer link status detection methods, and physics is had built up in SATA controller After layer link, at least one flag bit for the high speed serialization transceiver for including to SATA controller is detected, according to each The result that flag bit is detected determines whether physical layer link breaks down, after determining that physical layer link breaks down, The control module for including by SATA controls controls high speed serialization transceiver transmission link and rebuilds instruction, to realize physical layer link Re-establish.When the physical layer link of SATA controller breaks down, the mark of SATA controller high speed serial transceiver Will position can occur to change accordingly, therefore can be to determine physical layer link by detecting the flag bit of high speed serialization transceiver It is no to break down, after determining that physical layer link breaks down directly instruction realization physical layer chain is rebuild in physical layer transmission link Road re-establishes, and due to being not necessarily to restart entire agreement, physical layer link can be made to restore to connection status within a short period of time, The risk for reducing loss of data, so as to improve the reliability of data transmission.
It optionally, can be to height as shown in Figure 1, when being detected to the flag bit of high speed serialization transceiver in step 102 In the alignment of data flag bit of fast serial transceiver, link establishment flag bit, transmission rate flag bit and data transmit-receive flag bit Any one or more be detected.Wherein, alignment of data flag bit is for characterizing the number that high speed serialization transceiver receives According to including COMMA codes, link establishment flag bit is used to characterize the connection status of physical layer link, and transmission rate flag bit is used for The locked message transmission rate of characterize data communication ends, data transmit-receive flag bit for characterize high speed serialization transceiver to data into The state of row forwarding.
When different types of failure occurs for the physical layer link of SATA controller, the unlike signal of high speed serialization transceiver Position can occur to change accordingly, therefore be detected to multiple flag bits of high speed serialization transceiver, it may be determined that go out SATA controls The physical layer link of device processed due to various reasons caused by failure, raising the failure of physical layer link is detected it is accurate Property, to carry out link re-establishment in time after physical layer link breaks down, ensure SATA controller to data be transmitted can By property.
When SATA controller is based on FPGA (Field-Programmable Gate Array, field programmable gate array) When platform, the model for the high speed serialization transceiver that SATA controller includes can be RocketIO GTX.Correspondingly, when high speed When the model of serial transceiver can be RocketIO GTX, alignment of data flag bit can be rxcommadet, Rxcommadet represents whether high speed serialization transceiver detects COMMA codes, the synchronization and detection of COMMA codes in receiving data It is to complete the alignment of data;Link establishment flag bit can be rxstatus, and rxstatus represents the detection shape of OOB signals State, OOB signals only work during link establishment, are not in OOB signals in normal course of communications;Transmission Rate indicator position can be sync_det, and sync_det represents the detection to data synchronization primitives, be high-speed serial data communication The middle synchronous mark position for judging equipment end and whether locking transmission rate;Data transmit-receive flag bit can be align_det, align_ Det represents the detection to ALIGN primitive, which exists always in SATA communication process, need to detect transmission simultaneously in pairs Whether end and receiving terminal are occurred by certain clock cycle.
Optionally, as shown in Figure 1, basis determines physical layer chain to the result that each flag bit is detected in step 103 When whether road breaks down, according to the difference of detected flag bit, different criterions is taken, it is specifically as follows:
When each flag bit detected includes alignment of data flag bit, judge alignment of data flag bit whether according to The pre-defined period 1 carries out periodical appearance, if it is judged that can not be gone here and there to high speed according to COMMA codes for no explanation Data received by row transceiver are aligned, and the data that high speed serialization transceiver receives can be caused to cause confusion, therefore Determine that the physical layer link of SATA controller breaks down;
When each flag bit detected includes link establishment flag bit, judge that the numerical value of link establishment flag bit is It is no identical as pre-defined normal value, if it is not the same, illustrating that the data that high speed serialization transceiver receives include link Instruction is created, and in normal course of communications is not in link establishment instruction, so that it is determined that the physical layer link of SATA controller It breaks down;
When each flag bit detected includes transmission rate flag bit, judge transmission rate flag bit whether according to Pre-defined second round carries out periodical appearance, if it is judged that being no, illustrates data communication ends not to transmission speed Rate is locked, and the rate that high speed serialization transceiver receives the rate and data communication ends transmission data of data can be caused obstructed It crosses, causes the loss of data, so that it is determined that the physical layer link of SATA controller breaks down;
When each flag bit detected includes data transmit-receive flag bit, judge data transmit-receive flag bit whether according to The pre-defined period 3 periodically occur in pairs, if it is judged that being no, illustrates that physical layer link is sent out from data Sending end receives data with to the asynchronous progress of data receiver transmission data, can lead to data stack and lose, it is thus determined that The physical layer link of SATA controller breaks down.
According to the difference of detected flag bit, different standards is taken to judge the shape of physical layer link in SATA controller State does not break down when according to the physical layer link of the determining SATA controller of the result being detected to each flag bit When, it determines that the physical layer link of SATA controller does not break down, is determined when according to the testing result of any one flag bit When the physical layer link of SATA controller breaks down, determine that the physical layer link of SATA controller breaks down, it is comprehensive to each The result that a flag bit is detected determines whether physical layer link breaks down, and ensures to SATA controller physical layer link The accuracy that state is detected.
As the model RocketIO GTX of SATA controller high speed serial transceiver, at the same to rxcommadet, This four flag bits of rxstatus, sync_det, align_det are detected, and often pass through one or more clock cycle, detection Whether there are rxcommadet, sync_det, align_det these three flag bits, at the same detect rxstatus numerical value whether For 3 ' b000 of normal value.If any one or more without periodically in rxcommadet, sync_det, align_det Occur or the numerical value of rxstatus is different from normal value, it is determined that the physical layer link of high speed serialization transceiver breaks down.
Optionally, as shown in Figure 1, after step 103 determines that physical layer link breaks down, include by SATA air Control module controls high speed serialization transceiver, so that high speed serialization transceiver is sent to external data communication ends corresponding OOB signals and coding primitive, and receive data communication ends return link establishment receipt, to re-establish physical layer link.
After determining that physical layer link breaks down, high speed serialization transceiver is controlled by control module and is sent specifically OOB signals and specific coding primitive, and the link establishment for receiving the return of external equipment end is drawn, and is handed over external equipment end Mutually, physical layer link is re-established.When physical layer link breaks down, in the physical layer completion closest to bottom hardware interface Data path re-establishes, and restores the normal transmission of data in time, ensures that there are SATA controller relatively reliable data to pass Movement Capabilities.
Optionally, as shown in Figure 1, after step 103 determines that physical layer link breaks down, each flag bit will be carried out The testing result of detection is recorded in journal file common in advance.
It, will be to each after basis determines that physical layer link breaks down to the result that each flag bit is detected each time The testing result that flag bit is detected is recorded in the journal file being pre-created, and object can be subsequently read from journal file The information of reason layer link each flag bit when breaking down each time, convenient the reason of breaking down to physical layer link, divide Analysis.
Below by taking the SATA controller based on FPGA platform as an example, to physical layer link status provided in an embodiment of the present invention Detection method is described in further detail, as shown in Fig. 2, this method may comprise steps of:
Step 201:Detection SATA controller whether physical layer link has been established, if so, execute step 202, otherwise after It is continuous to execute step 201.
In embodiments of the present invention, whether the physical layer link for detecting SATA controller is successfully established, and starts normal Communication, can be detected the flag bit of SATA controller high speed serial transceiver if physical layer link has been established, Step 202 is correspondingly executed, if physical layer link is successfully established not yet, without the flag bit to high speed serialization transceiver It is detected, whether the physical layer link for continuing to detect SATA controller is established, until physical layer link is successfully established.
For example, in SATA controller included high speed serialization transceiver model RocketIO GTX, SATA controller The ends FPGA (host side) are deployed in, are communicated for realizing the data between the ends FPGA and solid state disk end (equipment end).Work as inspection The link establishment success in SATA controller is measured, after the ends FPGA and solid state disk end can be with normal communications, executes step 202, Otherwise step 201 is continued to execute until the link establishment in SATA controller is successful.
Step 202:The flag bit of high speed serialization transceiver is detected.
In embodiments of the present invention, according to the pre-defined period, respectively to each flag bit of high speed serialization transceiver It is detected.
For example, often passing through a clock cycle, to the following four flag bit of SATA controller high speed serial transceiver It is detected, four flag bits are respectively rxcommadet, rxstatus, sync_det and align_det.Wherein, to four When flag bit is detected, whether detection there is rxcommadet, sync_det and align_det in present clock period, And detect the value of rxstatus.
Step 203:Determine whether physical layer link breaks down according to the testing result of each flag bit, if so, holding Row step 204, it is no to then follow the steps 202.
In embodiments of the present invention, after each flag bit to high speed serialization transceiver is detected, according to each It is that flag bit is detected as a result, judging whether the physical layer link of SATA controller breaks down, if it is determined that physical layer chain Road, which is broken down, to be thened follow the steps 204 and re-establishes physical layer link, if it is determined that physical layer link does not break down, and returns Receipt row step 202 continues to be detected the flag bit of high speed serialization transceiver.Wherein, according to each flag bit into When the result of row detection determines whether physical layer link breaks down, object is judged according to the testing result of each flag bit respectively Whether reason layer link breaks down, if judging that physical layer link breaks down according at least one flag bit, it is determined that object Reason layer link breaks down.
For example, often passing through a clock cycle, detect whether rxcommadet, sync_det and align_det occur, And whether the value of detection rxstatus is identical as 3 ' b000 of preset normal value.If rxcommadet, sync_det Do not occur with any one or more in align_det or the value of rxstatus is different from 3 ' b000 of normal value, then It determines that physical layer link breaks down, correspondingly executes step 204;If rxcommadet, sync_det and align_det are equal Occur, and the value of rxstatus is identical as 3 ' b000 of normal value, it is determined that physical layer link does not send failure, correspondingly Execute step 202.
Step 204:High speed serialization transceiver transmission link, which is controlled, by control module rebuilds instruction.
In embodiments of the present invention, after determining that physical layer link breaks down, the control that includes by SATA controller Module controls high speed serialization transceiver, so that high speed serialization transceiver transmission link is rebuild instruction, to re-establish physics Layer link eliminates the failure that physical layer link is occurred.Specifically, high speed serialization transceiver is controlled by controller and sends OOB Signal and coding primitive, and the link establishment receipt of return is received, with resume physical layer link again.
For example, being controlled high speed serialization transceiver by the control module that SATA controls include, high speed serialization is made to receive It sends out device and sends specific OOB signals and specific coding primitive to solid state disk end, interacted with solid state disk end, reconnected Physical layer link between solid state disk end and the ends FPGA.
Step 205:The testing result of each flag bit is recorded in the journal file being pre-created.
In embodiments of the present invention, after re-establishing physical layer link, the detection that each flag bit will be detected As a result it is recorded in the journal file being pre-created.
As shown in Figure 3, Figure 4, an embodiment of the present invention provides a kind of physical layer link status detection devices.Device embodiment It can also be realized by way of hardware or software and hardware combining by software realization.For hardware view, such as Fig. 3 It is shown, it is a kind of hardware structure diagram of equipment where physical layer link status detection device provided in an embodiment of the present invention, in addition to Except processor shown in Fig. 3, memory, network interface and nonvolatile memory, the equipment in embodiment where device is logical It often can also include other hardware, such as be responsible for the forwarding chip of processing message.For implemented in software, as shown in figure 4, making It is by the CPU of equipment where it by corresponding computer journey in nonvolatile memory for the device on a logical meaning Sequence instruction reads what operation in memory was formed.Physical layer link status detection device provided in this embodiment, including:Detection is single Member 401, judging unit 402 and execution unit 403;
Detection unit 401 for detecting whether SATA controller has been established physical layer link, and is establishing physical layer link At least one flag bit for the high speed serialization transceiver for including to SATA controller later is detected;
Judging unit 402, for according to detection unit 401 at least one flag bit be detected as a result, determine object Whether reason layer link breaks down;
Execution unit 403, for when judging unit 402 determines that physical layer link breaks down, passing through SATA controller Including control module control high speed serialization transceiver transmission link rebuild instruction, to re-establish physical layer link, and sentencing When disconnected unit 402 determines that physical layer link does not break down, detection trigger unit 401 executes the height for including to SATA controller At least one flag bit of fast serial transceiver is detected.
Optionally,
Detection unit 401, for the alignment of data flag bit of high speed serialization transceiver, link establishment flag bit, transmission Any one or more in rate indicator position and data transmit-receive flag bit are detected, wherein alignment of data flag bit is used for The data that characterization high speed serialization transceiver receives include COMMA codes, and link establishment flag bit is for characterizing physical layer link Connection status, transmission rate flag bit be used for the locked message transmission rate of characterize data communication ends, data transmit-receive flag bit The state that data are forwarded for characterizing high speed serialization transceiver.
Optionally,
Judging unit 402, for executing following operation:
When at least one flag bit includes alignment of data flag bit, judge alignment of data flag bit whether according to fixed in advance The period 1 of justice periodically occurs, if not, determining that physical layer link breaks down;
When at least one flag bit includes link establishment flag bit, judge link establishment flag bit numerical value whether in advance The normal value first defined is identical, if not, determining that physical layer link breaks down;
When at least one flag bit includes transmission rate flag bit, judge transmission rate flag bit whether according to fixed in advance The second round of justice periodically occurs, if not, determining that physical layer link breaks down;
When at least one flag bit includes data transmit-receive flag bit, judge data transmit-receive flag bit whether according to fixed in advance The period 3 of justice periodically occurs in pairs, if not, determining that physical layer link breaks down.
Optionally,
Execution unit 403, for when judging unit 402 determines that physical layer link breaks down, passing through control module control High speed serialization transceiver processed makes high speed serialization transceiver send corresponding out of band data OOB letters to external data communication ends Number and coding primitive, and receive data communication ends return link establishment receipt, to re-establish physical layer link.
Optionally, on the basis of physical layer link status detection device shown in Fig. 4, as shown in figure 5, this shows physical layer chain Line state detection device further comprises:Recording unit 504;
Recording unit 504, for judging unit 402 determine physical layer link break down when, detection unit 401 is right The testing result that at least one flag bit is detected is recorded in the journal file being pre-created.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention Example is based on same design, and particular content can be found in the narration in the method for the present invention embodiment, and details are not described herein again.
The embodiment of the present invention additionally provides a kind of readable medium, including executes instruction, when the processor of storage control is held When being executed instruction described in row, the storage control executes the physical layer link status detection side that above-mentioned each embodiment provides Method.
The embodiment of the present invention additionally provides a kind of storage control, including:Processor, memory and bus;
The memory is executed instruction for storing, and the processor is connect with the memory by the bus, when When the storage control operation, the processor executes the described of memory storage and executes instruction, so that the storage Controller executes the physical layer link status detection method that above-mentioned each embodiment provides.
In conclusion the physical layer link status detection method and device that each embodiment of the present invention provides, at least have Following advantageous effect:
1, in embodiments of the present invention, after SATA controller has built up physical layer link, include to SATA controllers At least one flag bit of high speed serialization transceiver be detected, determined according to the result being detected to each flag bit Whether physical layer link breaks down, and after determining that physical layer link breaks down, the control module for including is controlled by SATA It controls high speed serialization transceiver transmission link and rebuilds instruction, to realize re-establishing for physical layer link.When SATA controller When physical layer link breaks down, the flag bit of SATA controller high speed serial transceiver can occur to change accordingly, therefore It can determine whether physical layer link breaks down by detecting the flag bit of high speed serialization transceiver, when determining physical layer chain Road directly rebuilds instruction in physical layer transmission link after breaking down and realizes re-establishing for physical layer link, due to being not necessarily to restart Entire agreement can be such that physical layer link restores to connection status within a short period of time, reduce the risk of loss of data, to The reliability of data transmission can be improved.
2, in embodiments of the present invention, when different types of failure occurs for the physical layer link of SATA controller, high speed The unlike signal position of serial transceiver can occur to change accordingly, therefore be examined to multiple flag bits of high speed serialization transceiver It surveys, it may be determined that failure caused by haveing the physical layer link of SATA controller due to various reasons is improved to physical layer link The accuracy that failure is detected ensures SATA controller to carry out link re-establishment in time after physical layer link breaks down The reliability that data are transmitted.
3, in embodiments of the present invention, according to the difference of detected flag bit, different standards is taken to judge that SATA is controlled The state of physical layer link in device, when the physical layer for determining SATA controller according to the result being detected to each flag bit When link does not break down, determine that the physical layer link of SATA controller does not break down, when according to any one mark When the testing result of position determines that the physical layer link of SATA controller breaks down, the physical layer link hair of SATA controller is determined Raw failure, the comprehensive result being detected to each flag bit determine whether physical layer link breaks down, and ensure to SATA The accuracy that controller physical layer link status is detected.
4, in embodiments of the present invention, after determining that physical layer link breaks down, high speed is controlled by control module and is gone here and there Row transceiver sends specific OOB signals and specific coding primitive, and the link establishment for receiving the return of external equipment end is drawn, with External equipment end interacts, and re-establishes physical layer link.When physical layer link breaks down, hard closest to bottom The physical layer of part interface completes re-establishing for data path, restores the normal transmission of data in time, ensures SATA controller tool There are relatively reliable data transmission capabilities.
It should be noted that herein, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment including a series of elements includes not only those elements, But also include other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including There is also other identical factors in the process, method, article or equipment of the element.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or light In the various media that can store program code such as disk.
Finally, it should be noted that:The foregoing is merely presently preferred embodiments of the present invention, is merely to illustrate the skill of the present invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (10)

1. a kind of physical layer link status detection method is applied to Serial Advanced Technology Attachment SATA controller, which is characterized in that Including:
Detect whether the SATA controller has been established physical layer link;
After the physical layer link has been established in the SATA controller, the high speed serialization that the SATA controller includes is received and dispatched At least one flag bit of device is detected;
According to at least one flag bit be detected as a result, determining whether the physical layer link breaks down;
It is rebuild if so, controlling the high speed serialization transceiver transmission link by the control module that the SATA controller includes Instruction, to re-establish the physical layer link;
If not, at least one flag bit for executing the high speed serialization transceiver for including to the SATA controller is examined It surveys.
2. according to the method described in claim 1, it is characterized in that, the high speed serialization for including to the SATA controller is received At least one flag bit of hair device is detected, including:
To the alignment of data flag bit of the high speed serialization transceiver, link establishment flag bit, transmission rate flag bit and data Any one or more being detected in transmitting-receiving flag bit, wherein the alignment of data flag bit is for characterizing the high speed The data that serial transceiver receives include COMMA codes, and the link establishment flag bit is for characterizing the physical layer link Connection status, the transmission rate flag bit is used for the locked message transmission rate of characterize data communication ends, and the data are received Hair flag bit is for characterizing the state that the high speed serialization transceiver is forwarded data.
3. according to the method described in claim 2, it is characterized in that, the basis is detected at least one flag bit Result determine whether the physical layer link breaks down, including:
When at least one flag bit includes the alignment of data flag bit, judge whether the alignment of data flag bit is pressed Periodically occur according to the pre-defined period 1, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the link establishment flag bit, the numerical value of the link establishment flag bit is judged It is whether identical as pre-defined normal value, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the transmission rate flag bit, judge whether the transmission rate flag bit is pressed Periodically occur according to pre-defined second round, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the data transmit-receive flag bit, judge whether the data transmit-receive flag bit is pressed Periodically occur in pairs according to the pre-defined period 3, if not, determining that the physical layer link breaks down.
4. according to the method described in claim 1, it is characterized in that, the control module for including by the SATA controller It controls the high speed serialization transceiver transmission link and rebuilds instruction, including:
The high speed serialization transceiver is controlled by the control module, keeps the high speed serialization transceiver logical to external data Believe that end sends corresponding out of band data OOB signals and coding primitive, and receives the link establishment that the data communication ends return Receipt, to re-establish the physical layer link.
5. according to any method in Claims 1-4, which is characterized in that in the basis at least one mark After the result that will position is detected determines whether the physical layer link breaks down, further comprise:
If it is determined that the physical layer link breaks down, advance wound is recorded in the testing result of at least one flag bit In the journal file built.
6. a kind of physical layer link status detection device is applied to SATA controller, which is characterized in that including:Detection unit is sentenced Disconnected unit and execution unit;
The detection unit for detecting whether the SATA controller has been established physical layer link, and is establishing physical layer chain At least one flag bit for the high speed serialization transceiver for including to the SATA controller after road is detected;
The judging unit, for according to the detection unit at least one flag bit be detected as a result, determine Whether the physical layer link breaks down;
The execution unit, for when the judging unit determines that the physical layer link breaks down, passing through the SATA The control module that controller includes controls the high speed serialization transceiver transmission link and rebuilds instruction, to re-establish the physics Layer link, and when the judging unit determines that the physical layer link does not break down, trigger the detection unit and execute At least one flag bit of the high speed serialization transceiver for including to the SATA controller is detected.
7. device according to claim 6, which is characterized in that
The detection unit, for the alignment of data flag bit of the high speed serialization transceiver, link establishment flag bit, transmission Any one or more in rate indicator position and data transmit-receive flag bit are detected, wherein the alignment of data flag bit Include COMMA codes for characterizing the data that the high speed serialization transceiver receives, the link establishment flag bit is used for table The connection status of the physical layer link is levied, the transmission rate flag bit is used for the locked data transmission of characterize data communication ends Rate, the data transmit-receive flag bit is for characterizing the state that the high speed serialization transceiver is forwarded data.
8. device according to claim 7, which is characterized in that
The judging unit, for executing following operation:
When at least one flag bit includes the alignment of data flag bit, judge whether the alignment of data flag bit is pressed Periodically occur according to the pre-defined period 1, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the link establishment flag bit, the numerical value of the link establishment flag bit is judged It is whether identical as pre-defined normal value, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the transmission rate flag bit, judge whether the transmission rate flag bit is pressed Periodically occur according to pre-defined second round, if not, determining that the physical layer link breaks down;
When at least one flag bit includes the data transmit-receive flag bit, judge whether the data transmit-receive flag bit is pressed Periodically occur in pairs according to the pre-defined period 3, if not, determining that the physical layer link breaks down.
9. device according to claim 6, which is characterized in that
The execution unit, for when the judging unit determines that the physical layer link breaks down, passing through the control Module controls the high speed serialization transceiver, so that the high speed serialization transceiver is sent to external data communication ends corresponding Out of band data OOB signals and coding primitive, and the link establishment receipt that the data communication ends return is received, to re-establish State physical layer link.
10. according to any device in claim 6 to 9, which is characterized in that further comprise:Recording unit;
The recording unit, it is for when the judging unit determines that the physical layer link breaks down, the detection is single The testing result that member is detected at least one flag bit is recorded in the journal file being pre-created.
CN201810059570.6A 2018-01-22 2018-01-22 A kind of physical layer link status detection method and device Pending CN108400903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810059570.6A CN108400903A (en) 2018-01-22 2018-01-22 A kind of physical layer link status detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810059570.6A CN108400903A (en) 2018-01-22 2018-01-22 A kind of physical layer link status detection method and device

Publications (1)

Publication Number Publication Date
CN108400903A true CN108400903A (en) 2018-08-14

Family

ID=63094078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810059570.6A Pending CN108400903A (en) 2018-01-22 2018-01-22 A kind of physical layer link status detection method and device

Country Status (1)

Country Link
CN (1) CN108400903A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379638A (en) * 2018-09-13 2019-02-22 武汉斗鱼网络科技有限公司 A kind of method and mobile terminal linking barrage
CN111654544A (en) * 2020-06-03 2020-09-11 铁将军汽车电子股份有限公司 Vehicle-mounted equipment control host and communication control method thereof
CN111881077A (en) * 2020-07-29 2020-11-03 北京计算机技术及应用研究所 Parameter self-adaptive adjusting method for improving SATA protocol interface stability

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7779308B2 (en) * 2007-06-21 2010-08-17 International Business Machines Corporation Error processing across multiple initiator network
US7992058B2 (en) * 2008-12-16 2011-08-02 Hewlett-Packard Development Company, L.P. Method and apparatus for loopback self testing
CN103325393A (en) * 2012-03-19 2013-09-25 凌阳科技股份有限公司 Data collecting device and method
CN105357147A (en) * 2015-11-30 2016-02-24 北京控制工程研究所 High-speed and high-reliability network-on-chip adapter unit
CN105933143A (en) * 2016-04-11 2016-09-07 浪潮电子信息产业股份有限公司 Link detection method for supporting multi-node high-end computer system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7779308B2 (en) * 2007-06-21 2010-08-17 International Business Machines Corporation Error processing across multiple initiator network
US7992058B2 (en) * 2008-12-16 2011-08-02 Hewlett-Packard Development Company, L.P. Method and apparatus for loopback self testing
CN103325393A (en) * 2012-03-19 2013-09-25 凌阳科技股份有限公司 Data collecting device and method
CN105357147A (en) * 2015-11-30 2016-02-24 北京控制工程研究所 High-speed and high-reliability network-on-chip adapter unit
CN105933143A (en) * 2016-04-11 2016-09-07 浪潮电子信息产业股份有限公司 Link detection method for supporting multi-node high-end computer system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SERIAL ATA INTERNATIONAL ORGANIZATION: "《Serial SATA Revision 2.6》", 15 February 2007 *
XILINX: "《Virtex-5 FPGA Rocket IO GTX Transceiver Wizard v1.7 Getting Started Guide》", 19 April 2010 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379638A (en) * 2018-09-13 2019-02-22 武汉斗鱼网络科技有限公司 A kind of method and mobile terminal linking barrage
CN109379638B (en) * 2018-09-13 2021-01-01 武汉斗鱼网络科技有限公司 Bullet screen linking method and mobile terminal
CN111654544A (en) * 2020-06-03 2020-09-11 铁将军汽车电子股份有限公司 Vehicle-mounted equipment control host and communication control method thereof
CN111881077A (en) * 2020-07-29 2020-11-03 北京计算机技术及应用研究所 Parameter self-adaptive adjusting method for improving SATA protocol interface stability
CN111881077B (en) * 2020-07-29 2024-04-19 北京计算机技术及应用研究所 Parameter self-adaptive adjustment method for improving stability of SATA protocol interface

Similar Documents

Publication Publication Date Title
CN108400903A (en) A kind of physical layer link status detection method and device
US7757020B2 (en) Point-to-point link negotiation method and apparatus
CN101707536B (en) Fault detection method, line card and main control card
CN104618054B (en) Parameter regulation means and device
US7971110B2 (en) System and method for testing a serial attached small computer system interface
US20070179733A1 (en) Methods and apparatus for testing a link between chips
CN102883301B (en) Force method, device and the access controller of client roaming
CN105897507A (en) Node equipment state detection method and node equipment state detection device
CN106878164A (en) A kind of message transmitting method and device
CN108052094A (en) A kind of extension card identification method, device and frequency converter
CN103560898A (en) Port state setting method, and port priority selection method and device
CN110213020A (en) Data transmission method, terminal, system and device based on bluetooth peripheral hardware
CN113255271B (en) Automatic verification system and method for IO pin of chip
WO2014199559A1 (en) Relay apparatus and relay apparatus control method
US11868288B2 (en) Verification system and verification method for Ethernet interface chip
CN109428778B (en) Mainboard network connectivity test method and device
US20220398177A1 (en) Error rate measuring apparatus and error rate measuring method
CN102508754A (en) Method for detecting 1553B communication interface
CN104780123B (en) A kind of network pack receiving and transmitting processing unit and its design method
CN110995533A (en) Ethernet streaming test system
CN112699695B (en) RFID reader-writer software verification device and method and electronic equipment
CN110399103A (en) A kind of condition detection method, system, equipment and computer readable storage medium
CN106100941A (en) Method and device based on distributed system test board intercard communication reliability
CN113194016B (en) CAN bus baud rate self-adaption method and device based on TC387 chip and storage medium
CN108037680A (en) A kind of command processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180814