SATA host chip verification method

The AHCI driver verification platform written in System Verilog simplifies the configuration and communication process of the SATA host chip, solves the problems of large amount of AHCI protocol driver code and low verification efficiency, and achieves rapid verification and random testing support.

CN118569159BActive Publication Date: 2024-10-01成都星拓微电子科技股份有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411043277.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-01
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

When validating SATA host chips with the existing technology, the amount of software driver code for the AHCI protocol is huge, resulting in slow simulation speed and low verification efficiency. Moreover, the AHCI standard driver implemented in C language is incompatible with the System Verilog hardware description, making it difficult to construct random or abnormal tests. use cases, and manually configuring parameters is cumbersome.

Method used

The AHCI driver verification platform written in System Verilog hardware description and hardware verification language configures the SATA host chip through the AXI interface, simplifies the configuration process, constructs incentives in the corresponding format, uses the scoring module to compare data and output error messages, and supports error and exception testing. scene.

Benefits of technology

It simplifies the configuration and communication process of SATA host and device models, reduces code complexity, improves verification efficiency, and supports rapid verification and the construction of random test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569159B_ABST
    Figure CN118569159B_ABST
Patent Text Reader

Abstract

The present invention discloses a SATA host chip verification method. In order to improve the verification efficiency, the SATA host chip verification method disclosed by the present invention includes: an AHCI driver verification platform initializes the SATA host chip configuration; the SATA host chip continuously sends an out-of-band signal, waiting for the SATA device model to be connected; the SATA device model begins to be connected to the SATA host chip; in response to the out-of-band signal, the SATA device model and the SATA host chip begin to enter the process of establishing a data link; when the data link between the SATA device model and the SATA host chip is established, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type; the scoring module compares the data sent by the SATA device model with the data output by the reference model simulating the behavior of the SATA host chip, and if the comparison result is inconsistent, an error message is output. The present invention simplifies the configuration and communication process, improves the communication efficiency between the SATA host chip and the SATA device model, and reduces the complexity of the code. The present invention is suitable for the field of chip testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of chip testing, and in particular to a SATA host chip verification method. Background Art

[0002] The Serial Advanced Technology Attachment (SATA) protocol and the Advanced Host Controller Interface (AHCI) protocol are two widely used interface protocols. The Universal Verification Methodology (UVM) is a standard methodology for chip verification.

[0003] The engineering difficulty of implementing the AHCI protocol is relatively high due to the many technical details and specification requirements involved. From a software perspective, the AHCI protocol needs to interact with the storage subsystem of the operating system, which involves the development of device drivers and system calls, resulting in extremely complex device initialization and configuration processes and a large amount of software code. Therefore, when verifying SATA host chips, excessive driver code will seriously affect the simulation speed, thereby reducing verification efficiency.

[0004] In addition, the AHCI standard driver software is implemented based on C language, which is not compatible with the UVM verification platform based on System Verilog hardware description and hardware verification language, and is therefore not suitable for SATA host chip verification. In existing technical solutions, the existing driver code is usually simplified or reconstructed, and then compiled into a hex format file or a bin format file for execution by the central processing unit (CPU) core. However, this method requires the verification platform to be equipped with a CPU core, making the module of the verification platform larger, prolonging the compilation and simulation time, and reducing the verification efficiency.

[0005] In addition, since the C language code needs to be written and compiled in advance, this method lacks flexibility and is difficult to construct test cases for random or abnormal scenarios. At the same time, traditional verification methods usually require manual configuration and setting of various parameters one by one, which is cumbersome and time-consuming.

[0006] The present invention proposes a SATA host chip verification method, aiming to simplify the verification process of the SATA host chip verification scheme, reduce the complexity of the test code, and improve the communication efficiency, thereby improving the verification efficiency. Summary of the invention

[0007] In order to alleviate or partially alleviate the above technical problems, the solution of the present invention is as follows:

[0008] A SATA host chip verification method comprises the following steps: step S10: an AHCI driver verification platform initializes the SATA host chip configuration; the SATA host chip continuously sends an out-of-band signal and waits for the SATA device model to access; wherein the AHCI driver verification platform comprises a reference model; step S20: the SATA device model starts to access the SATA host chip; in response to the out-of-band signal, the SATA device model and the SATA host chip start to enter the process of establishing a data link; step S30: after the data link between the SATA device model and the SATA host chip is established, the AHCI driver verification platform constructs a stimulus in a corresponding format according to the command type; step S40: a scoring module compares the data sent by the SATA device model with the data output by the reference model simulating the behavior of the SATA host chip, and outputs an error message if the comparison result is inconsistent.

[0009] Furthermore, step S10 further includes the following steps:

[0010] Step S101: the AHCI driver verification platform configures the soft reset register in the SATA host chip through the AXI interface to reset the SATA host chip to an initial state.

[0011] Furthermore, step S10 further includes the following steps:

[0012] Step S102: After the soft reset is completed, the AHCI register in the SATA host chip is configured, and the port of the SATA host chip used by the AHCI driver verification platform is enabled.

[0013] Furthermore, whether the soft reset is completed is determined by checking the register.

[0014] Furthermore, step S10 further includes the following steps:

[0015] Step S103: configuring the AHCI register in the SATA host chip in the AHCI driver verification platform to achieve random allocation of the FIS address and the command address.

[0016] Furthermore, step S10 further includes the following steps:

[0017] Step S104: Initialize the configuration of DMA data transmission in the SATA host chip in the AHCI driver verification platform, enable the frame information structure receiving function, and clear the interrupt register and the error register.

[0018] Further, in step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including:

[0019] If the command type is a command specified by the AHCI protocol, the AHCI driver verification platform constructs a physical domain description table, a command header, and a frame information structure, and forms and sends a stimulus in the command format specified by the AHCI protocol.

[0020] Further, in step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including:

[0021] If the command type is a FIS command, the AHCI driver verification platform constructs a command header and a frame information structure, and forms and sends a stimulus in the FIS command format.

[0022] Further, in step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including:

[0023] If the command type is a custom type command, the AHCI driver verification platform constructs a custom type command format according to user requirements, and the custom type command format includes one or more of the following contents: a configuration register, a command specified by the AHCI protocol, and a frame information structure.

[0024] Furthermore, the AHCI driver verification platform is written in System Verilog hardware description and hardware verification language, and is used to simulate the AHCI software driver.

[0025] The technical solution of the present invention has one or more of the following beneficial technical effects:

[0026] (1) The present invention can encapsulate and automatically run most of the configuration process, greatly reducing the manual repetitive coding process, and can effectively simplify the configuration and communication process of the SATA host and SATA device models, thereby achieving the purpose of rapid verification and avoiding the tedious process of manually configuring and setting various parameters one by one in the traditional verification method.

[0027] (2) Based on strict compliance with the AHCI protocol specification, the present invention not only simplifies the device configuration and communication process, but also optimizes the processing method of the software application layer. This not only significantly reduces the complexity of the code, but also greatly improves the communication efficiency between the analog driver and the SATA host chip.

[0028] In addition, other beneficial effects of the present invention will be mentioned in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a schematic diagram of a verification system for implementing a SATA host chip based on UVM;

[0030] Figure 2It is a flow chart of the SATA host chip verification method of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0033] Figure 1 The present invention shows a schematic diagram of a verification system for implementing a SATA host chip based on UVM. The verification system for the SATA host chip includes: an AHCI driver verification platform, a SATA host chip and a SATA device model.

[0034] The AHCI driver verification platform of the present invention is a UVM-based verification platform for simulating AHCI software drivers written in System Verilog hardware description and hardware verification language, and can control the start of simulation test and the instantiation of modules and the connection between modules.

[0035] Furthermore, the AHCI driver verification platform includes a reference model.

[0036] Compared with the AHCI software driver implemented in the traditional C language, the AHCI driver verification platform simulating the AHCI software driver of the present invention can support the addition of error and abnormal test scenarios. In addition, the AHCI driver verification platform establishes a data connection between the SATA host chip through the Advanced Extensible Interface (AXI).

[0037] The SATA host chip of the present invention is a design module to be tested and is also the object of the chip test of the present invention, which is usually a register transfer level code designed by a chip designer. The SATA host chip provides an AXI interface and a physical layer interface of the host end. The controller provides an AXI interface for establishing a data connection with the AHCI driver verification platform to achieve interaction between software and hardware. The physical layer provides a physical layer interface of the host end of the SATA host chip for connecting an external SATA device model, thereby establishing a data connection channel between the SATA host chip and the SATA device model.

[0038] The SATA device model of the present invention, as a downstream device of the SATA host chip and communicating with the SATA host chip, is a simulation model implemented by the Verilog hardware description language. According to the SATA protocol, it can simulate the real SATA device behavior and provide a physical layer interface on the device side. It is connected to the SATA host chip through the physical layer interface on the device side to complete data transmission.

[0039] In addition, the Frame Information Structure (FIS) is the information transmission mechanism between the host and the device specified in the SATA protocol, which specifies the data frame structure transmitted on the SATA bus.

[0040] Based on the above three modules, namely the AHCI driver verification platform, the SATA host chip, and the SATA device model, the data flow of software accessing hardware and hardware accessing software can be realized, which constitutes the basis of the verification method of the present invention.

[0041] Figure 2 The flowchart of the SATA host chip verification method of the present invention is shown. The SATA host chip verification method of the present invention comprises the following steps:

[0042] Step S10: the AHCI driver verification platform initializes the SATA host chip configuration; the SATA host chip continues to send an Out Of Band (OOB) signal, waiting for the SATA device model to access.

[0043] In addition, the AHCI driver verification platform includes a reference model.

[0044] Furthermore, in step S10, the following steps are specifically included:

[0045] Step S101: the AHCI driver verification platform configures the soft reset register in the SATA host chip through the AXI interface to reset the SATA host chip to an initial state.

[0046] Step S102: After the soft reset is completed, the AHCI register in the SATA host chip is configured, and the port of the SATA host chip used by the AHCI driver verification platform is enabled.

[0047] Furthermore, whether the soft reset is completed is determined by checking the register.

[0048] Step S103: configuring the AHCI register in the SATA host chip in the AHCI driver verification platform to achieve random allocation of the FIS address and the command address.

[0049] Step S104: Initialize the configuration of direct memory access (DMA) data transmission in the SATA host chip in the AHCI driver verification platform, enable the frame information structure receiving function, and clear the interrupt register and the error register.

[0050] Through the above steps S101, S102, S103 and S104, the AHCI driver verification platform completes initializing the SATA host chip configuration.

[0051] Step S20: the SATA device model starts to access the SATA host chip; in response to the out-of-band signal, the SATA device model and the SATA host chip start to enter the process of establishing a data link.

[0052] Step S30: After the data link between the SATA device model and the SATA host chip is established, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type.

[0053] Specifically, if the command type is a command specified by the AHCI protocol, the AHCI driver verification platform constructs a physical region descriptor table (PRDT), a command header, and a frame information structure to form and send a stimulus in the command format specified by the AHCI protocol.

[0054] If the command type is a FIS command, the AHCI driver verification platform constructs a command header and a frame information structure, and forms and sends a stimulus in the FIS command format.

[0055] If the command type is a custom type command, the AHCI driver verification platform constructs a custom type command format according to user requirements, and the custom type command format includes one or more of the following contents: configuration register, command specified by the AHCI protocol, and frame information structure. For example, any one, any two, or three of the above contents, and any one of them can appear twice or more.

[0056] Step S40: the scoring module compares the data sent by the SATA device model with the data output by the reference model simulating the behavior of the SATA host chip. If the comparison result is inconsistent, an error message is output.

[0057] Furthermore, the data sent by the SATA device model is transmitted via a monitor in the AHCI driver verification platform.

[0058] In the present invention, in the verification system of the SATA host chip, a test stimulus is generated and sent to the SATA host chip and the reference model at the same time. In the scoring module, the final processing results of two different data paths are compared. If the processing results are the same, the test passes. If they are different, an error is reported, that is, the test fails.

[0059] In order to better illustrate the present invention, numerous specific details are provided in the above specific embodiments. It should be understood by those skilled in the art that the present invention can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

[0060] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A SATA host chip verification method, characterized in that: The steps include: Step S10: the AHCI driver verification platform initializes the SATA host chip configuration; the SATA host chip continues to send out-of-band signals, waiting for the SATA device model to access, wherein the AHCI driver verification platform includes a reference model; Step S20: the SATA device model starts to access the SATA host chip; in response to the out-of-band signal, the SATA device model and the SATA host chip start to enter the process of establishing a data link; Step S30: After the data link between the SATA device model and the SATA host chip is established, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type; Step S40: the scoring module compares the data sent by the SATA device model with the data output by the reference model simulating the behavior of the SATA host chip. If the comparison result is inconsistent, an error message is output; wherein, The AHCI driver verification platform is written in System Verilog hardware description and hardware verification language, and is used to simulate the AHCI software driver.

2. The SATA host chip verification method according to claim 1, characterized in that: Step S10 also includes the following steps: Step S101: the AHCI driver verification platform configures the soft reset register in the SATA host chip through the AXI interface to reset the SATA host chip to an initial state.

3. The SATA host chip verification method according to claim 2, characterized in that: Step S10 also includes the following steps: Step S102: After the soft reset is completed, the AHCI register in the SATA host chip is configured, and the port of the SATA host chip used by the AHCI driver verification platform is enabled.

4. The SATA host chip verification method according to claim 3, characterized in that: By checking the register, it is determined whether the soft reset is completed.

5. The SATA host chip verification method according to claim 3, characterized in that: Step S10 also includes the following steps: Step S103: configuring the AHCI register in the SATA host chip in the AHCI driver verification platform to achieve random allocation of the FIS address and the command address.

6. The SATA host chip verification method according to claim 5, characterized in that: Step S10 also includes the following steps: Step S104: Initialize the configuration of DMA data transmission in the SATA host chip in the AHCI driver verification platform, enable the frame information structure receiving function, and clear the interrupt register and the error register.

7. The SATA host chip verification method according to claim 6, characterized in that: In step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including: If the command type is a command specified by the AHCI protocol, the AHCI driver verification platform constructs a physical domain description table, a command header, and a frame information structure, and forms and sends a stimulus in the command format specified by the AHCI protocol.

8. The SATA host chip verification method according to claim 6, characterized in that: In step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including: If the command type is a FIS command, the AHCI driver verification platform constructs a command header and a frame information structure, and forms and sends a stimulus in the FIS command format.

9. The SATA host chip verification method according to claim 6, characterized in that: In step S30, the AHCI driver verification platform constructs a stimulus of a corresponding format according to the command type, including: If the command type is a custom type command, the AHCI driver verification platform constructs a custom type command format according to user requirements, and the custom type command format includes one or more of the following contents: a configuration register, a command specified by the AHCI protocol, and a frame information structure.

Citation Information

Patent Citations

  • Test method for automatically testing logic equipment interface

    CN110825647A

  • UVM-based xHCI drive implementation system and method

    CN117785593A

  • Offline functional coverage collection

    US11250191B1

  • Out-of-band access to storage devices through port-sharing hardware

    US20120017011A1