Selective recovery of PCIe serdes low power exit method and system
By employing a selective recovery method that leverages calibration validity dependencies and resource modification barriers, the problem of shared resource changes affecting PCIe link depth in low-power states is addressed. This reduces unnecessary calibration and verification operations and improves the efficiency and accuracy of the recovery process.
Patent Information
- Application Number
- CN202611511936.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies, under the deep low-power state of PCIe links, cannot effectively distinguish the impact of shared resource changes on parameter groups, leading to unnecessary calibration and verification operations, increased recovery time and simulation resource consumption, and acceptance consistency issues.
By identifying the target physical channel and utilizing calibration validity dependencies and resource modification barriers, selective recovery is performed, calibrating and verifying only the parameter groups affected by changes in shared resources, thus ensuring the accuracy and efficiency of calibration results.
It reduces unnecessary search operations and analog circuit power consumption, lowers the risk of false releases, improves the accuracy and efficiency of the recovery process, and complies with the PIPE protocol and PCIe training process.
Smart Images

Figure CN123178331A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of system control technology, specifically relating to a selective recovery method and system for PCIe SerDes low-power exit. Background Technology
[0002] After a PCIe link enters a deep low-power state, the physical layer needs to reload the equalization parameters, clock recovery parameters, and receive front-end parameters saved before sleep into the analog circuit, and restore the link to a valid operating configuration through calibration and verification. The PIPE interface specification defines the handshake behaviors related to DeepPMReq#, DeepPMAck#, and Restore#, but does not specify the storage format of the PHY context, internal calibration dependencies, or the algorithm for reusing historical parameters.
[0003] One existing approach is to perform a full calibration on all parameter sets of all target channels after wake-up. This approach does not distinguish between parameter sets that are actually affected by changes in shared resources and those that are not, thus extending recovery time and simulation resource consumption to a point where a re-search is practically unnecessary. Another existing approach is to manage recovery status independently for each channel, performing recalibration only on the channel that failed calibration. This approach does not consider the impact of changes in shared resources on adjacent channels that did not directly receive calibration commands.
[0004] Managing recovery status independently for each channel also introduces acceptance consistency issues. Existing solutions typically set a "passed" flag for a channel after successful verification. If the shared resource is subsequently modified, this flag is not removed, potentially leading to results that passed verification based on the old shared resource conditions being incorrectly recognized as valid results. Furthermore, when a calibration task returns, the shared resource version may have changed, and measurement results obtained under the older version may be used as current results for acceptance. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a selective recovery method and system for PCIe SerDes deep low-power exit.
[0006] Firstly, this application provides a selective recovery method for PCIe SerDes deep low-power exit, comprising: responding to a recovery event, determining the target physical channel and restoring the logical context; determining the initial failure range, iteratively expanding the initial failure range using calibration validity dependencies and the set of write resources and disturbed parameter groups for calibration operations to obtain a recovery plan containing parameter groups to be calibrated and parameter groups to be verified, wherein the calibration validity dependencies are distinct from the startup dependencies; before executing resource modifications in the recovery plan, establishing modification barriers and revoking the existing acceptance status of parameter groups affected by the resource modifications, and updating the calibration version of the corresponding resources after the resource modifications are completed; performing actual loading and verification when resources are ready and the protocol phase allows, and confirming the corresponding parameter group only when verification is passed, the parameter version and dependency version are consistent with the current version and there are no related pending modifications; when the parameter group required for the target configuration is confirmed and the protocol configuration is consistent, closing the relevant recovery write and generating a completion handover credential, and mapping the completion handover credential to the completion notification path of the current round of actual recovery operations through the protocol coordination unit.
[0007] In one possible implementation, the entries for the calibration validity dependency include a source object, a target parameter set, a change determination condition, and a treatment category; the treatment category includes recalibrated verification and re-verification using candidate parameters; the source object includes a shared resource or parameter set, and the change determination condition is associated with a calibrated equivalent condition.
[0008] In one possible implementation, an operation descriptor is set for the calibration operation, the operation descriptor including a set of write resources, a set of disturbed parameter groups, and a preceding calibration operation; the iterative expansion includes: merging the set of write resources of the selected calibration operation into the change set, merging the set of disturbed parameter groups into the set to be verified, propagating the change set along the calibration validity dependency, and repeating until the set no longer increases.
[0009] In one possible implementation, an atomic ordering is established between resource write permission, parameter group acceptance commit, and completion handover credential commit; the resource executor modifies the resource only after the modification barrier takes effect and the currently valid write permission is obtained; version comparison and acceptance status writes are committed transactions that cannot be inserted by related write operations; related recovery write admissions are closed and issued write permissions are emptied before completion handover credential commit.
[0010] In one possible implementation, the verification record includes the recovery generation, task identifier, parameter group version, dependency version vector, and measurement applicability; the recovery generation is used to isolate different recovery processes; the calibration version adopts a monotonically increasing sequence number, and the calibration version does not roll back when the parameter value is restored to the previous value; old references are cleared or the isolation reset of the relevant producer is completed before any identifier is reused.
[0011] In one possible implementation, the transmit equalization protocol configuration and its physical layer execution mirror owned by the PCIe controller are stored and controlled separately from the physical layer local transmit simulation calibration parameters; the address mask written for private recovery does not include the transmit equalization command area; local transmit simulation candidates are associated with the applicable protocol request sequence number, and submission is prohibited when the sequence number mismatches; the receiver-side rollback does not overwrite the currently valid transmit settings.
[0012] In one possible implementation, for updates that require interruption to receive and restore the clock, RxValid is first revoked during the permitted protocol phase. The update is then maintained and counted by hardware for at least eight RxCLK cycles. Only after confirmation of maintenance completion is obtained is the corresponding destructive update executed. After the update, validity is re-established when the clock and interface conditions are met.
[0013] In one possible implementation, context integrity, configuration, and dependency validity checks are performed first. Then, candidate paths are classified using environmental differences and historical quality with comparable sensor conditions or calibrated environment conversion and error margin. The time interval from historical quality measurement to snapshot and the sleep duration are recorded respectively, and their validity is determined according to their respective applicable configurations. If a reliable judgment cannot be made, fast paths that rely on this information are disabled.
[0014] In one possible implementation, a fixed base image, a cumulative overlay table, and a current round change bitmap are used to form continuous snapshots. After a consistency check, a snapshot validity flag is committed. The power actuator is provided with a shutdown permission with a sleep transaction identifier, which is different from DeepPMAck#. Physical shutdown is only allowed when snapshot commit, interface drain, internal write completion, isolation, and wake-up conditions are met. Wake-up cancellation and shutdown operations are sorted at the shutdown commit point.
[0015] Secondly, this application provides a selective recovery system for PCIe SerDes deep low-power exit, comprising: a protocol coordination unit, a context storage unit, a startup scheduling unit, a failure propagation and operation selection unit, a resource version and modification barrier unit, a parameter execution and verification unit, and an acceptance gating unit; the system is configured to execute the above method.
[0016] The beneficial effects of this invention are as follows:
[0017] Compared with the method of performing full calibration every wake-up, the technology of this invention limits the calibration and verification workload to the actual impact of changes in shared resources. In a single receive bias sharing repair event, the number of parameter groups that the four-channel PHY needs to re-search is reduced from 12 to 4. The remaining 8 groups are either re-verified or left unprocessed, reducing unnecessary search operations and corresponding analog circuit power consumption.
[0018] Compared with the method of independently managing the recovery status by channel, this invention cancels all acceptance statuses within the affected range before the shared resources are modified and blocks the old results with a monotonic version. The pass results returned by the old version task cannot be confirmed as the current valid results, thus reducing the risk of erroneous release.
[0019] Meanwhile, the handover credentials of this invention are delivered to the PCIe controller via the completion notification path. The recovery process follows the PIPE protocol and PCIe training process and does not replace the standard link state machine with a private flag. Attached Figure Description
[0020] Figure 1 To restore the overall system architecture and data path diagram;
[0021] Figure 2 This is a diagram illustrating the startup dependencies;
[0022] Figure 3 This is a schematic diagram illustrating the propagation path dependence of calibration effectiveness, taking the failure of the shared receiver bias equivalent condition as an example.
[0023] Figure 4 A diagram illustrating the version barriers and acceptance / revocation process before and after modifications to shared resources;
[0024] Figure 5 This is a timing diagram illustrating the shutdown and recovery window during a deep low-power exit process.
[0025] Figure 6 A schematic diagram of the process for trial loading and budget admission judgment of candidate parameters;
[0026] Figure 7 This is a schematic diagram illustrating the separation of control over transmission parameters.
[0027] Figure 8 A timing diagram showing that RxCLK remains active for at least eight cycles after RxValid is canceled. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and embodiments. The embodiments described are for illustrative purposes only and are not intended to limit the scope of protection. The specific values, bit widths, and thresholds in each embodiment are examples, and actual products can be adjusted according to hardware conditions and calibration results.
[0029] The PHY used in the embodiments of this application has 16 physical lanes, organized into four quads. The four lanes of each quad share a reference and transmit clock resource PLL[q] and a receive front-end bias resource RXBIAS[q], where q is 0~3.
[0030] Lane has proprietary receive front-end, CDR control parameters, and transmit drive parameters. This topology assumes that receive bias and transmit drive bias are separated on the circuit. If the actual PHY shares relevant biases, the dependency table and operational effect set should be expanded accordingly based on hardware analysis.
[0031] The power and management domains of the PHY are divided into the normally open domain AON, the reference clock domain REF, the quad common domain SHARED[q], the lane analog domain LANE_ANA[i], and the lane digital domain LANE_DIG[i].
[0032] The AON domain remains powered during deep low power periods, carrying an independent management clock, wake-up detection, recovery controller, and reserved storage interface; SHARED[q] is turned off when no other consumer requires it; LANE_DIG[i] can be turned off, and states that need to be saved are moved to reserved storage.
[0033] When public resources are also used by other links or IPs, the resource ownership table includes all consumers, and the public resources still being used by other active links must not be modified without authorization after the link is restored.
[0034] Each lane stores three types of PHY calibration parameter groups and one type of protocol configuration record. The RXA[i] group contains CTLE coefficients, DFE taps, receiver gain and PAM4 decision threshold, and the PHY performs candidate loading, local search and verification.
[0035] The CDR[i] group contains clock recovery loop, frequency acquisition and phase tracking control parameters. Its updates may affect the receive clock and a clock failure protocol must be executed.
[0036] The TXA[i] group contains the mapping of local transmission analog calibration parameters and coefficients to the driver code. TXA calibration allows changes to the implementation code, but the result must not violate the current valid MAC transmission settings.
[0037] The TXEQ[i] protocol configuration record contains the preset, coefficients, and related information of the PHY execution image received by the MAC. The TXEQ record belongs to the protocol configuration owned by the MAC. The PHY only restores its execution image and does not have the right to choose historical transmission settings. The TXEQ protocol configuration record is not included in the number statistics of PHY calibration parameter groups.
[0038] The key distinction between these two states lies in the fact that the PHY's local transmission of analog calibration parameters and the transmission equalization protocol configuration record are stored in different address spaces. The recovery actuator's private write mask does not include the transmission equalization command area address, thus blocking the possibility of private candidate overwrite MAC commands from the hardware write path. The symbols used below are defined as follows:
[0039] ConfiguredLaneBitmap represents the link configuration determined by MAC in a legitimate process;
[0040] TargetLaneBitmap indicates the Lane that needs to be restored directly this time, without arbitrarily reducing the configuration width;
[0041] RequiredGroups represents the group of PHY calibration parameters required for the current target configuration, rate, and mode;
[0042] RequiredProtocolState indicates the consistency condition between the current authoritative protocol configuration record of MAC and the execution image of PHY. The content to be checked is the consistency of the request sequence number, preset and coefficient records. This check is performed on the current record of MAC and is not based on the premise that all standard training is completed.
[0043] RecoveryEpoch is a 32-bit recovery generation identifier used to isolate different recovery processes;
[0044] CalVersion is a 32-bit calibration-compatible version that is monotonically increasing and does not roll back.
[0045] JobID is a 16-bit task identifier;
[0046] VerifyStamp[q] is a verification record, which includes the recovery generation, task identifier, parameter group version, dependency version vector, measurement scope and stage identifier. The dependency version vector is arranged in a fixed order according to the trusted dependency templates in the ROM, with a maximum of eight items, each 32 bits.
[0047] Example 1:
[0048] This embodiment discloses a selective recovery system for PCIe SerDes deep low-power exit, which is used to solve the problem that cross-lane acceptance results become invalid and misused due to changes in shared resources.
[0049] like Figure 1 As shown, the system includes a protocol coordination unit 101, a context storage unit 102, a startup scheduling unit 103, a failure propagation and operation selection unit 104, a resource version and modification barrier unit 105, a parameter execution and verification unit 106, and an acceptance gating unit 107.
[0050] The system boundary is represented by the dashed box labeled 100. The dashed box does not represent the chip boundary. Each unit can be implemented centrally or distributed according to its responsibilities on the MAC side, PHY side, and normally open management domain.
[0051] The PCIe controller and SerDes PHY analog circuitry are located outside the system boundary, and the PMU power actuator is connected to the system via a shutdown permission path with sleep generation.
[0052] The first end of the protocol coordination unit 101 is connected to the PCIe controller, receives the legal link configuration, the current protocol stage, the applicable deadline time and the standard training status, and returns the recovery status to the controller.
[0053] The second end of the protocol coordination unit 101 is connected to the acceptance gate control unit 107, which maps the handover completion certificate to the completion notification path of the actual operation in this round.
[0054] The third terminal of the protocol coordination unit 101 is connected to the PMU power actuator, outputs PowerOffPermit carrying SleepEpoch, and receives PowerOffCommit and PowerOffAck.
[0055] The first end of the context storage unit 102 is connected to the failure propagation and operation selection unit 104, and outputs historical records and dependent versions; the second end is connected to the parameter execution and verification unit 106, and outputs recovery candidate parameters; the third end is connected to the protocol coordination unit 101, and receives snapshot requests and recovery events.
[0056] The first end of the startup scheduling unit 103 is connected to the protocol coordination unit 101 to receive the legitimate link configuration; the second end sends a startup request through the PHY resource control path; and the third end is connected to the parameter execution and verification unit 106 to provide the resource ready status.
[0057] The first end of the failure propagation and operation selection unit 104 is connected to the context storage unit 102 to receive historical records, current environment and resource change information; the second end is connected to the resource version and modification barrier unit 105 to output the impact closure and operation plan; and the third end is connected to the parameter execution and verification unit 106 to output the calibration and verification plan.
[0058] The first end of the resource version and modification barrier unit 105 is connected to the acceptance gate control unit 107, which outputs the cancellation condition and the current version; the second end is connected to the parameter execution and verification unit 106, which provides operation permission.
[0059] The first end of the parameter execution and verification unit 106 is connected to the analog circuit via the PHY control path to execute the actual loading and calibration of parameters and obtain measurement results; the second end is connected to the acceptance gate unit 107 to return the verification record with version.
[0060] The acceptance gate unit 107 outputs the group acceptance results, restores the completion submission permission and intergenerational handover credentials, and maps the handover protocol coordination unit 101 to the completion path.
[0061] Furthermore, the recovery process is performed according to the following steps:
[0062] After receiving the wake-up event, the protocol coordination unit 101 establishes a new RecoveryEpoch before any asynchronous recovery task in this round is initiated, and the context storage unit 102 restores all saved records to the working state or reserved image of each state owner.
[0063] The startup scheduling unit 103 determines the target Lane bitmap based on the legal link configuration, obtains the transitive closure along the startup dependency graph, and sends startup requests for power, reference clock, and shared PLL to the PHY resource control path.
[0064] The failure propagation and operation selection unit 104 reads the saved environment records and dependency version list from the context storage unit 102, checks the cyclic redundancy check, hardware version, algorithm version, rate and signal mode, performs hard checks, and compares the current environment with the saved environment after the hard checks are passed to form an initial change set, a calibration set and a verification set.
[0065] Subsequently, the failure propagation and operation selection unit 104 selects operations that meet the trigger conditions from the calibration operation table and adds them to the operation set. It then merges the write resource set of the selected operation into the change set, merges the disturbed parameter set into the set to be verified, and propagates the change set along the directed edge of the calibration validity dependency table. This propagation is repeated until each set no longer increases.
[0066] Resource version and modification barrier unit 105 acquires ownership of the write resource and the scope of affected consumers before the resource is modified. After the recovery is completed and the submission is made, a ChangePending barrier is set in the control domain that is visible. The acceptance status of the affected group is revoked and the relevant tasks in the measurement are set to invalid.
[0067] When the resource-ready, barrier-permitted, and protocol-phase conditions are met, the parameter execution and verification unit 106 actually writes the candidate parameters into the working circuit, waits for the declared simulation stabilization time, performs verification using the signals available in the current phase, and returns the verification record, along with the generation, version, and measurement applicability range, to the acceptance gating unit 107.
[0068] When the verification is successful and the generation, parameter group version, dependency version vector, and measurement phase are matched item by item with no related ChangePending, the acceptance gating unit 107 atomically confirms the parameter group. After all groups required for the current target configuration are confirmed and the protocol configuration records are verified to be consistent, the acceptance gating unit 107 closes the relevant recovery write, generates a ReadySeal handover credential, and maps it to the standard completion notification path of the current round of actual operation through the protocol coordination unit 101. The PCIe controller continues to train according to the standard process and completes the handover of control.
[0069] Example 2:
[0070] Based on Example 1, this embodiment further limits the calibration validity dependency of the failure propagation and operation selection unit 104.
[0071] Startup dependencies and calibration validity dependencies are two separate types of relationships modeled. The former describes the startup prerequisites for power supply, reference clock, and shared clock, answering the question of whether resources can start; the latter describes which downstream parameter sets' calibration conclusions become invalid due to changes in resources or parameter sets, answering the question of which historical parameters must be recalibrated or revalidated. Fluctuations within the allowable range of the same power rail do not trigger any entries in the calibration validity dependencies, and therefore do not lead to unnecessary recalibration.
[0072] Each entry in the calibration validity dependency table includes the source object identifier, target parameter group identifier, change type, applicable rate, applicable signal mode, change judgment condition, and treatment category.
[0073] The source object identifier is the resource identifier of the shared resource or the group identifier of the physical channel parameter group; the change type includes configuration change, calibration code change, exceeding the calibrated equivalent condition range, and inability to confirm equivalent recovery; the change judgment condition is implemented to a specific event, not written as a general description of resource impact; the handling category distinguishes between recalibration verification and re-verification using candidate parameters, and the target parameter group is written into the set to be calibrated or the set to be verified according to the handling category.
[0074] The dependency representation applicable to the overall topology setting of this application is shown in Table 1:
[0075] Table 1 Examples of calibration effectiveness dependencies
[0076] Source Change Downstream range Disposal Category explain RXBIAS[q] does not meet the calibrated equivalent conditions or requires destructive recalibration. The RXA[i] of this Quad Verification after recalibration The receiving front-end can no longer confirm the applicable work point. The RXA[i] parameter has changed. Same as Lane's CDR[i] Revalidate using candidates Recheck the acquisition and tracking performance after the received signal conditions change. PLL[q] Loop calibration status changes at the same rate The CDR[i] and TXA[i] of this Quad Revalidate using candidates A change in clock conditions does not necessarily mean that all parameters fail. Rate, reference clock mode, or hardware configuration mismatch The relevant groups listed in the template Recalibrate or protocol reinitialize First, address the hard configuration requirements. MAC legitimate send balance update This Lane protocol execution mirror and affected transmission simulation verification records Protocol mirror verification or necessary re-verification No PHY-initiated equalization search task is generated.
[0077] In Table 1, RXBIAS[q] does not meet the calibrated equivalent conditions or requires destructive recalibration, which leads to the verification of RXA[i] of this Quad after recalibration;
[0078] The RXA[i] parameter changes, causing the CDR[i] of the same lane to be re-verified using the candidate; the loop calibration status of PLL[q] changes at the same rate, causing the CDR[i] and TXA[i] of this Quad to be re-verified using the candidate.
[0079] When the rate, reference clock mode, or hardware configuration does not match the relevant group listed in the template, the relevant group is recalibrated or the protocol is reinitialized; when the MAC sends a valid equalization update, this Lane protocol performs a mirror check or necessary re-verification by comparing the mirror with the affected transmission simulation verification record.
[0080] This example does not automatically propagate changes in the local transmit equalization protocol record to the local receive parameter set, as there is no necessary calibration dependency between the two. If the product has shared resources or crosstalk constraints, add the corresponding dependency edges according to hardware analysis.
[0081] Furthermore, the propagation rules are implemented as follows:
[0082] During initialization, resource identifiers that fail hard checks or whose environmental differences exceed the calibration tolerance are written to the change set. For each source object identifier in the change set, the dependency table is searched for entries that match the source object and whose applicable rate and signal mode match the current configuration, and the change determination conditions are checked to see if they are met.
[0083] For entries that meet the criteria, the target parameter group identifier is written into the set to be calibrated or the set to be verified according to its treatment category. Target parameter groups whose treatment category is to be verified after recalibration are also written into the change set, serving as new source objects to trigger the next round of propagation.
[0084] The process is executed iteratively until the change set, the calibration set, and the verification set no longer increase between adjacent iterations.
[0085] Products that have not completed equivalent tolerance calibration are subject to conservative rules, meaning that if the calibration codes are different, they are judged as changes and recalibration is triggered. Products that have completed calibration are compared according to the calibrated tolerance values. When comparing, the mapping relationship between the code value and the physical quantity and the measurement uncertainty are considered. Safety cannot be determined solely based on a difference of one least significant bit, nor can a valid state that has exceeded the safety boundary be retained.
[0086] The set of impacts of the calibration operation consists of a set of write resources and a set of disturbed parameters. These two sets are determined by hardware analysis based on the PHY's shared calibration engine physical topology, power supply allocation, clock allocation, and bias allocation.
[0087] Taking the overall settings in this embodiment as an example, the write resource set of the local receive calibration operation CAL_RX_LOCAL(i) contains only RXA[i], and the perturbed parameter set contains RXA[i] and CDR[i]; the write resource set of the shared receive bias calibration operation CAL_RX_SHARED(q) contains RXBIAS[q], and the perturbed parameter set covers all receive-related groups within the Quad; the write resource set of the shared phase-locked loop calibration operation CAL_PLL(q) contains PLL[q], and the perturbed parameter set covers the receive and transmit groups that depend on the phase-locked loop.
[0088] For each calibration operation, preconditions, triggering conditions, applicable stage, worst-case completion time, bounded abort conditions, and priority are also recorded. Operations without bounded abort capability are not scheduled as arbitrary preemptible tasks. The set of disturbed parameters covers known direct and indirect disturbances, ensuring that downstream measurement objects disturbed by shared calibration circuitry are not overlooked.
[0089] Example 3:
[0090] Based on Example 1, this embodiment further limits the operation of resource version and modification barrier unit 105, and combines a specific shared bias repair event to illustrate the execution process that affects closure and acceptance revocation.
[0091] It should be noted that in this embodiment, if a certain Lane has passed verification under a certain version, it means that the Lane has obtained a verification record referencing the current version in this Recovery Epoch. All necessary verifications at the start of this recovery cycle must be re-established. Historically saved pass flags are only used as diagnostic information and not as current valid results.
[0092] When the failure propagation and operation selection unit 104 determines that a calibration operation to modify shared resources needs to be performed, the resource version and modification barrier unit 105 are executed in the following order.
[0093] Unit 105 reads the current owner identifier and all consumer link identifiers of the shared resource from the shared owner table. The link that is a consumer obtains write permission for the link. Other links that are consumers obtain coordination permission from the corresponding controller through the protocol coordination unit 101. If write permission cannot be obtained, the modification of the shared resource is not performed.
[0094] After obtaining authorization, unit 105 submits a ChangePending barrier to the control domain that is visible in the acceptance gating unit 107 and completes cross-domain confirmation. Subsequently, the acceptance submission request involving the affected parameter group is rejected, and the relevant tasks in the measurement are set to invalid.
[0095] After the barrier takes effect, unit 105 will clear the acceptance status of all parameter groups in the closure according to the impact closure and cancel the ready flag of the corresponding Lane.
[0096] Unit 105 then checks the write token queue and measurement task queue of the affected resources, and after confirming that there are no write or measurement users that have not yet been isolated, issues a write permission to parameter execution and verification unit 106.
[0097] The parameter execution and verification unit 106 performs the actual modification of the shared resource. After the modification reaches the stable condition, it returns a completion signal to the unit 105. The unit 105 updates the CalVersion of the corresponding resource to a new monotonically increasing value and publishes the new resource status, and then releases the write mutual exclusion.
[0098] The ChangePending barrier is lifted after the affected set and subsequent task status are consistently recorded. The acceptance status of the affected group remains zero until the parameter execution and verification unit 106 completes verification under the new version and passes the atomic submission check of the acceptance gating unit 107.
[0099] When a parameter value is changed to a new value and then reverted to the previous value, CalVersion continues to increment without reverting. The verification comparison is based on the version number, not the parameter value itself, thus preventing the old version's verification result from being reconfirmed based on the same parameter value.
[0100] Furthermore, the process of a specific event is as follows:
[0101] In Quad0 with x4 configured, the CalVersion of the receive bias resource RXBIAS[0] is 7. Lanes 0 to 2 have obtained the verification record of the receive related group under version 7 during this round of recovery. The local search of Lane 3 and the safe initial value search allowed by the budget both failed. Subsequently, the common bias monitoring reported that it exceeded the calibration range under the specified effective sampling conditions and was confirmed by the common diagnostics to need to perform shared bias repair.
[0102] Subsequent evidence of public anomalies led to the cancellation of the old acceptance of the first three lanes, rather than adjusting public resources solely because of the failure of Lane 3; if the evidence of anomalies had been confirmed during the initial planning, shared resources should have been addressed before accepting each lane.
[0103] The resource version and modified barrier unit 105 establish a ChangePending barrier, cancel the acceptance status of the four lanes receiving related groups, and perform bias repair after obtaining shared write permission. The CalVersion of RXBIAS[0] is updated from 7 to 8. Subsequently, under version 8, the receiving parameter calibration and clock recovery parameter verification of the four lanes are redone. The transmitting simulation group does not add a search due to this independent receiving bias event, and the transmitting equalization protocol configuration is still managed by MAC according to the current protocol. Even if the verification task started under version 7 returns a pass result after the barrier is canceled, the acceptance status cannot be restored due to version mismatch and task failure.
[0104] Table 2 provides a timeline of the event from t0 to t6:
[0105] time operate Version and Acceptance Changes Business Status t0 Lanes 0 through 2 obtained verification records in version 7 of this round, and evidence of a common bias anomaly was obtained after Lane 3 failed. The first three lane verification records reference version 7. Do not submit recovery complete t1 Recalculate the impact of the shared operation on the closure. Four lane receiver groups have entered the calibration range, and the clock recovery group has entered the retest range. Not allowed t2 Establish a ChangePending barrier and obtain write permissions The acceptance procedures for the four lanes have been cancelled, and the old measurement tasks are invalid. Not allowed t3 Actual adjustment of shared bias and stabilization The CalVersion of RXBIAS[0] has been updated from 7 to 8. Not allowed t4 Redo the affected calibrations and verifications The new results must be verified item by item in version 8; results from version 7 must not be submitted. Not allowed t5 Once the required group acceptance and protocol configuration verification are passed, private write operations are closed and ReadySeal is submitted. The MAC channel notification indicating that the recalibration has been completed has been received. Standardized training and handover are still needed. t6 MAC completes legal exit and transfer of control Record the link's ready status; recovery task complete. Normal x4 service
[0106] At time t0, Lanes 0 to 2 obtain verification records under version 7 in this round. After Lane 3 fails, it obtains evidence of common bias anomalies. The verification records of the first three lanes reference version 7 and do not commit to complete the recovery.
[0107] At time t1, the impact closure is recalculated according to the shared operation. The four Lane receiving groups enter the calibration range, the clock recovery group enters the re-verification range, and the service is not released.
[0108] At time t2, establish a ChangePending barrier and obtain write permissions, revoke the acceptance of the four lanes, invalidate the old measurement tasks, and do not release the business.
[0109] At time t3, the shared bias was actually adjusted and stabilized, and the CalVersion of RXBIAS[0] was updated from 7 to 8, and the service was not released.
[0110] At time t4, the affected calibrations and verifications are redone, and the new results are checked against version 8 item by item. Version 7 results must not be submitted, and business operations are not allowed.
[0111] At time t5, the required group must pass the acceptance and protocol configuration verification, close the private write and submit ReadySeal, and complete the path notification MAC after actual reception and recalibration. Standard training and handover are still required.
[0112] At time t6, the MAC completes a legitimate exit and transfer of control, records the link readiness status, the recovery task ends, and normal x4 services are restored.
[0113] Example 4:
[0114] This embodiment further defines the submission logic of the acceptance gate control unit 107 based on embodiment 1.
[0115] Each verification record returned by the parameter execution and verification unit 106 uses the VerifyStamp format, with fields arranged according to the definitions in the overall settings: 32-bit recovery generation, 16-bit task identifier, 32-bit parameter group version, up to eight 32-bit dependency version vectors, 8-bit measurement scope, and 8-bit stage identifier, totaling 352 bits. The dependency version vector does not record the names of dependent objects; the correspondence between objects and vector positions is fixed by the trusted dependency template in the ROM, and the template version participates in integrity checks and configuration checks.
[0116] After receiving the verification record, the acceptance gate unit 107 checks the following conditions item by item in the same arbitration case:
[0117] Verify that the recovery generation of the existing records matches the current recovery generation;
[0118] The task corresponding to the task identifier has not been cancelled;
[0119] The parameter group version and resource version are equal to the current CalVersion released by the modified barrier unit 105;
[0120] Each item in the dependency version vector is equal to the current dependency version recorded in the context storage unit 102;
[0121] The scope of measurement application matches the measurement conditions permitted by the current agreement phase;
[0122] There are no ChangePending barriers, unprocessed write tokens, or incomplete perturbation tasks involving this parameter group.
[0123] When all conditions are met, the transaction atomically sets the acceptance status of the parameter group; when any condition is not met, the verification record is discarded and the reason for failure is recorded.
[0124] The atomicity of this transaction is achieved by read locking:
[0125] Before the acceptance gate unit 107 initiates the comparison, it sends a read lock request to the resource version and modification barrier unit 105. After receiving the lock, the unit 105 suspends the issuance of write permits and version updates involving the same resource. After the comparison and status writing are completed, the lock is released, thereby blocking the race condition where the version is compared first, the resource is modified by another writer, and finally the acceptance status is set.
[0126] Phase changes by default invalidate incomplete measurement tasks, while completed phase results are only retained if the phase license indicates that cross-phase retention is allowed and that parameters and dependencies have not changed.
[0127] The current full verification conditions cannot be replaced by old metrics that are not applicable to the current level or rate. Before reusing any identifier, clear any tasks, acceptances, and candidate records that may reference the old identifier, or reset and isolate the relevant producers before rebuilding the version baseline, without assuming that a larger number of bits will prevent rollback.
[0128] Example 5:
[0129] Based on Embodiment 1, this embodiment further defines the control logic of the parameter execution and verification unit 106 on the sending and receiving sides.
[0130] Among them, the transmitting side control is as follows Figure 7 As shown, the MAC holds the decision-making power over the current valid preset and coefficients, while the PHY maintains the corresponding execution image and performs local transmission simulation calibration. Both types of states are saved simultaneously, but the write permissions are different.
[0131] The parameter execution and verification unit 106 maintains a send request sequence number register and a write permission register. The send request sequence number is updated by the MAC through the PCLK domain path, and the write permission register identifies the controller currently authorized to update the execution image. After receiving a legitimate send request from the peer, the MAC authoritative path updates the send request sequence number and sets the write permission to MAC. The execution image only accepts the current MAC command, and old images cannot be used as reverse recovery sources.
[0132] The address mask written during private recovery does not include the send equalization command area. Local send simulation candidates that rely on the old request sequence number are canceled or re-evaluated, and the associated send-side verification records become invalid. When local receive verification fails, only the receive-side parameter groups that were approved for rollback are rolled back; the send equalization settings are not restored to their pre-sleep values with receive rollback.
[0133] The timing of the peer's request processing is constrained by the protocol. Taking the downstream port equalization Phase 2 specified in the PCIe basic specification as an example, a valid and supported request should take effect on the send pin within 500ns after the second request ordered set is received. When updating the send deemphasis register using the message bus, the requirement that the pin takes effect 128ns after the write submission must also be met. The two time limits are timed separately. The complete path includes MAC identification, control transmission, arbitration, and simulation effectiveness.
[0134] Private transmission of simulation calibration is permitted only if it does not interfere with the aforementioned mandatory actions. Private operations that occupy mandatory service resources must have proven ability to promptly relinquish control.
[0135] The receiver clock remains as follows Figure 8 As shown, for updates that require interruption of the receive recovery clock, the parameter execution and verification unit 106 first requests the protocol coordination unit 101 to confirm that the current protocol phase allows for re-acquisition. After confirmation, the RxValid signal is revoked through the RxCLK domain control logic. After the RxValid signal is revoked, the receive clock holding circuit maintains RxCLK and continues to run and counts at least eight RxCLK cycles. After the count is completed, it returns a stop permission to the parameter execution and verification unit 106.
[0136] Unit 106 only performs clock recovery reset or destructive parameter writing that might stop the clock after obtaining stop permission; after the update is completed, it waits for the clock to stabilize and the current interface conditions to be met, then re-establishes RxValid according to PIPE semantics and starts applicable verification. The holding circuit uses a verified clock continuous operation mechanism or a glitch-free holding path, and the output meets the maximum receive clock frequency constraint declared by the PHY. The fixed delay of the normally open management field is not used to replace the actual cycle count of the RxCLK field, and it cannot guarantee that this local update will not be admitted under the eight-cycle condition; instead, the MAC performs the applicable error recovery.
[0137] The execution process of a concurrent event is as follows:
[0138] Before the MAC goes to sleep, the authoritative record for transmission equalization is P_old. After recovery, a valid equalization redo occurs and P_new is accepted. The PHY performs mirroring and associates the sequence number of the new request in this round. Subsequently, the local receive candidate fails. The address mask of the private recovery port only allows the approved receive parameters to be rolled back. The transmission equalization command area is not written to P_old, and the local transmission simulation candidate that depends on the old request sequence number is not submitted.
[0139] If private optimizations and legitimate requests compete for the same resource, only private actions that meet the full mandatory response time limit are allowed to start, and peer requests are not rejected for maintaining historical consistency.
[0140] Example 6:
[0141] Based on Example 1, this embodiment further defines the process by which the failure propagation and operation selection unit 104 determines the initial failure range.
[0142] Initial path classification is performed after the hard check passes and the reference voltage is within the calibrated valid range for this rate and mode. Hard mismatches cannot be offset by higher historical health scores. Environmental comparison requires that the saved and restored measurements be under comparable conditions. The environmental configuration label specifies the sensor identification and location, sampling power supply status, stabilization wait, units and errors, and measurement stage. The configuration used is recorded when saving, and sampling is performed after the relevant power supply has stabilized when restoring.
[0143] Temperature differences are converted to the same Lane reference operating conditions using the following formula: the current equivalent temperature equals the current sensor temperature heating model correction value, the saved equivalent temperature equals the saved sensor temperature plus the saved state thermal model correction value, and the upper bound of the temperature difference is the absolute value of the difference between the two equivalent temperatures plus the sum of the measurement error boundaries on both sides; voltage differences are calculated in the same way; self-heating changes are not offset by unverified fixed offsets.
[0144] Historical health status is calculated as follows:
[0145] The worst-case receive margin M, unlocked ratio U / N, and maximum change in adaptive parameters D within the most recent valid measurement window are read from the saved environment records. Reference values M_ref and D_ref are read from ROM according to rate, mode, and hardware version. A truncation function clip01(x) is defined to take the intermediate value between x and 0 and 1. The margin health is calculated as 255 multiplied by clip01(M divided by M_ref) and rounded down. The lock health is calculated as 255 multiplied by clip01(1 minus U divided by N) and rounded down. The stability health is calculated as 255 multiplied by clip01(1 minus D divided by D_ref) and rounded down. The historical health is the minimum of the three. In PAM4 mode, when the full level is measurable, the worst value of the three eye diagrams is taken as M.
[0146] Historical quality and sleep duration are determined separately. The time interval from the end of measurement to the formation of the snapshot constrains the window before sleep, which is 1 second in this example. Whether the historical quality can be used during sleep duration is jointly determined by the verified duration range given by the retention configuration, the current environmental conditions, and the integrity of the records. If the time base cannot be reliably determined, the fast path that depends on that interval is invalid, and the calibrated independent recovery configuration that does not depend on historical quality can be followed; otherwise, the conservative path is followed, and the logical context that has passed the cyclic redundancy check is not judged as corrupted due to time base issues.
[0147] Candidate paths are categorized according to Table 3:
[0148] When the upper limit of temperature difference is no greater than 12℃, the upper limit of voltage difference is no greater than 25mV, and the historical health score is no less than 192, directly test the loading and verification of historical parameters.
[0149] If the above conditions are not met, but the upper limit of the temperature difference is no greater than 30℃, the upper limit of the voltage difference is no greater than 60mV, and the historical health level is no less than 128, then enter the local search assisted by historical parameters.
[0150] If the range is out of reach or historical quality is unavailable, perform the required full calibration from a safe starting value.
[0151] The above thresholds are classification examples. The actual thresholds are determined after the product is calibrated according to the combination of process angle, temperature, voltage, reference voltage, channel and rate. Boundary conditions and unknown conditions are uniformly processed into more conservative categories.
[0152] If the reference voltage does not meet the calibration conditions, the affected group will be set to at least recalibration via the relevant dependent edge; simulation activation is prohibited when the reference voltage or power supply exceeds the hardware safety range, and electrical overruns will not be masked by complete calibration.
[0153] When reliable historical quality is not available, a conservative approach is taken. If the target PHY lacks the required eye monitoring or historical observation capabilities, an alternative, calibrated, and fully defined measurement configuration is used, without arbitrarily filling in health scores. Regardless of the chosen approach, candidate parameters must be actually loaded and validated under current signal conditions in this round; no classification inherits old acceptance results.
[0154] Example 7:
[0155] Based on Example 1, this embodiment further defines the operations of the acceptance gate control unit 107 in generating the handover completion certificate and the protocol coordination unit 101 in mapping completion notification.
[0156] Acceptance of a certain lane requires that all necessary PHY parameter groups have valid verification records for this round, the measurement scope and dependent versions still match, and there are no pending calibration tasks, pending verification tasks, or related pending modifications.
[0157] The necessary acceptance criteria are aggregated as follows: current target configuration matches, all required parameter groups are currently valid for acceptance, consistency verification between the current MAC authoritative protocol configuration record and the PHY execution image is passed, there are no related modification barriers and no writers that have not finished.
[0158] The meaning of the aforementioned consistency check needs to be clearly defined. The check object is the consistency between the request sequence number and the preset and coefficient records between the current authoritative protocol configuration record of MAC and the PHY execution image. The check is performed on the current MAC record before ReadySeal is submitted, without waiting for L0 state, completion of standard training, or arrival of business data. There is no circular wait between the check and standard training. Necessary acceptance is arranged to be completed within the current valid phase before completion notification. Measurement configurations that do not have observation conditions within the valid phase are not used for this round of necessary acceptance; verified alternative configurations are used or the fast path is canceled.
[0159] After acceptance is completed and the protocol configuration is verified, the acceptance gate unit 107 closes the relevant recovery writer, clears the issued write permissions, confirms that the protocol completion path has been established and the handover scope is consistent with the recovery generation verification, and generates the ReadySeal credential.
[0160] The credentials include the recovery generation, configuration version, acceptance version summary, and set of closed writers. Private writes that could disrupt the result will not be accepted between the submission of the credentials and their acceptance by the MAC completion channel. The recovery writers remain closed until the handover is successful or controlled reversal is implemented.
[0161] After receiving ReadySeal, the protocol coordination unit 101 verifies the recovery generation and configuration version, confirms that the credentials correspond to the current recovery process, and then maps the operation identifier in the credentials to the standard completion notification path corresponding to the actual operation executed in this round.
[0162] An implementation of the IORecal process using the PIPE interface:
[0163] The MAC establishes an IORecal request in the applicable Recovery window, and the PHY performs the actual receive recalibration and its necessary effect verification. Necessary tasks unrelated to this receive recalibration are completed before IORecal starts, so as not to delay the response by waiting for unrelated private tasks.
[0164] In a normal successful path, IORecalDone is only set through the specified message interaction after the current round of receive recalibration is successfully completed, ReadySeal is submitted, and the PCLK side completes the adapter verification of the current round's request sequence number.
[0165] After receiving the completion status, the MAC continues to exit Recovery according to the applicable link training state machine transition conditions, without directly jumping by the private flag.
[0166] When using the product's existing internal recovery completion interface, the actual recovery operation of MAC waiting, interface sampling and exit conditions, and their compatibility with standard link training state machine rules should be clearly defined. Any private acceptance flags should not be used as the basis for the protocol's allowed delay.
[0167] When the protocol requires the IORecal, equalization evaluation, or equalization training operation to be terminated, the PHY terminates the request and returns a handshake confirmation. This termination response is not subject to ReadySeal gating and is not interpreted by the internal acceptance logic as calibration success. The protocol coordination unit 101 cancels the affected tasks and credentials for this round and completes the response according to the respective operation rules.
[0168] MAC forced send requests cannot be blocked by slow normally open domain round trips. Acceptance and completion requests involving its state are atomically compared by the PCLK domain authoritative executor, which then submits the authorization. Standard completion notifications that have already been issued are not subject to subsequent event revocation. When a standard forced send request changes the state subject to acceptance constraints, the credentials are invalidated and re-verified before the completion notification is submitted. If an incompatible change occurs after the completion notification has been issued, the MAC is notified to proceed with appropriate recovery or error handling, and the old credentials are not reused.
[0169] After the MAC accepts the handover credentials and completes the applicable standard training and control handover, it records the link readiness status. Before entering this status, it completes the necessary acceptance and handover for this round and is not allowed to reject peer data based on private flags during business operation. The adaptive freeze between handover and credential submission only covers controllable writers that actually affect acceptance during the recovery phase and provides a bounded handover time limit. If the handover times out, the credentials are canceled and a safety exit is taken. The freeze does not drag into the business operation phase.
[0170] Example 8:
[0171] This embodiment, based on embodiment 1, further defines the interaction between the protocol coordination unit 101 and the PMU power actuator, with the timing as follows: Figure 5 As shown.
[0172] DeepPMReq# and DeepPMAck# are active-low asynchronous signals. The MAC asserts DeepPMReq# when it is not in P0 state. The PHY immediately acknowledges the entry request according to the specification, and then decides whether to actually turn off the clock and power based on internal conditions. Internal conditions may prevent the actual entry from occurring.
[0173] Upon exit, the MAC cancels DeepPMReq#, and the PHY cancels DeepPMAck# after exiting deep low power. The corresponding PowerDown state transition is only performed after the MAC confirms the exit. DeepPMAck# does not serve as a direct power-down authorization for the PMU; the physical shutdown state is stored in a separate record.
[0174] Before the power is actually removed, the PIPE interface is idle and there are no incomplete operations. The sent uncommitted write completion valid commit sequence, the committed write completion confirmation, the read and the operation that requires subsequent status return have completed the corresponding interaction, and the operation in the cancellation process has fulfilled the completion process required by the specification. Requests that have entered the standard interface are not disguised as finished by clearing the queue or discarding confirmation.
[0175] Snapshots are committed in the following order: freeze related parameter updates and empty internal writes, set the snapshot update flag, update the change entries for this round, update dependency versions, directories and cyclic redundancy checks, check for consistency, finally write the validity flag, and then clear the change bitmap for this round.
[0176] The system retains a complete cumulative overlay table for storage maintenance. When parameters return to their base values, their overlay bits are cleared. A single cumulative image update is deemed invalid after an interruption. If recovery from a trusted context is not possible, a safe initialization and necessary protocol reset path are followed.
[0177] Once all conditions are met, the protocol coordination unit 101 issues a PowerOffPermit carrying the current SleepEpoch to the PMU via its internal power management path. The conditions for granting permission are as follows:
[0178] The sleep request is still valid, the corresponding SleepEpoch is valid, the interface is idle, the snapshot is valid, the internal write is empty, the isolation is ready, the wake-up path is available, and no other active consumers are requesting power.
[0179] Snapshot freezes and interface drain conditions are maintained until the PMU shutdown commit point, and write access is not reopened after a permission is issued. The PMU only accepts permissions for the current generation, and prioritizes wake-up cancellation and shutdown requests at its commit point: if a cancellation is accepted first, shutdown is not performed; if a shutdown has already been committed, a controllable shutdown is completed and the wake-up recovery path is followed, preventing late cancellations from falsely reporting a shutdown as if it never occurred.
[0180] The PMU must be connected to the aforementioned permitted path, or equivalently interlocked by the same normally open control logic. Integration methods that cannot be interlocked disable power rail removal optimization and only use proven safe retention methods. This path is implemented internally by the system and is not a new PIPE standard signal. A lightweight exit is used when there is no actual power loss and the context is valid; a restore process is not mandatory.
[0181] The execution of a concurrent process is as follows:
[0182] PHY immediately confirms that the snapshot has not been committed after DeepPMReq#, PowerOffPermit remains invalid, and PMU remains powered on.
[0183] Once the conditions for snapshot submission, interface emptying, isolation, and shared consumer are met, the normally open logic issues the current SleepEpoch permission;
[0184] When the wake-up cancellation is performed before the PMU submits the acceptance, the permission is revoked and the power supply is maintained. When the PMU has submitted the shutdown, the actual shutdown stage is recorded and the path is restored through the Restore window.
[0185] Late permission or confirmation from the previous SleepEpoch cannot be used for the current transaction.
[0186] Example 9:
[0187] This embodiment, based on embodiment 1, further defines the operation of the context storage unit 102 within the Restore window, and the window timing is as follows: Figure 5 As shown.
[0188] Before the power rail resumes its rise, the normally open logic receives the wake-up event and establishes a new RecoveryEpoch before any asynchronous recovery task in this round is initiated. The MAC or its reserved control unit asserts Restore# before the power rail rises. Within the window, the MAC and PHY ignore PIPE input changes except for PCLK and Restore#. The monitoring input is resumed immediately after the window ends. The PIPE signal synchronized with PCLK is changed only after PCLK is valid and has run for at least 32 cycles. The 32-cycle wait does not impose additional constraints on the internal preparation operations that do not depend on PCLK, nor is it extended to a common constraint for all asynchronous signals.
[0189] Each writable state has a unique current owner. The MAC protocol context is saved and restored by MAC, containing the valid link configuration, applicable send settings, and interface driver state. After the window ends, it continues to drive according to the input semantics and synchronization wait rules.
[0190] The PHY protocol execution image is saved and restored by the PHY, with associated configuration versions. After the window is opened, it is checked against the MAC authoritative record and driven by the current MAC command. Old images are not used as new commands to write back to the MAC. The PHY private calibration context is saved and restored by the PHY or normally open management domain. The actual loading and calibration are still subject to resource readiness and stage constraints.
[0191] The recovery management state is maintained by the normally open management domain. Historical records do not overwrite the current recovery generation, and the current acceptance test re-establishes the state. For registers that have both internal recovery ports and can be accessed via the message bus, only the owner of the recovery writer is allowed to access them during the Restore period. After the window ends and synchronization wait is completed, the ownership handshake opens the normal command port.
[0192] If the mirror is inconsistent, recovery is incomplete, or the requested sequence number cannot be verified, a report is submitted and an applicable reinitialization is performed, without adopting the last writer winning strategy. Each state owner within the window completes the recovery of its own domain via the internal recovery bus, a reserved mirror, or an independent management path, without relying on standard PIPE message transactions to transmit recovery commands.
[0193] All saved records are restored to the corresponding working state or a reserved image with equivalent logical semantics within the window. Non-target lanes complete logical restoration, but the simulation domain remains closed. When using a reserved image, the image is the authoritative logical state of the lane during the power outage. Access and subsequent activation are performed through a consistent read path. No copy of the working semantics that has never been accessed is retained, but the context is claimed to have been restored.
[0194] Specifically, one implementation uses an always-accessible state selector to map the Lane logical address to a verified reserved bank. Data, mapping, and validity are committed before the window closes. Upon subsequent activation, new commands are disabled and old accesses are cleared. The bank is moved into the working register, and after verification, the read source is atomically switched and write permissions are returned. Power to the power-down working register does not need to be supplied within the window, but accessibility mapping for the valid state must be completed. If the product cannot provide this semantic, the actual working register is restored within the window, and more than one restored flag is set.
[0195] After Restore# is revoked, PCLK runs effectively for at least 32 cycles, enabling synchronization between both parties. Subsequently, the MAC revokes DeepPMReq#, and the PHY revokes DeepPMAck# once the current PowerDown state requirements are met. Then, necessary power, data rate, data width, and clock handshakes are performed. The context ready flag only indicates that the logical context or security initialization state is available; it does not indicate that the receive clock is locked or the service is available.
[0196] Example 10:
[0197] This embodiment further defines the snapshot management of the context storage unit 102 based on embodiment 1.
[0198] The fixed base image is stored in ROM or equivalent reliable storage, and includes hardware and algorithm versions, parameter security start values, trusted dependency table templates and operation impact tables; the runtime records are stored on it in layers according to public context, Lane context and management context.
[0199] Each record includes context type, resource or lane or group identifier, hardware and algorithm version, base image version, snapshot number, rate and signal mode, valid bitmap, cumulative coverage bitmap, parameter content, storage environment, list of dependent versions, and cyclic redundancy check. The checksum is only used for error detection and does not replace item-by-item comparison of dependent versions, nor is it used to determine environment similarity.
[0200] Context storage unit 102 maintains a cumulative coverage bitmap and a current round change bitmap. The former represents the cumulative coverage relationship of the current value relative to the fixed base image, and the latter represents the changes that have occurred since the last successful snapshot. Changes caused by software, equalization, calibration, and internal controls are all included in the tracking. In this round, only the changed entries that are set are updated, while the unchanged entries are retained.
[0201] The first snapshot saves parameter A as 5. The second snapshot only changes parameter B to 7. The second cumulative image still contains both A equal to 5 and B equal to 7. When parameter A returns to its base value, the overwrite bit of A is cleared. If a snapshot commit is interrupted, the image is considered invalid, and it is not assumed that another complete old snapshot is saved in the same storage space.
[0202] When a local record verification error occurs, the corresponding group and associated scope will only be allowed to enter secure reconstruction if the trusted directory and dependency template are available. When a public record is corrupted, it will be propagated through the dependency table, and the faulty register will not be repaired. When the global directory, protocol configuration or dependency template cannot be reconstructed in a trusted manner, the old link state will not be allowed to continue to be used. Errors will be recorded through an independent management path. After the window ends, the MAC will perform an applicable reset and full initialization, without claiming that the corrupted historical context has been correctly restored.
[0203] Historical lock, training completion, and acceptance pass statuses are only saved as diagnostic information. Upon recovery, the acceptance gating unit 107 re-establishes all acceptance flags for this operation. An example of capacity allocation is shown in Table 4. An 8KiB logical snapshot requires an additional three-eighths byte of error correction check bits. The working bank, ROM, and operating status parameters are calculated separately.
[0204] Example 11:
[0205] This embodiment, based on embodiment 1, further limits the time constraints for action access during the recovery process.
[0206] Protocol coordination unit 101 obtains the actual low-power source, port role, rate, signal mode, link training state machine sub-state, equalization phase, phase identifier, applicable deadline, and conditions for service-required requests from the MAC or link training state machine adapter. Phase changes are passed in via handshake or hold-type multi-bit snapshots and non-asynchronous bit-by-bit sampling state encoding.
[0207] The phase permission table is indexed according to the above conditions, and for each operation, it specifies whether it is allowed to start, the range of allowed modifications, available measurements, worst-case completion or stop time, the range of measurements allowed to be retained across phases, and the failure exit. General L1 exit paths without rate changes or balancing redo conditions are configured separately from paths that trigger balancing, and the balancing phase budget is not applied to each exit.
[0208] The time descriptor should at least include the timing category, start event, end event, value, applicable conditions, and clock source. It should record the minimum wait time, phase cutoff, applicable request cutoff, and end-to-end recovery cutoff for power supply and common-mode recovery respectively, and specify the timing start and end events for each.
[0209] Specifically, taking L1.2 as an example, power-on wait is the minimum wait that must be met before actively driving the interface during exit from the specified sampling event, not the maximum cutoff for the entire recovery; common-mode recovery wait is timed by the downstream port according to the specified training transmission and electrical idle exit conditions. Then, the end-to-end budget is established based on the actual low-power path, effective capability configuration, platform constraints, and applicable latency tolerance conditions, from the wake-up event to service recovery readiness. The latency tolerance value cannot be unconditionally treated as a unified timeout for all internal tasks. The starting point across clock domains is converted into a timestamp with an upper bound on uncertainty. When the platform only provides a tolerance and cannot form a reliable end-to-end budget, it supplements the product's verified upper bound, and does not treat unknown time limits as infinity.
[0210] Action access is determined using the following formula:
[0211] The remaining time to each applicable deadline for the execution action includes all necessary operations that affect the expansion of the closure, the remaining minimum wait, the standard completion interaction, the training and handover up to the event, and the worst failure handling. The upper bound is accumulated for serial tasks, and for parallel tasks, it is calculated according to the critical path and the contention upper bound. Waits and executions are not added repeatedly when they overlap.
[0212] The minimum wait gate only constrains its corresponding action and does not rely on the internal preparation of that wait to execute in parallel. Admission conditions also include that the plan has been admitted, the current stage is still allowed, the relevant wait and electrical readiness conditions are met, the current resource permissions are valid, a valid write token is held when writing is involved, the number of retries has not reached the limit, and the completion path has been established.
[0213] All tasks within a conservative local window that completes before the earliest deadline can be compared with the minimum applicable remaining deadline and the unified required time. Power-on wait and common-mode wait cannot be directly used as the maximum remaining deadline and placed into this minimum value. When different deadlines correspond to different completion events, each event is checked, and the time taken for the entire recovery is not compared indiscriminately with the time limit for a single send response.
[0214] The execution process of budget constraints is as follows Figure 6 As shown, after content checks and path classification, the actions that enter the trial loading path must also pass stage permission, resource condition and full-scope budget checks: the budget includes loading, stabilization, verification, bounded stop or rollback and protection time within the scope of this expansion.
[0215] The worst-case budget for a single independent reception candidate attempt is 2μs for loading, 8μs for stabilization, 40μs for verification, 10μs for bounded backoff, and 10μs for synchronization and exit protection, totaling 70μs. After deducting other necessary stages and waiting periods, admission is granted when the minimum remaining budget within the local window is 100μs; admission is denied when only 60μs remain, and the loading attempt is not initiated, with the reason recorded. When shared bias recalibration is required, the budget is increased by incorporating recalibration for four lanes, instead of using the 70μs for a single lane. The budget and time values are assumptions illustrating the admission algorithm and are not fixed values from the protocol or actual device measurements.
[0216] Retry limits are configured as follows: a maximum of two private candidate attempts per parameter group and per stage identifier, and a maximum of one search from local to shared per shared domain and per recovery generation. Specific values are configurable.
[0217] Phase changes do not allow the same physical search to be extended indefinitely by clearing the counter. No new searches are initiated after entering the protection cutoff zone. Initiated operations end at the bounded stop or completion boundary declared in the descriptor, allowing sufficient time for safety processing and MAC coordination; operations without a trusted upper time bound are not permitted to enter the fast recovery window.
[0218] If a hardware failure prevents the system from reaching the upper limit, the system records the failure and enters the MAC control error or reset path. It does not falsify the receive recalibration completion status, suppress standard acknowledgments, or treat private task failures as normal link recovery completion.
[0219] Before sleep, check if the verified worst-case exit time of the selected deep energy-saving mode meets the system budget. After waking up, recalculate the remaining amount. All target lane calibrations, retests, and rollbacks affected by the new shared function are included. If the time limit cannot be met, disable fast path or deep shutdown optimization and do not change the standard time limit by resetting the private counter.
[0220] Example 12:
[0221] This embodiment, based on Embodiment 1, further defines the scope of failure propagation. Failure propagation covers all actual consumers of public resources, including non-target lanes and shared resources used by other links.
[0222] When a non-target lane is affected, the failure propagation and operation selection unit 104 records its pending calibration or verification flag, but does not forcibly activate the lane for this purpose. If the lane is needed later, it will be reprocessed according to the recorded flag. For PHYs that are configured with x4 but physically support x16, only the corresponding four lanes are activated; other lanes maintain their original usage state. The local target bitmap is not shrunk and claimed to have been successfully narrowed simply because one lane fails to recover. Failure propagation also does not skip the logical restoration of saved records simply because only four lanes are activated.
[0223] When a calibration operation affects other active links, the authorized controller first coordinates the legal status of that link. If shared modification permissions cannot be obtained, the controller chooses not to modify the already supported operations of shared resources, or reports that the recovery cannot be completed as currently planned, without bypassing the coordination process. If a public calibration itself requires an additional lane as a measurement aid, the auxiliary resources and their protocol-permitted behaviors are listed in the calibration operation descriptor, and the auxiliary lane is not counted as a new service lane.
[0224] The following rules apply to expanding the scope of impact during runtime:
[0225] When a candidate fails to be received, first try a local search of the current Lane that is allowed by the descriptor and has sufficient budget, or a full search with safe initial values. If a single Lane fails, shared bias modification is not automatically triggered.
[0226] Shared operations must meet the diagnostic conditions for abnormal public resources, such as public bias monitoring exceeding the calibration range, public self-test failure, or the combination of hardware-calibrated cross-lane symptoms and public diagnoses. The number of multi-lane failures does not replace root cause evidence.
[0227] Once a public anomaly has been identified, the corresponding shared repair is arranged directly, without forcing and wasting budget by repeatedly searching each lane locally. Diagnostic evidence and applicable templates are saved with upgrade requests.
[0228] Once the shared trigger conditions are met, freeze the relevant confirmation pathways, recalculate the impact closure, obtain permissions, and calculate the remaining budget. If the new scope includes a Lane that has already been verified, revoke its acceptance before modifying the shared resources.
[0229] If a dependency table is corrupted, undesirable coupling is found, or an operation actually writes to a set of write resources beyond the declared set, stop selective paths, expand the scope according to the trusted hardware template, or enter error recovery, and do not continue using the old plan with missing dependencies.
[0230] Dependency tables and operation tables are established based on simulated resource netlists, shared calibration engines, power supplies, clocks, bias topologies, and related perturbation verifications, binding hardware revisions and patterns; conservative domain-level edge coverage is used for couplings that are difficult to decompose but are known to exist. Template verification and actual write address monitoring can detect some configuration errors, but cannot prove the absence of the impact of unbuilt models; configurations lacking trusted models do not enable fine-grained selective recovery. If all parameter groups are affected, this application degrades to full processing and bears the corresponding management overhead; this degradation path still maintains version barriers and atomic acceptance mechanisms.
[0231] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.
Claims
1. A selective recovery method for PCIe SerDes low-power exit, characterized in that, include: In response to recovery events, determine the target physical channel and restore the logical context; The initial failure range is determined, and the initial failure range is iteratively expanded using the calibration validity dependency relationship, the set of write resources for calibration operations, and the set of disturbed parameter groups to obtain a recovery plan that includes the parameter group to be calibrated and the parameter group to be verified. The calibration validity dependency relationship is different from the startup dependency relationship. Before executing the resource modifications in the recovery plan, establish a modification barrier and revoke the existing acceptance status of the parameter group affected by the resource modifications. After the resource modifications are completed, update the calibration version of the corresponding resources. Perform actual loading and verification when resources are ready and the protocol phase allows it, and only confirm the corresponding parameter group when the verification passes, the parameter version and dependency version are consistent with the current version and there are no related pending modifications. Once the required parameter set for the target configuration is confirmed and the protocol configuration is consistent, the relevant recovery write is closed and a completion handover credential is generated. The completion handover credential is then mapped to the completion notification path of the actual recovery operation in this round by the protocol coordination unit.
2. The method according to claim 1, characterized in that, The table entries for the calibration validity dependency include source object, target parameter group, change determination condition, and treatment category; the treatment category includes recalibration verification and re-verification using candidate parameters; the source object includes shared resources or parameter groups, and the change determination condition is associated with calibrated equivalent conditions.
3. The method according to claim 1, characterized in that, An operation descriptor is set for the calibration operation, the operation descriptor including a set of write resources, a set of disturbed parameter groups, and a preceding calibration operation; the iterative expansion includes: merging the set of write resources of the selected calibration operation into the change set, merging the set of disturbed parameter groups into the set to be verified, propagating the change set along the calibration validity dependency, and repeating until the set no longer increases.
4. The method according to claim 1, characterized in that, An atomic sequence is established between resource write permission, parameter group acceptance submission, and completion handover credential submission; the resource executor only modifies the resource after the modification barrier takes effect and a currently valid write permission is obtained. Version comparison and acceptance status writes are committed transactions that cannot be inserted by related write operations; before committing the handover credentials, related recovery write access is closed and all issued write permissions are emptied.
5. The method according to claim 1, characterized in that, The verification record includes the recovery generation, task identifier, parameter group version, dependency version vector, and measurement scope; the recovery generation is used to isolate different recovery processes; the calibration version uses a monotonically increasing sequence number, and the calibration version does not roll back when the parameter value is restored to the previous value; old references are cleared or the isolation reset of the relevant producer is completed before any identifier is reused.
6. The method according to claim 1, characterized in that, The PCIe controller's transmit equalization protocol configuration and its physical layer execution mirror are stored and controlled separately from the physical layer's local transmit simulation calibration parameters; the address mask written for private recovery does not include the transmit equalization command area; local transmit simulation candidates are associated with the applicable protocol request sequence number, and submission is prohibited when the sequence number mismatches; the receiver-side rollback does not overwrite the currently valid transmit settings.
7. The method according to claim 1, characterized in that, For updates that require interruption to receive and restore the clock, RxValid is first revoked during the permitted protocol phase. The update is then maintained and counted by hardware for at least eight RxCLK cycles. Only after confirmation of maintenance completion is obtained is the corresponding destructive update executed. After the update, validity is re-established when the clock and interface conditions are met.
8. The method according to claim 1, characterized in that, First, perform context integrity, configuration, and dependency validity checks. Then, classify candidate paths using environmental differences and historical quality with comparable sensor conditions or calibrated environment conversion and error margin. Record the time interval from historical quality measurement to snapshot and the sleep duration, and determine validity according to their respective applicable configurations. If a reliable judgment cannot be made, disable fast paths that rely on this information.
9. The method according to claim 1, characterized in that, A series of snapshots are formed using a fixed base image, a cumulative overlay table, and a current round of change bitmaps. After a consistency check, a snapshot validity flag is committed. Power actuators are given shutdown permissions with a sleep transaction flag that are distinct from DeepPMAck#. Physical shutdown is allowed only when snapshots are committed, interfaces are drained, internal writes are completed, and isolation and wake-up conditions are met. Wake-up cancellation and shutdown operations are sorted at the shutdown commit point.
10. A selective recovery system for PCIe SerDes low-power exit, characterized in that, include: The system comprises a protocol coordination unit, a context storage unit, a startup scheduling unit, a failure propagation and operation selection unit, a resource version and modification barrier unit, a parameter execution and verification unit, and an acceptance gating unit; the system is configured to execute the method described in any one of claims 1 to 9.
