PECI bus protocol command response construction method, apparatus, equipment and media
By constructing a command response method based on the PECI bus protocol, the processor model is simplified, and PECI protocol support verification for controllers or repeaters is realized, thus solving the problem of simulation environment complexity in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2026-03-13
AI Technical Summary
In the verification of controllers or repeaters based on the PECI bus protocol, it is difficult to effectively simulate the function of the processor. Existing technologies have failed to fully verify the PECI protocol response values of the slave device, resulting in high complexity of the simulation environment.
A method for constructing PECI bus protocol command responses is provided. The host sends a command, the slave parses and caches the read and write byte length values, generates a command response value containing FCS bytes, and generates the timing of response values for different commands based on the command code, thus simplifying the processor model.
It simplifies the complexity of the simulation environment, enables verification of PECI protocol support for controllers or repeaters, and reduces the difficulty of testing.
Smart Images

Figure CN115480965B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of PECI bus communication, and in particular to a method, apparatus, device and medium for constructing PECI bus protocol command responses. Background Technology
[0002] PECI (Platform Environment Control Interface) is a single-wire bidirectional bus interface with a master / slave architecture used for temperature monitoring, power consumption control, and status monitoring of Intel processors. However, the PECI bus requires verification. The following are publicly disclosed and authorized patents related to PECI bus verification: CN108536636A, "A Master-Slave Negotiation Timing Machine Based on PECI Bus," describes the timing relationship between address and message segments negotiated between master and slave devices based on the PECI bus, as well as the calculation and generation methods of logic levels; CN107229858A, "A PECI Bus Master-Slave Verification System and Method Supporting CRC8 Checksum," describes a communication between master and slave devices, wherein the data returned to the master contains a CRC8 checksum for verifying data reliability transmission; CN106997318A, "A PECI Bus Verification Method and System Supporting Multiple Slaves," describes a verification method and system based on the PECI bus, defines a master-slave model, the top-level structure of the verification environment and test case settings, and elaborates on the testing methods, data flow, and criteria for determining test stimuli, thereby verifying the correctness of the PECI bus interface. However, currently, when verifying the functionality of controllers or repeaters based on the PECI protocol, the host sends commands to the controller or repeater, which then sends them to the slave device. The slave device then returns response values based on different commands. The slave device is usually the processor core, making it difficult to build a processor model in the verification environment. Furthermore, controllers or repeaters based on the PECI bus protocol only handle the issuance of relevant commands within the PECI protocol and the return of response values from the slave device; they do not involve other processor functions. Summary of the Invention
[0003] In view of this, it is necessary to provide a method, apparatus, device and medium for constructing PECI bus protocol command responses to address the above technical problems.
[0004] According to a first aspect of the present invention, a method for constructing a PECI bus protocol command response is provided, the method comprising performing the following operations during functional verification of a controller or repeater based on the PECI protocol:
[0005] The host sends any command in the PECI bus protocol to the slave.
[0006] The slave device parses the received commands and caches the read / write byte length values in the commands;
[0007] If both the read and write byte length values are equal to 0, the slave device generates a command response value containing one FCS byte and returns it to the master device.
[0008] If the read / write byte length value is not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0009] In some embodiments, the host sends any command in the PECI bus protocol to the slave, including:
[0010] The host sends any command in the PECI bus protocol to the controller or repeater;
[0011] The commands are translated using a controller or repeater and then sent to the slave device.
[0012] In some embodiments, in response to a read / write byte length value not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device, including:
[0013] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0014] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0015] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0016] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0017] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0018] According to a second aspect of the present invention, a PECI bus protocol command response construction apparatus is provided, which performs the following operations using the following modules when performing functional verification of a controller or repeater based on the PECI protocol:
[0019] The command sending module is configured to send any command in the PECI bus protocol from the host to the slave.
[0020] The caching module is configured to parse commands received by the slave device and cache the read / write byte length values in the commands.
[0021] The first return module is configured to respond to a situation where both the read and write byte length values are equal to 0, in which case the slave device generates a command response value containing one FCS byte and returns it to the master device.
[0022] The second return module is configured to respond to a read / write byte length value that is not equal to 0. In this case, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0023] In some embodiments, the command sending module is further configured to:
[0024] The host sends any command in the PECI bus protocol to the controller or repeater;
[0025] The commands are translated using a controller or repeater and then sent to the slave device.
[0026] In some embodiments, the second return module is further configured to:
[0027] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0028] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0029] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0030] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0031] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0032] According to a third aspect of the present invention, a computer device is also provided, the computer device comprising:
[0033] At least one processor; and
[0034] The memory stores computer programs that can run on the processor, and the processor executes the aforementioned PECI bus protocol command response construction method when executing the program.
[0035] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, performs the aforementioned PECI bus protocol command response construction method.
[0036] The aforementioned PECI bus protocol command response construction method is applied in the testing of a controller or repeater based on the PECI protocol that supports the host to issue relevant commands and read the slave command response values. It constructs the response value return timing of different commands according to the differences in the commands issued by the host, thereby simulating the PECI command response value timing of the slave, simplifying the processor model, reducing the complexity of the simulation environment, and the returned response value can be changed according to the issued command, thereby satisfying the test of the issued command and verifying the controller or repeater's support for the PECI protocol.
[0037] In addition, the present invention also provides a PECI bus protocol command response construction device, a computer device, and a computer-readable storage medium, which can achieve the above-mentioned technical effects, and will not be described in detail here. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating a method for constructing a PECI bus protocol command response according to an embodiment of the present invention;
[0040] Figure 2 A flowchart illustrating another method for constructing PECI bus protocol command responses according to another embodiment of the present invention;
[0041] Figure 3 A schematic diagram of a PECI bus protocol command response construction device provided in another embodiment of the present invention;
[0042] Figure 4 This is an internal structural diagram of a computer device according to another embodiment of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0044] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.
[0045] To facilitate understanding, some of the technical terms used in this article will be explained first:
[0046] Platform Environment Control Interface (PECI) is a single-wire, bidirectional bus interface used for Intel processor temperature monitoring, power consumption control, and status monitoring, employing a master / slave architecture.
[0047] Frame Check Sequence (FCS) is a sequence of data checks performed on frames. It is typically calculated by accumulating frame data byte by byte to obtain one FCS byte.
[0048] The commands ping, gettemp, getdib, wrpkgconfig, and rdpkgconfig are specified in the PECI protocol. These commands are issued by the host, and the slave responds to them to complete the tasks defined by the protocol. Specifically, ping tests the master-slave connection, gettemp retrieves the temperature value, getdib retrieves the version number, wrpkgconfig writes the configuration data, and rdpkgconfig reads the configuration data.
[0049] `write_length` and `read_length` are the length values of bytes to be read or written in the command.
[0050] cmd_code, hostid, index, parameter, data, etc., are the contents of the command that are written and read.
[0051] The controller or repeater, located between the master and slave devices, serves as a connector, enabling the conversion between the two bus interface protocols on the master and slave sides, and facilitating the issuance of relevant commands and the return of responses.
[0052] In one embodiment, please refer to Figure 1As shown, the present invention provides a PECI bus protocol command response construction method 100. Specifically, the method includes performing the following operations when performing functional verification of a controller or repeater based on the PECI protocol:
[0053] Step 101: The host sends any command in the PECI bus protocol to the slave.
[0054] Step 102: The slave device parses the received command and caches the read / write byte length value in the command;
[0055] Step 103: In response to the fact that the length values of both read and write bytes are equal to 0, the slave device generates a command response value containing one FCS byte and returns it to the master device.
[0056] Step 104: In response to the read / write byte length value not being equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0057] The aforementioned PECI bus protocol command response construction method is applied in the testing of a controller or repeater based on the PECI protocol that supports the host to issue relevant commands and read the slave command response values. It constructs the response value return timing of different commands according to the differences in the commands issued by the host, thereby simulating the PECI command response value timing of the slave, simplifying the processor model, reducing the complexity of the simulation environment, and the returned response value can be changed according to the issued command, thereby satisfying the test of the issued command and verifying the controller or repeater's support for the PECI protocol.
[0058] In some embodiments, step 101, in which the host sends any command in the PECI bus protocol to the slave, includes:
[0059] The host sends any command in the PECI bus protocol to the controller or repeater;
[0060] The commands are translated using a controller or repeater and then sent to the slave device.
[0061] In some embodiments, in step 104 above, in response to a read / write byte length value not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device, including:
[0062] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0063] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0064] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0065] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0066] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0067] In another embodiment, we take the scenario of verifying the correctness of the command response return value of a controller or repeater based on the PECI bus protocol as an example. According to the PECI protocol, the read / write byte length values and command codes in commands issued by the host are different, and the read byte length value does not include the FCS byte. The ping command has a read / write byte length of 0, contains only the slave address and no command code, and the command response return value is one FCS byte. Apart from this, other commands have non-zero write and read byte length values, and the response return value contains the first and last two FCS bytes. This solution classifies commands based on the write byte length, read byte length, and command code. When the slave receives a command, it caches the read / write byte length values and the command code. Based on these cached values, when returning the command response value, it provides the corresponding command response return content and generates the corresponding timing output. Please refer to the following... Figure 2 The diagram illustrates another method for constructing PECI bus protocol command responses, 200, with the specific processing flow as follows:
[0068] Step 201: Simulation begins. The host sends any command in the protocol, which is then converted by the controller or repeater and sent to the slave. Proceed to step 202.
[0069] Step 202: The slave device receives the master command and parses the master command content, obtains the slave address, caches the read / write byte length value, and proceeds to step 203.
[0070] Step 203: When both the write and read byte length values are 0, return one FCS byte to complete the ping command response return timing and return to step 201; if neither the read nor write byte length is 0, proceed to step 204.
[0071] Step 204: If the write byte length is 1, only the corresponding command code is cached, and then the first FCS byte of the response value is returned, proceeding to step 206, such as read commands like gettemp and getdib. If the write length is greater than 1, proceed to step 205;
[0072] Step 205: If the write byte length is greater than 1, in addition to caching the corresponding command code, cache the corresponding configuration data content according to the write byte length value. The write byte length value cached in step 202 controls the end of the data caching process. Then, return the first FCS byte of the response value and proceed to step 206, such as configuration commands like wrpkgconfig and rdpkgconfig.
[0073] Step 206: Based on the command code cached in step 204, select different command response values to return. Specifically, the cached read byte length value in step 202 controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned, and the process proceeds to step 207.
[0074] Step 207: At this point, the host has completed one command response and returns to step 201 to wait for the next command to be issued and the command response value to be returned.
[0075] This embodiment of a PECI bus protocol command response construction method has at least the following beneficial technical effects: when applied to tests of a controller or repeater based on the PECI protocol supporting the host to issue relevant commands and read the slave command response values, it adopts a method of simulating the timing of the slave's return response values to test the controller or repeater's support for the PECI protocol, simplifies the processor model, reduces the complexity of the simulation environment, and the returned response values can be changed according to the issued commands, thereby satisfying the test of issued commands and verifying the controller or repeater's support for the PECI protocol.
[0076] In yet another embodiment, please refer to Figure 3 The present invention also provides a PECI bus protocol command response construction apparatus 300, which performs the following operations using the following modules when performing functional verification of a controller or repeater based on the PECI protocol:
[0077] Command sending module 301 is configured to send any command in the PECI bus protocol from the host to the slave.
[0078] The cache module 302 is configured to parse the received commands by the slave device and cache the read / write byte length values in the commands;
[0079] The first return module 303 is configured to generate a command response value containing one FCS byte and return it to the host in response to the fact that both the read and write byte length values are equal to 0.
[0080] The second return module 304 is configured to respond to a read / write byte length value that is not equal to 0, in which case the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0081] The aforementioned PECI bus protocol command response construction device is used in tests where a controller or repeater based on the PECI protocol supports the host issuing relevant commands and reading the slave command response values. It constructs the response value return timing of different commands based on the differences in the commands issued by the host, thereby simulating the PECI command response value timing of the slave, simplifying the processor model, reducing the complexity of the simulation environment, and the returned response value can be changed according to the issued command, thus satisfying the test of the issued command and verifying the controller or repeater's support for the PECI protocol.
[0082] In some embodiments, the command sending module 301 is further configured to:
[0083] The host sends any command in the PECI bus protocol to the controller or repeater;
[0084] The commands are translated using a controller or repeater and then sent to the slave device.
[0085] In some embodiments, the second return module 304 is further configured to:
[0086] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0087] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0088] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0089] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0090] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0091] It should be noted that the specific limitations regarding the PECI bus protocol command response construction device can be found in the limitations of the PECI bus protocol command response construction method described above, and will not be repeated here. Each module in the aforementioned PECI bus protocol command response construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0092] According to another aspect of the present invention, a computer device is provided, which may be a server, and its internal structure diagram is shown below. Figure 4 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the PECI bus protocol command response construction method described above. Specifically, the method includes performing the following operations during functional verification of a controller or repeater based on the PECI protocol:
[0093] The host sends any command in the PECI bus protocol to the slave.
[0094] The slave device parses the received commands and caches the read / write byte length values in the commands;
[0095] If both the read and write byte length values are equal to 0, the slave device generates a command response value containing one FCS byte and returns it to the master device.
[0096] If the read / write byte length value is not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0097] In some embodiments, the host sends any command in the PECI bus protocol to the slave, including:
[0098] The host sends any command in the PECI bus protocol to the controller or repeater;
[0099] The commands are translated using a controller or repeater and then sent to the slave device.
[0100] In some embodiments, in response to a read / write byte length value not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device, including:
[0101] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0102] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0103] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0104] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0105] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0106] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the PECI bus protocol command response construction method described above. Specifically, the method includes performing the following operations when performing functional verification of a controller or repeater based on the PECI protocol:
[0107] The host sends any command in the PECI bus protocol to the slave.
[0108] The slave device parses the received commands and caches the read / write byte length values in the commands;
[0109] If both the read and write byte length values are equal to 0, the slave device generates a command response value containing one FCS byte and returns it to the master device.
[0110] If the read / write byte length value is not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
[0111] In some embodiments, the host sends any command in the PECI bus protocol to the slave, including:
[0112] The host sends any command in the PECI bus protocol to the controller or repeater;
[0113] The commands are translated using a controller or repeater and then sent to the slave device.
[0114] In some embodiments, in response to a read / write byte length value not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device, including:
[0115] Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result:
[0116] Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3;
[0117] Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3.
[0118] Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
[0119] In some embodiments, the commands in the PECI bus protocol include a test master-slave connection command, a temperature value acquisition command, a version number acquisition command, a write report configuration command, and a read report configuration command.
[0120] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0121] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for constructing PECI bus protocol command responses, characterized in that, The method includes performing the following operations when performing functional verification of a controller or repeater based on the PECI protocol: The host sends any command in the PECI bus protocol to the slave device. The host sends any command in the PECI bus protocol to the controller or repeater. The controller or repeater then converts the command and sends it to the slave device. The slave device parses the received commands and caches the read / write byte length values in the commands; If both the read and write byte length values are equal to 0, the slave device generates a command response value containing one FCS byte and returns it to the master device. If the read / write byte length value is not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device.
2. The PECI bus protocol command response construction method according to claim 1, characterized in that, If the read / write byte length value is not equal to 0, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device, including: Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result: Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3; Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3. Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
3. The PECI bus protocol command response construction method according to claim 1, characterized in that, The commands in the PECI bus protocol include commands to test master-slave connection, obtain temperature value, obtain version number, write configuration, and read configuration.
4. A PECI bus protocol command response construction device, characterized in that, When performing functional verification of controllers or repeaters based on the PECI protocol, the device uses the following modules to perform the following operations: The command sending module is configured to send any command in the PECI bus protocol from the host to the slave. The caching module is configured to parse commands received by the slave device and cache the read / write byte length values in the commands. The first return module is configured to respond to a situation where both the read and write byte length values are equal to 0, in which case the slave device generates a command response value containing one FCS byte and returns it to the master device. The second return module is configured to respond to a read / write byte length value that is not equal to 0. In this case, the slave device generates a command response value containing two FCS bytes (first and last) based on the read / write byte length value and the command code, and returns it to the master device. The command sending module is further configured to: send any command in the PECI bus protocol from the host to the controller or repeater; and convert the command using the controller or repeater before sending it to the slave.
5. The PECI bus protocol command response construction apparatus according to claim 4, characterized in that, The second return module is further configured to: Determine if the length of the written bytes is equal to 1, and perform the following steps based on the result: Step 1: In response to a write byte length of 1, only the corresponding command code is cached, then the first FCS byte of the response value is returned and proceed to Step 3; Step 2: In response to a write byte length greater than 1, in addition to caching the corresponding command code, the corresponding configuration data content is also cached according to the write byte length value. The process of caching data is controlled by the cached write byte length value. Then, the first FCS byte of the response value is returned and the process proceeds to Step 3. Step 3: Select different command response values to return based on the cached command code. The cached read byte length value controls the number of bytes returned in the response value. After the number of returned bytes meets the read length requirement, the second FCS byte of the response value is returned.
6. The PECI bus protocol command response construction apparatus according to claim 4, characterized in that, The commands in the PECI bus protocol include commands to test master-slave connection, obtain temperature value, obtain version number, write configuration, and read configuration.
7. A computer device, characterized in that, include: At least one processor; as well as A memory storing a computer program executable in the processor, wherein the processor, when executing the program, performs the method according to any one of claims 1-3.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the method described in any one of claims 1-3.
Citation Information
Patent Citations
PECI bus verification method and system supporting multiple slaves
CN106997318A
PECI bus master-slave machine verification system and verification method supporting crc8 verification
CN107229858A
Master-slave negotiation sequence machine based on PECI bus
CN108536636A
Unibus communication system and method
CN114416622A
Electronic system having integrity verification device
US20150254458A1