Data processing circuit and method
Through the combination of data storage circuits and adapters, the problem of relying on the surrounding single board environment to obtain CPLD register data is solved, and hardware data can be obtained without the surrounding single board environment, reducing costs and improving efficiency and accuracy.
Patent Information
- Application Number
- CN202410822693.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, obtaining hardware data in complex programmable logic device (CPLD) registers requires relying on the surrounding single board environment, resulting in high costs and inability to obtain data when the single board is damaged.
Through the combination of a data storage circuit and an adapter, the adapter is used to convert the hardware data sent by the data storage circuit into a format that can be received by the terminal device, thereby achieving hardware data acquisition in an environment that does not rely on surrounding single boards.
It reduces data processing costs, improves data acquisition efficiency and accuracy, and avoids data acquisition failures caused by damage to surrounding single boards.
Smart Images

Figure CN118733506A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a data processing circuit and method. Background Art
[0002] In the hardware design of a server, the hardware data of the hardware on a single board is usually written into the register of a complex programmable logic device (CPLD). When developing or maintaining a single board, it is necessary to obtain and analyze the hardware data of the hardware on the single board.
[0003] The data processing process in the related art usually depends on the surrounding single board environment, that is, it is necessary to build a single board environment including a baseboard management controller (BMC). The terminal device can obtain the hardware data stored in the register of the CPLD through the BMC electrically connected to the CPLD.
[0004] However, the method in the related art needs to consume relatively high costs to build a surrounding single board environment, resulting in the problem of high cost in the method in the related art. Summary of the invention
[0005] The embodiments of the present application provide a data processing circuit and method, which can obtain hardware data without relying on the surrounding single board environment.
[0006] In a first aspect, an embodiment of the present application provides a data processing circuit, including: a data storage circuit and an adapter, wherein the data storage circuit is electrically connected to the adapter through a first interface of the data storage circuit and a first conversion interface of the adapter; the adapter is electrically connected to the terminal device through a second conversion interface of the adapter and a second interface of the terminal device; the interface types of the first interface and the second interface are different; wherein,
[0007] The data storage circuit is used to obtain the first hardware data and send the first hardware data to the adapter through the first interface and the first conversion interface; the first hardware data corresponds to the interface type of the first interface;
[0008] The adapter is used to convert the first hardware data into second hardware data, and send the second hardware data to the terminal device through the second conversion interface and the second interface; the second hardware data corresponds to the interface type of the second interface.
[0009] In this solution, when the interface types of the first interface of the data storage circuit and the second interface of the terminal device are different, the embodiment of the present application can use an adapter to convert the first hardware data sent by the data storage circuit into the second hardware data, and send the second hardware data to the terminal device to achieve communication between the data storage circuit and the terminal device. Compared with the method in the related art, which requires a high cost to build a surrounding single board environment and has the problem of high cost, the embodiment of the present application can obtain hardware data without relying on the surrounding single board environment, which reduces the data processing cost and improves the data processing efficiency.
[0010] In one implementation, the data storage circuit includes a plurality of registers; the data storage circuit is used for:
[0011] Obtaining a data read command, the data read command including an identifier of a target register;
[0012] Determine the target register from the plurality of registers according to the identifier of the target register;
[0013] The first hardware data is obtained through the target register.
[0014] In this solution, the data storage circuit can determine the target register according to the identifier of the target register in the data read command, and obtain the first hardware data through the target register, thereby achieving accurate acquisition of the first hardware data.
[0015] In one implementation, the data storage circuit is used to:
[0016] When it is recognized that the data read command includes a security check code, the target register is determined from the plurality of registers according to the identifier of the target register.
[0017] In this solution, by identifying whether there is a security check code in the data read command, it is avoided that the data storage circuit sends the first hardware data in the scenario of accidental touch by the tester, thereby ensuring the security of the data.
[0018] In one implementation, the data storage circuit is used to:
[0019] From the target register, obtain the target register data;
[0020] Determine the target combination string according to the identifier of the target register;
[0021] The first hardware data is obtained according to the target combined character string and the target register data.
[0022] In this solution, the data storage circuit can obtain the target register data from the target register, and determine the target combination string (the form that the tester expects to display) according to the identifier of the target register. The data storage circuit can obtain the first hardware data according to the target combination string and the target register data. In this way, the readability of the first hardware data can be improved.
[0023] In one implementation, the data storage circuit is used to:
[0024] Combine the target display character string and the target register data to obtain the initial first hardware data;
[0025] Encoding the initial first hardware data to obtain encoded initial first hardware data;
[0026] According to the interface type of the first interface, the encoded initial first hardware data is assembled to obtain the first hardware data.
[0027] In this solution, the data storage circuit can combine the target display string with the target register data to obtain the initial first hardware data, and encode the initial first hardware data to obtain the encoded initial first hardware data. The data storage circuit can assemble the encoded initial first hardware data according to the interface type of the first interface to obtain the first hardware data. In this way, the first hardware data can correspond to the interface type of the first interface.
[0028] In one implementation, the data storage circuit is further configured to:
[0029] When it is identified that the data read command does not include the security verification code, a reminder character string is obtained, and the reminder character string is encoded to obtain an encoded reminder character string;
[0030] According to the interface type of the first interface, the encoded reminder character string is assembled to obtain the first reminder information; the first reminder information corresponds to the interface type of the first interface;
[0031] Sending first reminder information to the adapter through the first interface and the first conversion interface;
[0032] The adapter is also used for:
[0033] The first reminder information is converted into second reminder information, and the second reminder information is sent to the terminal device through the second conversion interface and the second interface; the second reminder information corresponds to the interface type of the second interface.
[0034] In this solution, when the data reading command does not include a security verification code, the tester can be reminded to enter the security verification code by sending a first reminder message, thereby ensuring the security of the data.
[0035] In one implementation, the data storage circuit includes a plurality of registers; the data storage circuit is used for:
[0036] Obtaining a data read command, the data read command including an identifier of target hardware information;
[0037] Determine the identifier of the corresponding target register according to the identifier of the target hardware information;
[0038] Determine the target register from the plurality of registers according to the identifier of the target register;
[0039] The first hardware data is obtained through the target register.
[0040] In this solution, when the data read command includes the identifier of the target hardware information, the data storage circuit can determine the identifier of the corresponding target register according to the identifier of the target hardware information, and determine the target register from multiple registers according to the identifier of the target register, and then obtain the first hardware data through the target register. In this way, the first hardware data can be accurately obtained.
[0041] In one implementation, the data storage circuit includes a complex programmable logic device (CPLD) and a connector, the connector includes a first interface; the CPLD is electrically connected to the connector through pins of the CPLD and pins of the connector; the connector is electrically connected to the adapter through the first interface and the first conversion interface;
[0042] The CPLD is used to obtain the first hardware data, and send the first hardware data to the connector through the pins of the CPLD and the pins of the connector;
[0043] The connector is used to send first hardware data to the adapter through the first interface and the first conversion interface.
[0044] A connector is provided in this solution. When the interface of the CPLD exists in the form of pins, which makes it impossible for the interface of the CPLD to be directly connected to the first conversion interface of the adapter, the CPLD can be electrically connected to the pins of the connector through the pins. The connector can provide a first interface to electrically connect the CPLD to the adapter, solving the problem that the adapter cannot be directly connected to the adapter through pins. In addition, based on the difference between the interface type of the CPLD and the interface type of the second interface of the terminal device, the embodiment of the present application can use the adapter to convert the first hardware data sent by the CPLD through the connector into the second hardware data, and send the second hardware data to the terminal device to realize the communication between the CPLD and the terminal device. The method in the related art needs to spend a relatively high cost to build a peripheral single board environment, resulting in the problem of high cost in the method in the related art. The embodiment of the present application can obtain hardware data without relying on the peripheral single board environment, thereby reducing the data processing cost and improving the data processing efficiency.
[0045] In one implementation, the interface type of the first interface is a Universal Asynchronous Receiver / Transmitter (UART) type, and the interface type of the second interface is a Universal Serial Bus (USB) type.
[0046] In this solution, when the interface type of the second interface of the terminal device is USB type and the interface type of the first interface of the data storage circuit is UART type, an adapter can be used to convert the first hardware data of UART type into the second hardware data of USB type, and send the second hardware data to the terminal device to realize the communication between the data storage circuit and the terminal device. The method in the related art needs to spend a relatively high cost to build a peripheral single board environment, resulting in the problem of high cost in the method in the related art. The embodiment of the present application can obtain hardware data without relying on the peripheral single board environment, thereby reducing the data processing cost and improving the data processing efficiency.
[0047] In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a data processing circuit, wherein the data processing circuit includes a data storage circuit and an adapter, wherein the data storage circuit is electrically connected to the adapter through a first interface of the data storage circuit and a first conversion interface of the adapter; the adapter is electrically connected to the terminal device through a second conversion interface of the adapter and a second interface of the terminal device; the interface types of the first interface and the second interface are different;
[0048] Methods include:
[0049] The data storage circuit acquires the first hardware data and sends the first hardware data to the adapter through the first interface and the first conversion interface; the first hardware data corresponds to the interface type of the first interface;
[0050] The adapter converts the first hardware data into second hardware data, and sends the second hardware data to the terminal device through the second conversion interface and the second interface; the second hardware data corresponds to the interface type of the second interface.
[0051] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0052] In one implementation, the data storage circuit includes a plurality of registers; the data storage circuit acquires the first hardware data, including:
[0053] The data storage circuit acquires a data read command, the data read command including an identifier of a target register;
[0054] The data storage circuit determines the target register from the plurality of registers according to the identifier of the target register;
[0055] The data storage circuit obtains the first hardware data through the target register.
[0056] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0057] In one implementation, the data storage circuit determines the target register from a plurality of registers according to an identifier of the target register, including:
[0058] When the data storage circuit recognizes that the data read command includes a security check code, the data storage circuit determines the target register from the plurality of registers according to the identifier of the target register.
[0059] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0060] In one implementation, the data storage circuit obtains the first hardware data through the target register, including:
[0061] The data storage circuit obtains the target register data from the target register;
[0062] The data storage circuit determines the target combination character string according to the identifier of the target register;
[0063] The data storage circuit acquires the first hardware data according to the target combined character string and the target register data.
[0064] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0065] In one implementation, the data storage circuit acquires the first hardware data according to the target combination character string and the target register data, including:
[0066] The data storage circuit combines the target display character string with the target register data to obtain the initial first hardware data;
[0067] The data storage circuit encodes the initial first hardware data to obtain the encoded initial first hardware data;
[0068] The data storage circuit assembles the encoded initial first hardware data according to the interface type of the first interface to obtain the first hardware data.
[0069] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0070] In one implementation, the method further includes:
[0071] The data storage circuit obtains the reminder string and encodes the reminder string to obtain the encoded reminder string when recognizing that the data read command does not include the security verification code;
[0072] The data storage circuit assembles the encoded reminder character string according to the interface type of the first interface to obtain the first reminder information; the first reminder information corresponds to the interface type of the first interface;
[0073] The data storage circuit sends the first reminder information to the adapter through the first interface and the first conversion interface;
[0074] The adapter converts the first reminder information into second reminder information, and sends the second reminder information to the terminal device through the second conversion interface and the second interface; the second reminder information corresponds to the interface type of the second interface.
[0075] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0076] In one implementation, the data storage circuit includes a plurality of registers; the data storage circuit acquires the first hardware data, including:
[0077] The data storage circuit acquires a data read command, the data read command including an identifier of target hardware information;
[0078] The data storage circuit determines the identifier of the corresponding target register according to the identifier of the target hardware information;
[0079] The data storage circuit determines the target register from the plurality of registers according to the identifier of the target register;
[0080] The data storage circuit obtains the first hardware data through the target register.
[0081] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0082] In one implementation, the data storage circuit includes a complex programmable logic device (CPLD) and a connector, the connector includes a first interface; the CPLD is electrically connected to the connector through pins of the CPLD and pins of the connector; the connector is electrically connected to the adapter through the first interface and the first conversion interface;
[0083] The data storage circuit acquires the first hardware data and sends the first hardware data to the adapter through the first interface and the first conversion interface, including:
[0084] The CPLD acquires the first hardware data, and sends the first hardware data to the connector through the pins of the CPLD and the pins of the connector;
[0085] The connector sends the first hardware data to the adapter through the first interface and the first conversion interface.
[0086] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0087] In one implementation, the interface type of the first interface is a Universal Asynchronous Receiver / Transmitter (UART) type, and the interface type of the second interface is a Universal Serial Bus (USB) type.
[0088] In this solution, the data processing circuit in the above embodiment can implement the technical solution shown in the method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0089] In a third aspect, an embodiment of the present application provides a data processing system, comprising a terminal device and the data processing circuit of the first aspect.
[0090] In this solution, the data processing circuit in the data processing system can implement the technical solution shown in the above embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0092] Figure 1 A schematic diagram of a scenario for obtaining hardware data in the related technology;
[0093] Figure 2 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 1 ;
[0094] Figure 3 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 2 ;
[0095] Figure 4 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 3 ;
[0096] Figure 5 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 ;
[0097] Figure 6 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0098] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.
[0099] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0100] In the hardware design of a server, the hardware data of the hardware on a single board is usually written into the register of a complex programmable logic device (CPLD). For example, the hardware data may be a power supply voltage value, temperature, in-position information, and the like.
[0101] When developing or maintaining a single board, it is necessary to obtain and analyze the hardware data of the hardware on the single board to verify the hardware functions and locate the problems existing in the hardware.
[0102] The process of obtaining hardware data in the related art usually depends on the surrounding single board environment, that is, the single board on which the baseboard management controller (BMC) is installed.
[0103] Figure 1 FIG. 1 is a schematic diagram of a scenario for obtaining hardware data in the related art. Figure 1 As shown: a test environment including a BMC needs to be built in advance. The terminal device (BMC management tool deployed on the terminal device) can obtain hardware data stored in the register of the CPLD through the BMC electrically connected to the CPLD.
[0104] However, the method of obtaining hardware data in the related art needs to rely on the surrounding single board environment (the single board on which the BMC is installed). In other words, the method in the related art needs to spend a relatively high cost to build the surrounding single board environment, resulting in the problem of high cost in the method in the related art.
[0105] In addition, the methods in the related art cannot obtain hardware data when the surrounding boards are damaged.
[0106] Therefore, there is an urgent need for a data processing method that can obtain hardware data without relying on the surrounding single board environment.
[0107] Figure 2 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 1 .
[0108] like Figure 2 As shown, the data processing system 10 may include: a data processing circuit 20 and a terminal device 30 .
[0109] The data processing circuit 20 may include: a data storage circuit 21 and an adapter 22 .
[0110] The data storage circuit 21 includes a first interface 21a. The data storage circuit 21 also includes a plurality of registers ( Figure 2 not shown).
[0111] The adapter 22 includes a first conversion interface 22a and a second conversion interface 22b.
[0112] The terminal device 30 includes a second interface 30a.
[0113] The data storage circuit 21 is electrically connected to the adapter 22 through the first interface 21 a and the first conversion interface 22 a .
[0114] The adapter 22 is electrically connected to the terminal device 30 via the second conversion interface 22b and the second interface 30a.
[0115] It should be noted that the first interface 21a and the second interface 30a are of different interface types. It should also be noted that the first interface 21a and the first conversion interface 22a are of the same interface type, and the second interface 30a and the second conversion interface 22b are of the same interface type.
[0116] The data storage circuit 21, the adapter 22 and the terminal device 30 involved in the embodiment of the present application are described below.
[0117] Data storage circuit 21: may include a complex programmable logic device (CPLD). In the case where the data storage circuit 21 includes a CPLD, and the interface of the CPLD is in the form of pins and is connected to the outside through the pins, the data storage circuit 21 may also include a connector (header). The pins of the connector may be electrically connected to the pins of the CPLD, and the connector may provide a first interface 21a to provide the data storage circuit 21 with the first interface 21a. In addition, the CPLD in the data storage circuit 21 may be replaced by a field programmable gate array (FPGA) or other programmable devices.
[0118] It should be noted that CPLD is a digital integrated circuit whose logical functions are constructed by users according to their own needs. Its basic design method is to use integrated development software platform, schematic diagram, hardware description language and other methods to generate corresponding target files, and then download the code through a download cable to realize the designed digital system.
[0119] Adapter 22: A component that can convert data received by the adapter 22 through one interface (the first conversion interface 22a or the second conversion interface 22b) into data corresponding to the reception type of another interface (the second conversion interface 22b or the first conversion interface 22a). It should be noted that a conversion chip or a conversion circuit can be provided on the adapter 22. Among them, the interface type can be a Universal Serial Bus (USB) type, a Universal Asynchronous Receiver / Transmitter (UART) type, or other types, which are not limited in the embodiments of the present application. For example, taking the setting of a conversion circuit on the adapter 22 as an example, the conversion circuit can convert the data corresponding to the USB interface type into data corresponding to the UART interface type after obtaining the data of the USB interface type through the USB interface.
[0120] Terminal device 30: The terminal device serves as a debugging host and can be a mobile phone, computer, etc.
[0121] In the embodiment of the present application, the data storage circuit 21 can obtain the first hardware data.
[0122] Next, the process of the data storage circuit 21 acquiring the first hardware data is described.
[0123] Specifically, when the terminal device 30 needs to obtain hardware data, the terminal device 30 can send a first data read command to the adapter 22 through the second interface 30a and the second conversion interface 22b. In one implementation, the first data read command can include a security check code. Exemplarily, the terminal device can respond to the tester inputting "admin" through an external device (such as a keyboard) to convert "admin" into hexadecimal data "0x41, 0x64, 0x6D, 0x69, 0x6E", and use "0x41, 0x64, 0x6D, 0x69, 0x6E" as a security check code.
[0124] The first data read command corresponds to the interface type of the second interface 30a of the terminal device 30. Exemplarily, the interface type of the second interface 30a may be a USB type, and accordingly, the first data read command is a USB type command.
[0125] After acquiring the first data read command through the second conversion interface 22 b , the adapter 22 may convert the first data read command into a second data read command.
[0126] Among them, the second data read command corresponds to the first conversion interface 22a. It should be noted that, based on the interface type of the first conversion interface 22a being the same as the interface type of the first interface 21a, the second data read command corresponds to the interface type of the first interface 201a of the data storage circuit 21. Exemplarily, when the interface type of the second interface 30a and the interface type of the second conversion interface 22b are USB types, and the interface type of the first interface 21a and the interface type of the first conversion interface 22a are UART types, the adapter 22 can convert the first data read command of the USB type into the second data read command of the UART type.
[0127] The adapter 22 may send a second data read command to the data storage circuit 21 through the first conversion interface 22 a and the first interface 21 a .
[0128] After acquiring the second data read command, the data storage circuit 21 may extract and process the second data read command according to the interface type of the first interface 21 a to obtain an encoded data read command.
[0129] Exemplarily, when the interface type of the first interface 21a is a UART type, the second data read command is a UART type command. When the second data read command is a UART type command, based on the UART protocol, it can be known that the second data read command includes a start bit, a data bit, a check bit, and a stop bit. The data storage circuit 21 can check the data bit according to the check bit. After determining that the check is passed, the data storage circuit 21 determines the data bit as the encoded data read command.
[0130] The data storage circuit 21 can decode the encoded data read command to obtain the data read command. In one implementation, the data storage circuit 21 can convert each American Standard Code for Information Interchange (ASCII) in the encoded data read command into a hexadecimal character to obtain the data read command. The data read command is a string consisting of multiple hexadecimal characters.
[0131] The data storage circuit 21 may acquire the first hardware data in response to the data read command.
[0132] First, the process of the data storage circuit 21 acquiring the identifier of the target register is described.
[0133] In one implementation, the data read command includes an identifier of the target hardware information, and the data storage circuit 21 can query the correspondence between the identifier of the hardware information and the identifier of the register according to the identifier of the target hardware information, and determine the identifier of the corresponding target register. Among them, the identifier of the target register can be the number, name, etc. of the target register. The identifier of the target register can also be other information that can reflect the identity of the target register. The identifier of the target hardware information can be the number, name, etc. of the target hardware information, and the identifier of the target hardware information can also be other information that can reflect the identity of the target hardware information. Exemplarily, the data storage circuit 21 can determine that the identifier of the corresponding target register (first register) is 10 based on the identifier of the target hardware information (the temperature of the central processing unit) being 100.
[0134] In one implementation, the data read command includes an identification of a target register.
[0135] The data storage circuit 21 includes a plurality of registers. After acquiring the identifier of the target register, the data storage circuit 21 can determine the target register from the plurality of registers according to the identifier of the target register.
[0136] In one implementation, the data storage circuit 21 stores a security check code. After acquiring the data read command, the data storage circuit 21 may identify whether the data read command includes the security check code. The data storage circuit 21 may determine the target register from a plurality of registers according to the identifier of the target register when it is identified that the data read command includes the security check code. Exemplarily, the security check code may be "0x41, 0x64, 0x6D, 0x69, 0x6E".
[0137] After determining the target register, the data storage circuit 21 may obtain the first hardware data through the target register.
[0138] Next, the process of the data storage circuit 21 acquiring the first hardware data through the target register is described.
[0139] In one implementation:
[0140] After reading the target register data from the target register, the data storage circuit 21 may determine the first hardware data according to the target register data.
[0141] Specifically, the data storage circuit 21 can encode the target register data to obtain the encoded target register data. Exemplarily, the data storage circuit 21 can convert each character in the target register data into ASCII, and combine the ASCII converted from each character into the encoded target register data. The data storage circuit 21 can assemble the encoded target register data according to the interface type of the first interface 21a to obtain the first hardware data. Exemplarily, in the case where the interface type of the first interface 21a is a UART type, the data storage circuit 21 can set the start bit, check bit and end bit according to the interface type of the first interface 21, and assemble the start bit, check bit, end bit, and the encoded target register data to obtain the first hardware data.
[0142] In one implementation:
[0143] After reading the target register data from the target register, the data storage circuit 21 can determine the target combination string from multiple combination strings according to the identifier of the target register. The data storage circuit 21 can obtain the first hardware data according to the target combination string and the target register data.
[0144] Specifically, the data storage circuit 21 can combine the target combination string with the target register data to obtain the initial first hardware data. The data storage circuit 21 can encode the initial first hardware data to obtain the encoded first hardware data. The data storage circuit 21 can assemble the encoded first hardware data according to the interface type of the first interface 21a to obtain the first hardware data.
[0145] By combining the target combined character string with the target register data, the readability of the first hardware data can be improved.
[0146] After acquiring the first hardware data, the data storage circuit 21 can send the first hardware data to the adapter 22 through the first interface 21a and the first conversion interface 22a. It should be noted that the first hardware data corresponds to the interface type of the first interface 21a. Based on the fact that the interface type of the first interface 21a is the same as the interface type of the first conversion interface 22a, the first hardware data corresponds to the interface type of the first conversion interface 22a.
[0147] The adapter 22 can convert the first hardware data into the second hardware data after acquiring the first hardware data through the first conversion interface 22a. The first hardware data corresponds to the interface type of the first conversion interface 22a, and the second hardware data corresponds to the interface type of the interface type of the second conversion interface 22b. Exemplarily, when the interface type of the first conversion interface 22a is a UART type and the interface type of the second conversion interface 22b is a USB type, the adapter can convert the first hardware data of the UART type into the second hardware data of the USB type.
[0148] The adapter 22 can send the second hardware data to the terminal device 30 through the second conversion interface 22b and the second interface 30a. It should be noted that, based on the interface type of the second conversion interface 22b being the same as the interface type of the second interface 30a, the second hardware data corresponds to the interface type of the second interface 30a. Exemplarily, the interface type of the second interface 30a of the terminal device 30 is a USB type, and the second hardware data is USB type data.
[0149] After acquiring the second hardware data, the terminal device (the serial port tool running on the terminal device) may display the second hardware data to achieve visualization of the second hardware data.
[0150] In addition, based on the data processing system 10 of the embodiment of the present application, the data storage circuit 21 can obtain the target data sent by the terminal device 30 through the adapter 22, and change the register data of the registers in the data storage circuit 21 according to the target data to realize timing debugging and low-speed bus communication detection.
[0151] In addition, based on the data processing system 10 of the embodiment of the present application, the data storage circuit 21 can obtain the identifier of the first target register sent by the terminal device 30 through the adapter 22. The data storage circuit 21 can query and obtain the first target register data according to the identifier of the first target register. The data storage circuit 21 can send the first target register data to the terminal device 30 through the adapter 22, so that the terminal device 30 can read the first target register data.
[0152] Beneficial effects of this embodiment: In the embodiment of the present application, when the interface types of the first interface of the data storage circuit and the second interface of the terminal device are different, the embodiment of the present application can use an adapter to convert the first hardware data sent by the data storage circuit into the second hardware data, and send the second hardware data to the terminal device to realize the communication between the data storage circuit and the terminal device. Compared with the related art that needs to spend a high cost to build a peripheral single board environment, resulting in the method in the related art, the problem of high cost, the embodiment of the present application does not need to rely on the surrounding single board environment, can obtain hardware data, reduce data processing costs, and improve data processing efficiency. In addition, compared with the need to power the surrounding single board in the related art, the embodiment of the present application can directly power the single board where the CPLD is located, reducing the power consumption cost of data processing. In addition, compared with the related art, the test personnel are required to manually observe the light-emitting diodes (or digital tubes) on the surrounding single boards, and determine the hardware data in combination with the code type of each light-emitting diode (or digital tube), resulting in low efficiency, low accuracy, and incompleteness of hardware data acquisition. In the embodiment of the present application, the terminal device can use the adapter to directly obtain hardware data from the data storage circuit, improve data acquisition efficiency, accuracy, and increase the amount of hardware data acquisition.
[0153] Figure 3 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 2 .
[0154] like Figure 3 As shown, the data processing system 10 may include: a data processing circuit 20 and a terminal device 30 .
[0155] The data processing circuit 20 may include: a data storage circuit 21 and an adapter 22 .
[0156] The data storage circuit 21 includes a CPLD 211 and a connector 212. The CPLD 211 includes a pin and a plurality of registers ( Figure 3 (not shown). The connector 212 includes a first interface 21a and pins.
[0157] The adapter 22 includes a first conversion interface 22a and a second conversion interface 22b.
[0158] The terminal device 30 includes a second interface 30a.
[0159] The CPLD 211 is electrically connected to the pins of the connector 212 via the pins of the CPLD 211. Figure 3It is shown that the CPLD 211 includes a first pin 211a and a second pin 211b, and the connector 212 includes a third pin 212a and a fourth pin 212b. The CPLD 211 can be electrically connected to the third pin 212a of the connector 212 through the first pin 211a, and the CPLD 211 can be electrically connected to the fourth pin 212b of the connector 212 through the second pin 211b. It should be noted that the first pin 211a is a receive (receive, referred to as RX) pin of the CPLD 211, the second pin 211b is a transmit (transport, referred to as TX) pin of the CPLD 211, the third pin 212a is a transmit pin of the connector 212, and the fourth pin 212b is a receive pin of the connector 212.
[0160] The connector 212 is electrically connected to the adapter 22 through the first interface 21 a and the first conversion interface 22 a .
[0161] The adapter 22 is electrically connected to the terminal device 30 via the second conversion interface 22b and the second interface 30a.
[0162] It should be noted that the first interface 21a and the second interface 30a are of different interface types. It should also be noted that the first interface 21a and the first conversion interface 22a are of the same interface type, and the second interface 30a and the second conversion interface 22b are of the same interface type.
[0163] In this embodiment, the CPLD 211 may acquire the first hardware data.
[0164] The CPLD 211 may send the first hardware data to the connector 212 through the pin of the CPLD 211 and the pin of the connector 212. For example, Figure 3 As shown, the CPLD 211 can send the first hardware data to the connector 212 through the second pin 211 b and the fourth pin 212 b.
[0165] The connector 212 can send the first hardware data to the adapter 22 through the first interface 21a and the first conversion interface 22a. The first hardware data corresponds to the interface type of the first interface 21a. Since the interface types of the first interface 201a and the first conversion interface 22a are the same, the first hardware data corresponds to the interface type of the first conversion interface 22a.
[0166] The adapter 22 can convert the first hardware data into second hardware data, wherein the second hardware data corresponds to the interface type of the second conversion interface 22b.
[0167] The adapter 22 can send the first hardware data to the terminal device through the second conversion interface 22b and the second interface 30a. It should be noted that, since the second conversion interface 22b and the second interface 30a have the same interface type, the second hardware data corresponds to the second interface 30a.
[0168] Beneficial effects of this embodiment: This embodiment of the present application provides a connector. When the interface of the CPLD exists in the form of pins, which makes it impossible for the interface of the CPLD to be directly electrically connected to the first conversion interface of the adapter, the CPLD can be electrically connected to the pins of the connector through the pins. The connector can provide a first interface to electrically connect the CPLD to the adapter. The problem that the adapter cannot be directly connected to the adapter through pins is solved. In addition, based on the difference between the interface type of the CPLD and the interface type of the second interface of the terminal device, the embodiment of the present application can use the adapter to convert the first hardware data sent by the CPLD through the connector into the second hardware data, and send the second hardware data to the terminal device, so as to realize the communication between the CPLD and the terminal device. The methods in the related art require relatively high costs to build a surrounding single-board environment. The embodiment of the present application can obtain hardware data without relying on the surrounding single-board environment, thereby reducing data processing costs and improving data processing efficiency.
[0169] Figure 4 A schematic diagram of a data processing system provided in an embodiment of the present application Figure 3 .
[0170] like Figure 4 As shown, the data processing system 10 may include: a data processing circuit 20 and a terminal device 30 .
[0171] The data processing circuit 20 may include: a data storage circuit 21 and an adapter 22 .
[0172] The data storage circuit 21 includes a CPLD 211 and a connector 212. The CPLD 211 includes a pin and a plurality of registers ( Figure 4 (not shown). The connector 212 includes a first interface 21a and pins.
[0173] The adapter 22 includes a first conversion interface 22a and a second conversion interface 22b.
[0174] The terminal device 30 includes a second interface 30a.
[0175] The CPLD 211 is electrically connected to the pins of the connector 212 via the pins of the CPLD 211. Figure 3The CPLD 211 includes a first pin 211a and a second pin 211b, and the connector 212 includes a third pin 212a and a fourth pin 212b. The CPLD 211 can be electrically connected to the third pin 212a of the connector 212 through the first pin 211a, and the CPLD 211 can be electrically connected to the fourth pin 212b of the connector 212 through the second pin 211b.
[0176] The connector 212 is electrically connected to the adapter 22 through the first interface 21 a and the first conversion interface 22 a .
[0177] The adapter 22 is electrically connected to the terminal device 30 via the second conversion interface 22b and the second interface 30a.
[0178] It should be noted that the first interface 21a and the second interface 30a are of different interface types. It should also be noted that the first interface 21a and the first conversion interface 22a are of the same interface type, and the second interface 30a and the second conversion interface 22b are of the same interface type.
[0179] It should also be noted that CPLD 211 includes multiple functional modules, namely character display module 2111, display array module 2112, security check module 2113, first conversion module 2114, and second conversion module 2115. Exemplarily, first conversion module 2114 may be an ASCII conversion module, and second conversion module 2115 may be a UART conversion module.
[0180] Next, the data processing process is explained from the perspective of functional modules.
[0181] In this embodiment, when the terminal device 30 needs to obtain hardware data, the terminal device 30 can send a first data read command to the adapter 22 through the second interface 30a and the second conversion interface 22b. The first data read command corresponds to the interface type of the second interface 30a of the terminal device 30.
[0182] The adapter 22 can convert the first data read command into a second data read command. The second data read command corresponds to the interface type of the first conversion interface 22a. It should be noted that, based on the first conversion interface 22a and the first interface 21a having the same interface type, the second data read command corresponds to the interface type of the first interface 21a of the data storage circuit 21.
[0183] The adapter 22 may send a second data read command to the connector 212 through the first conversion interface 22 a and the first interface 21 a .
[0184] The connector 212 may send the second data read command to the second conversion module 2115 of the CPLD 211 through a pin (third pin 212 a ) of the connector 212 and a pin (first pin 211 a ) of the CPLD 211 .
[0185] When the first pin 211a (receiving pin) of CPLD 211 obtains the second data read command, the second conversion module 2115 of CPLD 211 can extract and process the second data read command according to the interface type of CPLD 211 to obtain the encoded data read command. Exemplarily, when the interface type of CPLD 211 is a UART type, the second data read command includes a start bit, a data bit, a check bit, and a stop bit. After the second conversion module 2115 checks the data bit according to the check bit, it determines the data bit as the encoded data read command.
[0186] The second conversion module 2115 may send the encoded data read command to the first conversion module 2114 .
[0187] The first conversion module 2114 may decode the encoded data read command to obtain the data read command. In one implementation, the first conversion module 2114 may convert each ASCII character in the encoded data read command into a hexadecimal character to obtain the data read command.
[0188] The first conversion module 2114 may send a data read command to the security verification module 2113 .
[0189] The security verification module 2113 may obtain the security verification code pre-stored in the CPLD 211. It should be noted that the security verification code is stored in the register of the CPLD 211. Exemplarily, the security verification code may be "0x41, 0x64, 0x6D, 0x69, 0x6E".
[0190] The security verification module 2113 can identify whether the data read command includes a security verification code.
[0191] The security verification module 2113 may determine that the security verification has not passed when it is identified that the data read command does not include a security verification code.
[0192] In one implementation, the security verification module 2113 may discard the data read command if it is determined that the security verification has not passed.
[0193] In one implementation, the security verification module 2113 may send a prompt message indicating that the security verification has not passed to the display array module 2112 when it is determined that the security verification has not passed. The display array module 2112 may obtain a reminder string from the character display module 2111. The display array module 2112 may send a reminder string to the first conversion module 2114. The first conversion module 2114 may encode the reminder string to obtain an encoded reminder string. The first conversion module 2114 may send the encoded reminder string to the second conversion module 2115. The second conversion module 2115 may assemble the encoded reminder string according to the interface type of the CPLD 211 to obtain the first reminder message. The first reminder message corresponds to the interface type of the CPLD 211. The second conversion module 2115 may send the first reminder message to the connector 212 through the pin (the second pin 211b) of the CPLD 211 and the pin (the fourth pin 212b) of the connector 212. The connector 212 can send a first reminder message to the adapter 22 through the first interface 21a and the first conversion interface 22a. The adapter 22 can convert the first reminder message into a second reminder message. The second reminder message corresponds to the interface type of the second conversion interface 22b. Based on the fact that the second conversion interface 22b has the same interface type as the second interface 30a, the second reminder message corresponds to the interface type of the second interface 30a. The adapter 22 can send a second reminder message to the terminal device 30 through the second conversion interface 22b and the second interface 30a. Exemplarily, the second reminder message can be "Please enter a security verification code" to remind the tester to enter a security verification code.
[0194] In addition, the security verification module 2113 may determine that the security verification has passed if it is determined that the data read command includes a security verification code.
[0195] In one implementation, when the data read command includes the identifier of the target register, the security verification module 2113 may send the identifier of the target register (or the data read command) to the display array module 2112 after determining that the security verification is passed.
[0196] In one implementation, when the data read command includes the identifier of the target hardware information, the security verification module 2113 may, after determining that the security verification is passed, send the identifier of the target hardware information (or the data read command) to the display array module 2112. The display array module 2112 may query the corresponding relationship between the identifier of the hardware information and the identifier of the register according to the identifier of the target hardware information, and determine the identifier of the corresponding target register.
[0197] The display array module 2112 may determine the target register from a plurality of registers according to the identifier of the target register.
[0198] The display array module 2112 can read the target register data from the target register.
[0199] The display array module 2112 may determine a target combined character string from a plurality of combined character strings according to the identifier of the target register.
[0200] The display array module 2112 may combine the target combined character string with the target register data to obtain initial first hardware data.
[0201] The display array module 2112 may send the initial first hardware data to the first conversion module 2114 .
[0202] The first conversion module 2114 can encode the initial first hardware data to obtain the encoded first hardware data. Exemplarily, when the first conversion module 2114 is an ASCII conversion module, the first conversion module 2114 can convert each character in the initial first hardware data into ASCII, and combine the ASCII converted characters into the encoded first hardware data.
[0203] The first conversion module 2114 may send the encoded first hardware data to the second conversion module 2115 .
[0204] The second conversion module 2115 can assemble the encoded first hardware data according to the interface type of the CPLD 211 to obtain the first hardware data. Exemplarily, when the second conversion module 2115 is a UART conversion module, the second conversion module can assemble the encoded first hardware data according to the interface type of the CPLD 211 being a UART type based on the UART protocol to obtain the first hardware data of the UART type.
[0205] The second conversion module 2115 may send the first hardware data to the connector 212 through the second pin 211 b and the fourth pin 212 b .
[0206] The connector 212 may send the first hardware data to the adapter 22 through the first interface 21 a and the first conversion interface 22 a .
[0207] After acquiring the first hardware data, the adapter 22 may convert the first hardware data into second hardware data.
[0208] The adapter 22 can send the second hardware data to the terminal device 30 through the second conversion interface 22b and the second interface 30a.
[0209] Beneficial effects of this embodiment: In this embodiment, the CPLD includes a character display module, a display array module, a security verification module, a first conversion module, and a second conversion module. The CPLD can use each functional module to obtain the first hardware data, and send the first hardware data to the adapter through the connector. The adapter can convert the first hardware data into the second hardware data, and send the second hardware data to the terminal device. The embodiment of the present application can obtain hardware data without relying on the surrounding single board environment, which reduces the data processing cost and improves the data processing efficiency.
[0210] Figure 5 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 . The method is applied to the data processing circuit in any of the aforementioned implementations. Specifically, the data processing circuit includes a data storage circuit and an adapter. The data storage circuit is electrically connected to the adapter through a first interface of the data storage circuit and a first conversion interface of the adapter. The adapter is electrically connected to the terminal device through a second conversion interface of the adapter and a second interface of the terminal device. The interface types of the first interface and the second interface are different. The first conversion interface is the same as the interface type of the first interface, and the second conversion interface is the same as the interface type of the second interface.
[0211] See also Figure 5 , the method specifically comprises the following steps:
[0212] S501: The data storage circuit acquires first hardware data, and sends the first hardware data to the adapter through the first interface and the first conversion interface.
[0213] In this embodiment, the data storage circuit can obtain the first hardware data.
[0214] Next, the process of the data storage circuit acquiring the first hardware data is described.
[0215] Specifically, when the terminal device needs to obtain hardware data, the terminal device can send a first data read command to the adapter through the second interface and the second conversion interface, wherein the first data read command corresponds to the interface type of the second interface of the terminal device.
[0216] The adapter may convert the first data read command into a second data read command.
[0217] The adapter can send a second data reading command to the data storage circuit through the first conversion interface and the first interface.
[0218] The data storage circuit can extract and process the second data read command according to the interface type of the first interface to obtain the encoded data read command. The data storage circuit can decode and process the encoded data read command to obtain the data read command.
[0219] In the case where the data read command includes an identifier of a target register, the data storage circuit may determine the target register from a plurality of registers according to the identifier of the target register. In one implementation, the data storage circuit may identify whether the data read command includes a security check code. The data storage circuit may determine the target register from a plurality of registers according to the identifier of the target register when it is identified that the data read command includes a security check code.
[0220] The data storage circuit can obtain the first hardware data through the target register.
[0221] Next, a process in which the data storage circuit obtains the first hardware data through the target register is described.
[0222] Specifically, the data storage circuit may obtain target register data through the target register.
[0223] The data storage circuit can determine the target combination character string according to the identifier of the target register.
[0224] The data storage circuit can obtain the first hardware data according to the target combination string and the target register data. In one implementation, the data storage circuit can combine the target display string with the target register data to obtain the initial first hardware data. The data storage circuit can encode the initial first hardware data to obtain the encoded initial first hardware data. The data storage circuit can assemble the encoded initial first hardware data according to the interface type of the first interface to obtain the first hardware data.
[0225] After the data storage circuit acquires the first hardware data, the data storage circuit may send the first hardware data to the adapter through the first interface and the first conversion interface.
[0226] The first hardware data corresponds to the interface type of the first interface. It should be noted that, based on the fact that the interface types of the first interface and the first conversion interface are the same, the first hardware data corresponds to the interface type of the first conversion interface.
[0227] S502: The adapter converts the first hardware data into second hardware data, and sends the second hardware data to the terminal device through the second conversion interface and the second interface.
[0228] In this embodiment, the adapter may convert the first hardware data into the second hardware data, and send the second hardware data to the terminal device through the second conversion interface and the second interface.
[0229] The second hardware data corresponds to the interface type of the second conversion interface.
[0230] It should be noted that, based on the fact that the second conversion interface and the second interface have the same interface type, the second hardware data corresponds to the interface type of the second interface.
[0231] Beneficial effects of this embodiment: When the interface types of the first interface of the data storage circuit and the second interface of the terminal device are different, the embodiment of the present application can use an adapter to convert the first hardware data sent by the data storage circuit into the second hardware data, and send the second hardware data to the terminal device to realize the communication between the data storage circuit and the terminal device. Compared with the related art that needs to spend a high cost to build a surrounding single board environment, resulting in the method in the related art, there is a high cost problem, the embodiment of the present application does not need to rely on the surrounding single board environment, can obtain hardware data, reduce data processing costs, and improve data processing efficiency. In addition, compared with the related art, the test personnel are required to manually observe the light-emitting diodes (or digital tubes) on the surrounding single boards, and determine the hardware data in combination with the code type of each light-emitting diode (or digital tube), resulting in low efficiency, low accuracy, and incompleteness of hardware data acquisition. In the embodiment of the present application, the terminal device can use the adapter to directly obtain hardware data from the data storage circuit, improve data acquisition efficiency, accuracy, and increase the amount of hardware data acquisition.
[0232] Figure 6 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 See also Figure 6 , the method specifically comprises the following steps:
[0233] S601: The data storage circuit obtains a data read command.
[0234] In this embodiment, the data storage circuit may obtain a data read command, wherein the data read command includes an identifier of a target register.
[0235] S602: The data storage circuit identifies whether the data read command includes a security check code.
[0236] In this embodiment, the data storage circuit stores a security check code. After acquiring a data read command, the data storage circuit can identify whether the security check code exists in the data read command.
[0237] When the data storage circuit recognizes that the data read command does not include the security check code, the data storage circuit executes S603;
[0238] When the data storage circuit recognizes that the data read command includes the security check code, it executes S607.
[0239] S603: The data storage circuit obtains the reminder character string, and encodes the reminder character string to obtain an encoded reminder character string.
[0240] In this embodiment, the data storage circuit can obtain a reminder string when it is identified that the data read command does not include a security verification code, wherein the reminder string is stored in a register of the data storage circuit.
[0241] The data storage circuit can encode the reminder character string to obtain an encoded reminder character string.
[0242] S604: The data storage circuit assembles the encoded reminder character string according to the interface type of the first interface to obtain first reminder information.
[0243] In this embodiment, the data storage circuit may assemble the encoded reminder character string according to the interface type of the first interface to obtain the first reminder information, wherein the first reminder information corresponds to the interface type of the first interface.
[0244] S605: The data storage circuit sends first reminder information to the adapter through the first interface and the first conversion interface.
[0245] In this embodiment, the data storage circuit can send the first reminder information to the adapter through the first interface and the first conversion interface. It should be noted that, based on the same interface type of the first interface and the first conversion interface, the first reminder information corresponds to the interface type of the first conversion interface.
[0246] S606: The adapter converts the first reminder information into second reminder information, and sends the second reminder information to the terminal device through the second conversion interface and the second interface.
[0247] In this embodiment, the adapter may convert the first reminder information into the second reminder information, and send the second reminder information to the terminal device through the second conversion interface and the second interface.
[0248] The second reminder information corresponds to the interface type of the second conversion interface. It should be noted that, based on the fact that the second conversion interface and the second interface have the same interface type, the second reminder information corresponds to the interface type of the second interface.
[0249] S607: The data storage circuit determines the target register from the plurality of registers according to the identifier of the target register.
[0250] In this embodiment, the data storage circuit may determine the target register from the plurality of registers according to the identifier of the target register when recognizing that the data read command includes the security check code.
[0251] S608: The data storage circuit obtains the target register data through the target register.
[0252] In this embodiment, the data storage circuit can obtain the target register data through the target register.
[0253] S609: The data storage circuit determines the target combination character string according to the identifier of the target register.
[0254] In this embodiment, the data storage circuit may determine a target combination character string from a plurality of combination character strings according to an identifier of a target register.
[0255] S610: The data storage circuit combines the target display character string with the target register data to obtain initial first hardware data.
[0256] In this embodiment, the data storage circuit can combine the target display character string with the target register data to obtain the initial first hardware data.
[0257] S611: The data storage circuit encodes the initial first hardware data to obtain encoded initial first hardware data.
[0258] In this embodiment, the data storage circuit may encode the initial first hardware data to obtain encoded initial first hardware data.
[0259] S612: The data storage circuit assembles the encoded initial first hardware data according to the interface type of the first interface to obtain the first hardware data.
[0260] In this embodiment, the data storage circuit may assemble the encoded initial first hardware data according to the interface type of the first interface to obtain the first hardware data, wherein the first hardware data corresponds to the interface type of the first interface.
[0261] S613: The data storage circuit sends the first hardware data to the adapter through the first interface and the first conversion interface.
[0262] In this embodiment, the data storage circuit can send the first hardware data to the adapter through the first interface and the first conversion interface.
[0263] It should be noted that, based on the fact that the first interface and the first conversion interface have the same interface type, the first hardware data corresponds to the interface type of the first interface, and accordingly, the first hardware data corresponds to the interface type of the first conversion interface.
[0264] S614: The adapter converts the first hardware data into second hardware data, and sends the second hardware data to the terminal device through the second conversion interface and the second interface.
[0265] In this embodiment, the adapter may convert the first hardware data into the second hardware data, and send the second hardware data to the terminal device through the second conversion interface and the second interface.
[0266] The second hardware data corresponds to the interface type of the second conversion interface.
[0267] It should be noted that, based on the correspondence between the second conversion interface and the interface type of the second interface, the second hardware data corresponds to the interface type of the second interface.
[0268] Beneficial effects of this embodiment: The embodiment of the present application avoids the situation in which the data storage circuit sends the first hardware data in the event of a tester's accidental touch by identifying whether there is a security verification code in the data read command, thereby ensuring the security of the data.
[0269] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the embodiments of the present application are also intended to include these modifications and variations.
[0270] In the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the element. The term "or" and its variations may refer to "and / or". In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. In the embodiments of the present application, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, A and / or B, which may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0271] After considering the invention disclosed in the specification and practice, those skilled in the art will easily think of other embodiments of the present application. The embodiments of the present application are intended to cover any variation, use or adaptive change of the embodiments of the present application, which follows the general principles of the embodiments of the present application and includes common knowledge or conventional technical means in the technical field not disclosed in the embodiments of the present application.
Claims
1. A data processing circuit, characterized in that: include: A data storage circuit and an adapter, wherein the data storage circuit is electrically connected to the adapter via a first interface of the data storage circuit and a first conversion interface of the adapter; The adapter is electrically connected to the terminal device through the second conversion interface of the adapter and the second interface of the terminal device; the interface types of the first interface and the second interface are different; wherein, The data storage circuit is used to obtain first hardware data and send the first hardware data to the adapter through the first interface and the first conversion interface; the first hardware data corresponds to the interface type of the first interface; The adapter is used to convert the first hardware data into second hardware data, and send the second hardware data to the terminal device through the second conversion interface and the second interface; the second hardware data corresponds to the interface type of the second interface.
2. The circuit according to claim 1, characterized in that The data storage circuit comprises a plurality of registers; the data storage circuit is used for: Obtaining a data read command, wherein the data read command includes an identifier of a target register; Determining a target register from the plurality of registers according to the identifier of the target register; The first hardware data is obtained through the target register.
3. The circuit according to claim 2, characterized in that The data storage circuit is used for: In the case where it is identified that the data read command includes a security check code, the target register is determined from the multiple registers according to the identifier of the target register.
4. The circuit according to claim 2 or 3, characterized in that The data storage circuit is used for: Obtaining target register data from the target register; Determining a target combined character string according to the identifier of the target register; The first hardware data is acquired according to the target combined character string and the target register data.
5. The circuit according to claim 4, characterized in that The data storage circuit is used for: Combine the target display character string and the target register data to obtain initial first hardware data; Encoding the initial first hardware data to obtain encoded initial first hardware data; According to the interface type of the first interface, the encoded initial first hardware data is assembled to obtain the first hardware data.
6. The circuit according to any one of claims 3 to 5, characterized in that: The data storage circuit is also used for: When it is identified that the data read command does not include the security verification code, obtaining a reminder character string, and encoding the reminder character string to obtain an encoded reminder character string; According to the interface type of the first interface, assembling the encoded reminder character string to obtain first reminder information; The first reminder information corresponds to the interface type of the first interface; Sending the first reminder information to the adapter through the first interface and the first conversion interface; The adapter is also used to: The first reminder information is converted into second reminder information, and the second reminder information is sent to the terminal device through the second conversion interface and the second interface; the second reminder information corresponds to the interface type of the second interface.
7. The circuit according to claim 1, characterized in that The data storage circuit comprises a plurality of registers; the data storage circuit is used for: Obtaining a data read command, wherein the data read command includes an identifier of target hardware information; Determining the identifier of the corresponding target register according to the identifier of the target hardware information; Determining a target register from the plurality of registers according to the identifier of the target register; The first hardware data is obtained through the target register.
8. The circuit according to any one of claims 1 to 7, characterized in that: The data storage circuit includes a complex programmable logic device CPLD and a connector, wherein the connector includes the first interface; the CPLD is electrically connected to the connector through the pins of the CPLD and the pins of the connector; the connector is electrically connected to the adapter through the first interface and the first conversion interface; The CPLD is used to obtain first hardware data, and send the first hardware data to the connector through the pin of the CPLD and the pin of the connector; The connector is used to send the first hardware data to the adapter through the first interface and the first conversion interface.
9. The circuit according to any one of claims 1 to 8, characterized in that: The interface type of the first interface is a Universal Asynchronous Receiver / Transmitter (UART) type, and the interface type of the second interface is a Universal Serial Bus (USB) type.
10. A data processing method, characterized in that: Applied to a data processing circuit, the data processing circuit comprises a data storage circuit and an adapter, the data storage circuit is electrically connected to the adapter via a first interface of the data storage circuit and a first conversion interface of the adapter; The adapter is electrically connected to the terminal device via the second conversion interface of the adapter and the second interface of the terminal device; The first interface and the second interface have different interface types; The method comprises: The data storage circuit acquires first hardware data, and sends the first hardware data to the adapter through the first interface and the first conversion interface; The first hardware data corresponds to the interface type of the first interface; The adapter converts the first hardware data into second hardware data, and sends the second hardware data to the terminal device through the second conversion interface and the second interface; the second hardware data corresponds to the interface type of the second interface.
