SATA Host Chip Verification System
The UVM-based SATA host chip verification system simplifies the verification process, shortens simulation time, and improves verification efficiency. It solves the problems of complexity and long simulation time in existing technologies, and achieves more efficient and flexible SATA host chip verification.
Patent Information
- Application Number
- CN202411043173.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing SATA host chip verification processes are complex and time-consuming. Traditional verification methods are difficult to be compatible with the UVM verification platform. The large amount of driver code affects simulation speed, lacks flexibility, and makes it difficult to construct test cases for random or abnormal scenarios.
A UVM-based SATA host chip verification system is adopted, which includes an AHCI driver verification platform, a SATA host chip, and a SATA device model. Data connections are established through the AXI interface and the physical layer interface. The AHCI driver software is simulated using SystemVerilog hardware description and hardware verification language to construct various error and exception scenarios, simplifying the verification process and improving flexibility.
Optimize the simulation process, shorten simulation time, improve verification efficiency, enhance verification flexibility and reliability, cover more comprehensive test scenarios, and reduce the possibility of errors.
Smart Images

Figure CN118569158B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of chip testing, and in particular to a SATA host chip verification system. Background Art
[0002] The Serial Advanced Technology Attachment (SATA) protocol is an interface protocol used to connect storage devices, such as hard drives and optical drives, to a computer motherboard.
[0003] The Advanced Host Controller Interface (AHCI) protocol is an interface standard for SATA controllers that provides advanced features and performance optimizations, including support for hot-plugging, native command sequencing, and better power management capabilities.
[0004] Universal Verification Methodology (UVM) is a standard methodology for chip verification, based on System Verilog hardware description and hardware verification language. It provides an object-oriented method to organize the test environment, generate test data, control simulation, and collect and analyze simulation results.
[0005] The current SATA host chip verification process has some shortcomings, mainly manifested in the complexity of the verification process and the long simulation time.
[0006] Since it involves many technical details and specification requirements, the engineering difficulty of implementing the AHCI protocol is relatively high. 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, which further leads to the complexity of its device initialization and configuration process and excessive software code. Therefore, for verifying SATA host chips, excessive driver code will seriously affect the simulation speed and reduce verification efficiency.
[0007] In addition, the standard AHCI driver software is implemented based on C language, which is not well compatible with the UVM verification platform based on SystemVerilog hardware description and hardware verification language, so it is not suitable for SATA host chip verification.
[0008] 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, and handed over to the central processing unit (CPU) core for execution. However, this method requires the verification platform to be equipped with a CPU core, which makes the module of the verification platform larger, prolongs the compilation and simulation time, and reduces the verification efficiency.
[0009] Furthermore, since the C language code needs to be written and compiled in advance, this approach lacks flexibility and makes it difficult to construct test cases for random or abnormal scenarios.
[0010] In addition, traditional verification methods usually require manual configuration and setting of various parameters one by one, which is complicated and time-consuming.
[0011] The present invention proposes a SATA host chip verification system, which aims to simplify the verification process, shorten the simulation time, and enhance the verification flexibility of the SATA host chip verification scheme, thereby improving the verification efficiency and accelerating the convergence of the verification results. Summary of the invention
[0012] In order to alleviate or partially alleviate the above technical problems, the solution of the present invention is as follows:
[0013] A SATA host chip verification system comprises an AHCI driver verification platform, a SATA host chip and a SATA device model, wherein the AHCI driver verification platform establishes a data connection with the SATA host chip via an AXI interface; the SATA host chip establishes a data connection with the SATA device model via a physical layer interface; wherein the SATA device model is a simulation model implemented based on the Verilog hardware description language; the AHCI driver verification platform is a verification platform that simulates AHCI driver software based on the SystemVerilog hardware description and hardware verification language; the top layer of the AHCI driver verification platform is a test platform top layer; the test platform top layer is configured as an instantiated verification environment layer.
[0014] Furthermore, the verification environment layer includes an AHCI proxy module, an AXI proxy module, a SATA configuration module, a reference model and a scoring module.
[0015] Furthermore, the AHCI proxy module includes: a monitor, a sequence generator, a driver and a converter.
[0016] Furthermore, the monitor is used to monitor the data sent by the AHCI driver verification platform to the SATA host chip, and to detect the data sent by the SATA device model to the SATA host chip; the sequence generator is used to generate different stimuli to drive the SATA host chip; the driver is used to implement the initialization configuration of the AHCI driver software level; and the converter is used to construct the commands specified by the AHCI protocol, FIS commands, and custom type commands.
[0017] Furthermore, the driver includes a first processing module and a second processing module; wherein the first processing module is configured to implement soft reset and startup of the SATA host chip; and the second processing module is configured to implement random allocation of FIS addresses and command addresses, initialization configuration of DMA transmission data, enabling of frame information structure receiving function, and clearing operations of interrupt registers and error registers.
[0018] Furthermore, the converter includes a first construction module, which is configured to simulate AHCI driver software to construct commands specified by the AHCI protocol, FIS commands, and user-defined type commands.
[0019] Furthermore, the AXI proxy module converts the software abstract behavior of the AHCI driver verification platform into a specific hardware bus operation, so as to implement the behavior of the AXI interface and complete the data transmission between the AHCI driver verification platform and the SATA host chip.
[0020] Furthermore, the SATA configuration module is used to configure the functional parameters of the SATA device model.
[0021] Furthermore, the reference model simulates the behavior of the SATA host chip to be tested, and processes the read or write data sent by the monitor in the AHCI driver verification platform, and then sends the processing result to the scoring module; the scoring module compares the processing result sent by the reference model with the data sent by the SATA device model, and outputs the comparison result.
[0022] The technical solution of the present invention has one or more of the following beneficial technical effects:
[0023] (1) The present invention optimizes the simulation process and shortens the simulation time, thereby accelerating the speed of the entire verification convergence, improving the efficiency of verification, and also reducing the possibility of errors, making the verification process of the SATA host chip more reliable and efficient.
[0024] (2) The present invention implements an AHCI driver verification platform based on UVM, making it applicable and compatible with the UVM verification platform and highly reusable.
[0025] (3) Traditional AHCI drivers follow protocol specifications, but have difficulty coping with certain special non-protocol scenarios. In contrast, the present invention is more flexible. The AHCI driver verification platform can introduce errors or abnormal situations according to requirements, and can simulate and construct various errors and abnormal scenarios, which enables the verification of SATA host chips to cover more comprehensive scenarios and make the test results more reliable.
[0026] In addition, other beneficial effects of the present invention will be mentioned in the specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a block diagram of the SATA host chip verification system based on UVM;
[0028] Figure 2 It is the system block diagram of the AHCI driver verification platform. DETAILED DESCRIPTION
[0029] 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.
[0030] 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.
[0031] Figure 1 The block diagram of the SATA host chip verification system based on UVM of the present invention is shown, which is used to realize the verification of the SATA host chip. The whole verification system mainly consists of three parts: AHCI driver verification platform, design under test (DUT) module, and SATA device model.
[0032] The DUT in the present invention is a SATA host chip. According to the AHCI protocol and the SATA protocol, since the AHCI driver verification platform in the present invention is an AHCI driver, by configuring the DUT, it can indirectly interact with the SATA device model to achieve the purpose of software accessing hardware. On the other hand, the SATA device model will also access the AHCI driver verification platform with the help of the SATA host chip to achieve the purpose of hardware accessing software.
[0033] The AHCI driver verification platform of the present invention realizes the function of simulating AHCI driver software based on UVM, and can control the start of simulation test and the instantiation of modules and the connection between modules. The AHCI driver verification platform establishes a data connection with the DUT through an Advanced Extensible Interface (AXI).
[0034] The DUT described in the present invention is a SATA host chip. The SATA host chip is a chip to be tested by the verification system and implemented by a digital circuit. In the present invention, the SATA host chip to be tested is usually a register transfer level code. The SATA host chip includes a controller and a physical layer. The SATA host chip provides an AXI interface and a physical layer interface of the host end.
[0035] 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 side of the SATA host chip for connecting to an external SATA device model, thereby establishing a data connection channel between the SATA host chip and the SATA device model.
[0036] The SATA device model described in 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.
[0037] Preferably, if the SATA host chip includes multiple host-side physical layer interfaces, multiple SATA device models are instantiated, and communication with the SATA host chip is performed using different host-side physical layer interfaces and device-side physical layer interfaces, respectively.
[0038] Figure 2 The system block diagram of the AHCI driver verification platform is shown. In the present invention, the top layer of the AHCI driver verification platform is the top layer of the test platform. The AHCI driver verification platform is a verification platform written based on the System Verilog hardware description and hardware verification language, and is used to simulate the AHCI driver software.
[0039] The top layer of the test platform includes multiple functions: an interface for instantiating and connecting the test platform; an interface for instantiating the verification environment layer; an interface for instantiating the SATA host chip and the SATA device model; and a interface for controlling the start of the simulation test of the entire AHCI driver verification platform.
[0040] The top layer of the test platform includes a verification environment layer. The verification environment layer includes an AHCI proxy module, an AXI proxy module, a SATA configuration module, a reference model and a scoring module. In the present invention, the test case calls various modules through the verification environment layer to complete the generation and sending of the drive stimulus of the SATA host chip.
[0041] Furthermore, the AHCI agent module includes: a monitor, a sequence generator, a driver and a converter.
[0042] In the present invention, the monitor is used to monitor the data of the AHCI driver verification platform. The sequence generator is used to issue the sequence constructed by the AHCI driver verification platform. The driver is used to implement the initialization configuration of the AHCI driver software level and comply with the AHCI standard specification. The converter is used to construct commands, frame information structures (Frame Information Structure, FIS) and various customized operation command processes, wherein FIS is a mechanism for information transmission between the SATA host chip and the SATA device model, and the format of each FIS is fixed.
[0043] Specifically, the monitor is used to monitor the data sent from the AHCI driver verification platform to the SATA host chip, and the data sent from the SATA device model to the SATA host chip.
[0044] Specifically, the sequence generator is used to generate different stimuli to drive the SATA host chip.
[0045] In the present invention, the driver includes a first processing module and a second processing module. The first processing module is configured to implement the init_ata_proc method, and the second processing module is configured to implement the init_port_proc method. The init_ata_proc method is used to implement the soft reset and startup of the SATA host chip, as well as the clearing function of several registers. The init_port_proc method is used to implement the random allocation of FIS addresses and command addresses, the initialization configuration of direct memory access (DMA) transmission data, the enabling of the frame information structure receiving function, and the clearing operation of the interrupt register and the error register.
[0046] The converter includes a first building block configured to implement a do_ata_cmd_proc method.
[0047] The do_ata_cmd_proc method can be used to simulate the AHCI driver software and construct commands specified by the AHCI protocol, FIS commands, and several user-defined type commands.
[0048] Construct the command specified by the AHCI protocol through the do_ata_cmd_proc method, and construct the command header, physical region descriptor table (PRDT) and frame information structure according to the process;
[0049] Construct a FIS command through the do_ata_cmd_proc method, and construct the command header and frame information structure according to the process.
[0050] A custom type command is constructed by the do_ata_cmd_proc method, wherein 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.
[0051] According to the AHCI protocol, the data structure of the protocol layer is processed layer by layer to realize the transmission of the SATA data packet. In other words, the present invention can realize the processing of different types of stimuli through the do_ata_cmd_proc method in the converter.
[0052] In addition, the AXI proxy module of the present invention is used to implement the behavior of the AXI interface, convert the software abstract behavior of the AHCI driver into a specific hardware bus operation, and complete the data transmission between the AHCI driver verification platform and the SATA host chip. The data transmission process complies with the AXI bus protocol specification.
[0053] The SATA configuration module of the present invention is used to configure the functional parameters of the SATA device model in the verification system.
[0054] The reference model and the scoring module connect the AHCI driver verification platform to the SATA device model respectively. The reference model simulates the behavior of the SATA host chip to be tested, processes the read or write data sent by the monitor in the AHCI driver verification platform, and then sends the processing results to the scoring module.
[0055] Furthermore, the scoring module compares the processing result sent by the reference model with the data sent by the SATA device model, and outputs the comparison result, such as printing the relevant result. Furthermore, the data sent by the SATA device model is transmitted via the monitor.
[0056] 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.
[0057] 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 system, comprising an AHCI driver verification platform, a SATA host chip and a SATA device model, characterized in that: The AHCI driver verification platform establishes a data connection with the SATA host chip via the AXI interface; The SATA host chip establishes a data connection with the SATA device model via a physical layer interface; wherein, The SATA device model is a simulation model implemented based on the Verilog hardware description language; The AHCI driver verification platform is a verification platform that simulates AHCI driver software based on System Verilog hardware description and hardware verification language; The topmost layer of the AHCI driver verification platform is a test platform top layer, and the test platform top layer is configured as an instantiation verification environment layer; The verification environment layer includes an AHCI proxy module, an AXI proxy module, a SATA configuration module, a reference model and a scoring module; The AHCI proxy module includes: a monitor, a sequence generator, a driver and a converter; The monitor is used to monitor the data sent by the AHCI driver verification platform to the SATA host chip, and detect the data sent by the SATA device model to the SATA host chip; The sequence generator is used to generate different stimuli to drive the SATA host chip; The driver is used to implement initialization configuration at the AHCI driver software level; The converter is used to construct commands specified by the AHCI protocol, FIS commands and user-defined type commands; The driver includes a first processing module and a second processing module; wherein, The first processing module is configured to implement soft reset and startup of the SATA host chip; The second processing module is configured to implement random allocation of FIS addresses and command addresses, initialization configuration of DMA transmission data, enabling of frame information structure receiving function, and clearing operations of interrupt registers and error registers; The converter includes a first construction module, which is configured to simulate the AHCI driver software to construct commands specified by the AHCI protocol, FIS commands, and user-defined type commands; The AXI proxy module converts the software abstract behavior of the AHCI driver verification platform into a specific hardware bus operation, which is used to implement the behavior of the AXI interface and complete the data transmission between the AHCI driver verification platform and the SATA host chip; The reference model simulates the behavior of the SATA host chip to be tested, processes the read or write data sent by the monitor in the AHCI driver verification platform, and then sends the processing result to the scoring module; The scoring module compares the processing result sent by the reference model with the data sent by the SATA device model, and outputs the comparison result.
2. The SATA host chip authentication system according to claim 1, characterized in that: The SATA configuration module is used to configure the functional parameters of the SATA device model.
