Oversampling circuit and method for universal input / output interface

By designing an oversampling circuit of a general input and output interface, the oversampling mode in the A-PHY PAL GPIO protocol is solved, the problem of rough protocol specifications is achieved, the data is high reliability and accuracy, and the applicability of the protocol is enhanced.

CN119011074AActive Publication Date: 2024-11-22MOTORCOMM (SHANGHAI) ELECTRONIC TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410880561.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-11-22
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The lack of specific implementation details and standardized solutions in the prior art to implement the oversampling mode in the A-PHY PAL GPIO protocol, resulting in a relatively rough protocol specification and a technical gap.

Method used

A general input and output interface oversampling circuit is designed, including sampling unit, addition unit and packaging unit. By sampling multiple general input and output signals of the input and output interface group, cyclic redundancy checksum message count is added, and Packets of data into pre-determined formats are sent to peripheral devices to ensure data integrity and accuracy.

Benefits of technology

It effectively improves the reliability and accuracy of data, solves the problem of effective bit fuzzy in payload data, and implements arbitrary sampling rate configuration, reduces the bandwidth usage of invalid packets, and enhances the reliability and applicability of the protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011074A_ABST
    Figure CN119011074A_ABST
Patent Text Reader

Abstract

The invention provides an oversampling circuit and method for a universal input / output interface, and belongs to the technical field of communication, the oversampling circuit comprises a receiving channel connected between an input / output interface group and peripheral equipment, and the oversampling circuit comprises a sampling unit used for sampling a plurality of universal input / output signals of the input / output interface group to obtain payload data; the adding unit is used for adding the cyclic redundancy check and the message count in the payload data to obtain the payload data with the cyclic redundancy check and the message count; and the packaging unit is used for packaging the effective load data with the cyclic redundancy check and the message count into a data packet in a preset format and sending the data packet to the peripheral equipment. The method has the beneficial effects that an oversample mode in a protocol is realized, an implementation scheme is provided, general input and output signals are effectively sampled and processed, and the reliability and the accuracy of data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an oversampling circuit and method for a universal input / output interface. Background Art

[0002] With the development of assisted driving and autonomous driving, the number of cameras and displays in cars is increasing. Currently, there is no clear standardized solution between automakers and suppliers to achieve high-speed interfaces between cameras and ECUs. In order to meet the automotive industry's needs for high speed, low latency, functional safety, light weight, low power consumption, and the required economies of scale, the Mobile Industry Processor Interface (MIPI) Alliance has proposed a unified in-vehicle connection specification protocol stack.

[0003] "A-PHY Protocol Adaptation Layer Specification for GPIO, A-PHY PAL GPIO" (hereinafter referred to as the protocol) is a protocol released by the MIPI Alliance in September 2020. The protocol specifies the protocol adaptation layer (PAL) of the automotive physical layer (A-PHY) general-purpose input / output interface (A-PHY General-purpose input / output, A-PHY GPIO) and requires support for GPIO channels on A-PHY. The protocol requires that the GPIO signal mode received on the local side is the same as the signal mode generated on the remote side, and mentions two implementation modes: oversampling mode and event mode.

[0004] As an emerging protocol, there are very limited implementations of this protocol on the market. Moreover, the protocol does not mention specific implementation details, the specifications are relatively rough, and there are a lot of technical gaps. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides an oversampling circuit and method for a universal input and output interface.

[0006] The technical problem solved by the present invention can be achieved by adopting the following technical solutions:

[0007] A first aspect of the present invention is to provide an oversampling circuit for a universal input / output interface, comprising a transmission channel connected between an input / output interface group and a peripheral device, wherein the transmission channel comprises:

[0008] a sampling unit, connected to the input-output interface group, and used to sample a plurality of universal input-output signals of the input-output interface group to obtain effective load data;

[0009] an adding unit, connected to the sampling unit, and used for adding a cyclic redundancy check and a message count to the payload data to obtain a payload data with the cyclic redundancy check and the message count;

[0010] A packing unit is connected to the adding unit and the peripheral device respectively, and is used to pack the effective load data with cyclic redundancy check and message count into a data packet of a predetermined format, and send it to the peripheral device.

[0011] Preferably, the sampling unit comprises:

[0012] a first sampling module, configured to sample the plurality of universal input and output signals based on a plurality of consecutive sampling periods;

[0013] Each of the sampling cycles includes a first preset number of state groups, each state group includes a second preset number of states, and each state corresponds to a state mask;

[0014] The product of the first preset number and the second preset number is a multiple of bits of a payload page; and the status mask is all 1.

[0015] Preferably, the sampling unit further includes:

[0016] a second sampling module, configured to sample the plurality of universal input and output signals when a preset sampling trigger condition is met;

[0017] The preset sampling trigger condition is to determine that at least one of the universal input and output signals is a rising edge at the first sampling point of each sampling period.

[0018] Preferably, the sampling unit further includes:

[0019] a third sampling module, configured to sample the plurality of universal input and output signals according to a preset sampling logic;

[0020] The preset sampling logic samples the plurality of general input and output signals once every a third preset number of chip clocks.

[0021] Preferably, the third preset number is a ratio of a chip clock frequency to a universal input / output sampling frequency.

[0022] Preferably, in the data packet, a payload page is used as a carrier for carrying the payload data;

[0023] The sampling unit also includes: a storage module, used to store the payload data in the payload page.

[0024] Preferably, the storage module comprises:

[0025] A first shift register is used to shift the payload data and store them in the payload page.

[0026] Preferably, it further comprises a receiving channel connected between the input and output interface group and the peripheral device, wherein the receiving channel comprises:

[0027] a verification unit, connected to the peripheral device, used to obtain the data packet from the peripheral device, parse the data packet, and perform cyclic redundancy check and message count verification to obtain the payload data;

[0028] a parsing unit, connected to the verification unit, for parsing the payload data to obtain a parsing result;

[0029] A control unit is connected to the analysis unit, and is used to generate a corresponding control signal according to the analysis result, and transmit the control signal to the input and output interface group.

[0030] Preferably, in the data packet, a payload page is used as a carrier for carrying the payload data;

[0031] The parsing unit comprises:

[0032] A second shift register is used to parse the payload data from the payload page by shifting the payload data to obtain the parsing result.

[0033] A second aspect of the present invention is to provide an oversampling method for a universal input / output interface, which is applied to an oversampling circuit for the universal input / output interface as described above, wherein the transmitting channel comprises the following steps:

[0034] Sampling a plurality of general input and output signals of the input and output interface group to obtain payload data;

[0035] Adding a cyclic redundancy check and a message count to the payload data to obtain a payload data with a cyclic redundancy check and a message count;

[0036] The effective load data with the cyclic redundancy check and the message count are packaged into a data packet in a predetermined format and sent to the peripheral device.

[0037] The advantages or beneficial effects of the technical solution of the present invention are:

[0038] The oversampling circuit of the present invention implements the oversample mode in the protocol and provides an implementation scheme. The transmission channel samples multiple universal input and output signals of the input and output interface group through a sampling unit; then a cyclic redundancy check and a message count are added to the payload data through an adding unit to ensure the integrity and accuracy of the data; finally, the data is packaged according to a predetermined format through a packaging unit and sent to an external device for further processing, so that the universal input and output signals are effectively sampled and processed, and the reliability and accuracy of the data are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a structural block diagram of a transmission channel of an oversampling circuit of a universal input / output interface in a preferred embodiment of the present invention;

[0040] Figure 2 It is a schematic diagram of the aggregated waveform of three-way universal input and output signals in the prior art;

[0041] Figure 3 It is a schematic diagram of 16-bit payload data in the prior art;

[0042] Figure 4 This is a structural block diagram of a sampling unit in a preferred embodiment of the present invention;

[0043] Figure 5 A schematic diagram of the aggregated waveforms of three-way universal input and output signals in a preferred embodiment of the present invention;

[0044] Figure 6 It is a structural block diagram of the transmission and receiving channels of the oversampling circuit of the universal input and output interface in a preferred embodiment of the present invention;

[0045] Figure 7 FIG. 4 is a flow chart of an oversampling method of a universal input / output interface in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0048] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0049] See also Figure 1 In a preferred embodiment of the present invention, based on the above problems existing in the prior art, an oversampling circuit of a universal input / output interface is provided, comprising a transmission channel 3 connected between an input / output interface group 1 and a peripheral device 2, the transmission channel 3 comprising:

[0050] a sampling unit 31, connected to the input-output interface group 1, for sampling a plurality of general input-output signals of the input-output interface group to obtain payload data;

[0051] an adding unit 32, connected to the sampling unit 31, for adding a cyclic redundancy check and a message count to the payload data, so as to obtain a payload data with a cyclic redundancy check () and a message count;

[0052] A packing unit 33 is connected to the adding unit 32 and the peripheral device 2 respectively, and is used to pack the effective load data with the cyclic redundancy check and the message count into a data packet of a predetermined format, and send it to the peripheral device.

[0053] Specifically, in response to the problem that the existing emerging A-PHY PAL GPIO protocol lacks specific implementation details in the oversampling mode, in this embodiment, the present invention proposes an oversampling circuit for a general input and output interface, implements the oversampling mode of the A-PHY PAL GPIO protocol, and provides an implementation solution.

[0054] The oversampling circuit includes a transmitting channel 3 connected between an input / output interface group 1 and an external device 2, wherein the transmitting channel 3 includes a sampling unit 31, an adding unit 32 and a packing unit 33. First, a plurality of general input / output signals are sampled by the sampling unit 31 to obtain effective load data; then, a cyclic redundancy check (CRC) check and a message count are added to the effective load data by the adding unit 32 to ensure the integrity and accuracy of the data; finally, the data output by the adding unit 32 is packaged in a predetermined format by the packing unit 33 and sent to the external device for further processing, so as to effectively sample and process the general input / output signals and improve the reliability and accuracy of the data.

[0055] Furthermore, performing a CRC check on the payload data can ensure the integrity of the data. CRC (Cyclic Redundancy Check) is a commonly used error detection technology that calculates a check value on the data and then appends the check value to the data. After receiving the data, the receiver will also perform a CRC calculation and compare the calculated check value with the received check value. If they are inconsistent, it means that the data may have been tampered with or an error occurred during the transmission process.

[0056] Furthermore, the message counter (MC) is used to ensure the order and uniqueness of messages. Each time a message is sent, the counter is incremented and the value of the counter is appended to the message. After receiving the message, the receiver can determine whether the order of the message is correct by comparing the value of the counter, and can detect whether there are duplicate messages.

[0057] In some embodiments, the input / output interface group 1 includes a plurality of general purpose input / output interfaces (GPIOs), and three, four or more GPIOs may be provided. In the following embodiments of the present invention, three GPIOs are provided as an example, including GPIO0, GPIO1, and GPIO2. It should be noted that the number of GPIOs actually used may be set according to specific requirements.

[0058] In the prior art, the A-PHY PAL GPIO protocol discloses that the data length sampled in the oversample mode is constrained by three parameters: the number of states SGS, the number of state groups GTS, and the state mask StateMask. The specific constraints are as follows:

[0059]

[0060] Wherein, PayloadByteLength indicates the byte length of the payload data; ceil indicates rounding up; GTS indicates the number of state groups in a sampling cycle (transaction). In the implementation application, the state group index can start from 0, i.e., 0, 1, ... GTS-1; SGS indicates the number of states in each state group; i indicates the index of the state group. In the implementation application, the index i can start from 0, i.e., i = 0, 1, ... SGS-1; f(StateMask i ) represents the number of states calculated based on the state mask. This function is specified by the protocol and will not be described here.

[0061] like Figure 2 FIG. 4 shows a schematic diagram of the aggregate waveform of three universal input and output signals when StateMask=3b'011 / 3b'110. Figure 2In the sampling process, the sampling cycle (transaction) is continuous, that is, transaction0, transaction1, .... SGS = 2, GTS = 3 means that a transaction includes 3 state groups, each state group includes 2 states, that is, a total of 6 states, and StateMask in the 6 states is cycled according to the state mask 3b'011, 3b'110; where 3b' represents a 3-bit binary number, corresponding to the number of GPIO settings mentioned above, for example, if GPIO is set to 4, StateMask should be a 4-bit binary number. The numbers after 3b' correspond from left to right to represent the validity of the high-order GPIO signal at the sampling point from GPIO0. That is, in the numbers 011 and 110 after 3b', the first bit corresponds to GPIO0, the second bit corresponds to GPIO1, and the third bit corresponds to GPIO2.

[0062] When StateMask=0, it indicates an invalid sampling point, that is, the GPIO signal is invalid at this sampling point; when StateMask=1, it indicates a valid sampling point, that is, the GPIO signal is valid at this sampling point. As an example, 011 indicates that at this sampling point, GPIO1 and GPIO2 are valid, and GPIO0 is invalid. And 110 indicates that at this sampling point, GPIO0 and GPIO1 are valid, and GPIO2 is invalid.

[0063] It should be noted that, in the embodiment of the present invention, the value range of SGS is [0, SGS-1], and the value range of GTS is [0, GTS-1]. Therefore, Figure 2 In the example, SGS=2 and GTS=3 correspond. However, in the actual process, the value range of SGS is [0, SGS], that is, SGS should be set to 1; similarly, the value range of GTS is [0, GTS], that is, GTS should be set to 2. Since SGS and GTS start from 0 in actual applications, SGS can be expressed as a state index and GTS can be expressed as a state group index, and the number of settings is 1 less than that of the state group index.

[0064] use Figure 2 The sampling period configuration shown in the figure samples the signals of the three GPIOs, and the sampled payload data is as follows: Figure 3 As shown, a transaction is 16 bits, and some bits in the last byte of the payload data may be invalid, that is, 12 bits are valid, and 4 bits are invalid data after rounding.

[0065] It should be noted that in actual practice, users can aggregate any number of GPIOs by configuring registers, and the number of invalid bits in the payload data is uncertain. In this way, when implementing the design, it is necessary to distinguish which data is valid and which data is invalid, which will inevitably increase the complexity of the circuit design and increase power consumption and area overhead.

[0066] As a preferred embodiment, wherein Figure 4 As shown, the sampling unit 31 includes:

[0067] A first sampling module 311, configured to sample a plurality of general purpose input and output (GPIO) signals based on a plurality of consecutive sampling cycles (transactions);

[0068] Each sampling period includes a first preset number of state groups, each state group includes a second preset number of states, and each state corresponds to a state mask;

[0069] The product of the first preset number and the second preset number is a multiple of bits of a payload word; and the status mask is all 1.

[0070] Specifically, in view of the problem that the number of invalid bits in the above-mentioned Payload data is uncertain, additional complex circuit design is required, thereby increasing power consumption and area overhead. The embodiment of the present invention is designed to achieve valid data alignment of the payload data by analyzing reasonable StateMask, GTS and STS matching rules within the scope of the protocol during implementation, thereby effectively avoiding invalid data redundancy and data loss and reducing the complexity of implementation.

[0071] Specifically, by constraining StateMask, GTS and STS, the specific constraints are: the product of GTS and STS is an integer multiple of the bits of a payload word; at the same time, the state mask is all 1, that is, the corresponding GPIO is all valid at the sampling point.

[0072] As an example, if the payload word is 16 bits, the product of GTS and STS is an integer multiple of 16 bits, and the product can be 16, 32, 48, 64 or more.

[0073] Further, the configuration relationship of SGS, GTS and StateMask under the constraints of the embodiment of the present invention under the 16-bit payload word is shown in Table 1 below:

[0074] Table 116-bit payload word SGS, GTS and StateMask configuration relationship

[0075] Option SGS GTS StateMask 0 (default) 4 4 All 1 1 4 8 All 1 2 4 8 All 1 3 8 8 All 1

[0076] In actual application, all optional configurations under the constraint can be used as fixed configurations, so that users can select fixed configurations through configuration registers.

[0077] The above constraints can be used to aggregate any number of GPIOs, and align the bits of a payloadword in the sampled A-package (such as the 16-bit payload data above). Each bit in the payload data is valid, which simplifies the design and eliminates the need to add additional complex circuits to determine data validity, saving area and power consumption.

[0078] Furthermore, when multiple GPIOs are aggregated and sampled, the number of bytes of the corresponding data is twice the number of GPIOs, that is, N GPIOs are aggregated and sampled to generate 2*N bytes. Figure 5 For example, Option 0 is used to aggregate three GPIOs and sample them as follows: Figure 5 As shown, the payload data of a transaction is 2*3 bytes.

[0079] It should be noted that since SGS and GTS start from 0 in actual applications, the above constraints can be that the product of (GTS+1) and (STS+1) is an integer multiple of the bits of a payload word; and the state mask is all 1. The corresponding configuration relationship table is shown in Table 2:

[0080] Table 216-bit payload word SGS, GTS and StateMask configuration relationship

[0081] Option SGS GTS StateMask 0 (default) 3 3 All 1 1 3 7 All 1 2 3 7 All 1 3 7 7 All 1

[0082] As a preferred embodiment, wherein Figure 4 As shown, the sampling unit 31 also includes:

[0083] a second sampling module 312, configured to sample a plurality of general input and output signals when a preset sampling trigger condition is met;

[0084] The preset sampling trigger condition is to determine that at least one universal input / output signal is a rising edge at the first sampling point of each sampling cycle.

[0085] Specifically, considering that the MIPI protocol does not clearly state whether to continue sampling when there is no pulse on the GPIO pin, this may lead to problems with data validity, boundaries, timing, etc., limiting the reliability and applicability of the protocol.

[0086] In this embodiment, by designing an event-triggered implementation, unnecessary invalid A-packet transmission is reduced, and the A-PHY network bandwidth overhead is reduced. The specific implementation method is:

[0087] When aggregate sampling of N GPIO signals begins, if all signals are at a low level at the first sampling point of a transaction, no sampling event is triggered during the transaction until the level status of the N GPIO signals is judged at the first sampling point of the next transaction to determine whether sampling is triggered during the next transaction.

[0088] When at least one signal is at a rising edge (or high level) at the first sampling point of the transaction, a sampling event is triggered, and the sampling frequency can be set to OSR; and during this transaction, whether all signals are at a low level or not, sampling is continued until the first sampling point of the next transaction, the level states of N GPIO signals are judged, so as to determine whether sampling is triggered during the next transaction.

[0089] In the embodiment of the present invention, through this implementation, when the GPIO signal is at a low level and there is no data transmission, the sampling logic is not performed, thereby reducing power consumption and occupation of the channel bandwidth.

[0090] As a preferred embodiment, wherein Figure 4 As shown, the sampling unit also includes:

[0091] a third sampling module, used for sampling a plurality of general input and output signals according to a preset sampling logic;

[0092] The preset sampling logic samples the plurality of general input and output signals once every a third preset number of chip clocks.

[0093] As a preferred implementation, the third preset number is a ratio of a chip clock frequency to a universal input / output sampling frequency.

[0094] Specifically, in this embodiment, a configurable sampling frequency design based on chip clock is adopted, the chip clock frequency is CHIP_HZ, and the frequency of GPIO sampling is SAMPLE_HZ. The sampling logic can sample the GPIO signal once after a third preset number (Counter) of chip clocks.

[0095] The calculation formula of Counter is:

[0096] Counter=CHIP_HZ / SAMPLE_HZ.

[0097] Furthermore, users can configure their own sampling rate according to their actual frequency scenarios. This can be achieved by modifying the value of SAMPLE_HZ. According to the actual situation, the sampling rate can be adjusted and optimized to improve the performance and efficiency of the system.

[0098] Furthermore, a counter can be set to sample the GPIO signal once every Counter chip clocks according to the value of Counter. During each sampling, the state of the GPIO is read and processed or recorded accordingly. According to actual needs, a timer or interrupt can be set to trigger the sampling operation to ensure the accuracy and timeliness of the sampling.

[0099] As a preferred embodiment, the data packet uses a payload page as a carrier for carrying the payload data;

[0100] like Figure 4 As shown, the sampling unit 31 further includes: a storage module 314, which is used to store the payload data in the payload page.

[0101] As a preferred embodiment, the storage module includes:

[0102] A first shift register (not shown in the figure) is used to shift the payload data and store it in the payload page.

[0103] Specifically, the payload word is the carrier of the payload data. The payload word refers to the part of the data packet transmitted in the computer network that carries the actual data content to be transmitted. It is the part of the data packet other than the header information, and contains the actual data to be transmitted. The payload word can be various forms of data such as text, images, audio, video, etc.

[0104] Payload Word is the valid data sampled or parsed in RX and TX. Payload Word uses Word (16 bits) as the smallest data unit. In the scenario of aggregate processing of M GPIO signals, Payload Word contains M words.

[0105] like Figure 6 As shown, at the transmitting (TX) end, the sampling unit 3 samples N GPIO input signals at the sampling point at the sampling frequency OSR (determined by the Counter) to obtain N bits of payload data, where each bit corresponds to a GPIO input signal; then, CRC check and message counter are added to aggregate and generate an A-packet that complies with the A-PHY protocol format, and send it to the APPI interface of the peripheral device 2.

[0106] Furthermore, the sampling unit 3 processes in a shift register manner, shifts N times to store the sampled N bit data in Word, and then waits for the next sampling point to continue the shift operation.

[0107] As a preferred embodiment, wherein Figure 6 As shown, it also includes a receiving channel 4 connected between the input and output interface group 1 and the peripheral device 2, and the receiving channel 4 includes:

[0108] a verification unit 41, connected to the peripheral device 2, for obtaining a data packet from the peripheral device, parsing the data packet, and performing a cyclic redundancy check and message count verification to obtain payload data;

[0109] a parsing unit 42, connected to the verification unit 41, for parsing the payload data to obtain a parsing result;

[0110] A control unit 43 is connected to the analyzing unit 42 and is used to generate a corresponding control signal according to the analyzing result and transmit the control signal to the input-output interface group 1 .

[0111] Specifically, Figure 6 As shown, at the receiving (RX) end, after receiving A-packet from the APPI interface of peripheral device 2, PayloadWord is obtained after parsing, and the Word in Payload Word is parsed using a shift register: that is, for A-packet aggregated from N GPIO input signals, after N bit GPIO signals are parsed by shifting N times, wait for the next sampling point to continue the shift operation.

[0112] In the verification unit 41, the A-packet is parsed, and CRC check and MC check are performed. Then, the payload data that passes the CRC check and MC check is sent to the parsing (Parse) unit 42 for further parsing, and the parsing result is sent to the control (Pin_mux) unit 43 to drive the signal to the GPIO output signal on the system on chip Soc.

[0113] As a preferred embodiment, the data packet uses a payload page as a carrier for carrying the payload data;

[0114] The parsing unit includes:

[0115] A second shift register (not shown in the figure) is used to parse the payload data in the payload page by shifting to obtain the parsing result.

[0116] Furthermore, a shift register is used on the TX side to splice the sampled data into a payload word; a shift register is also used on the RX side to convert the 16-bit payload data into a GPIO signal.

[0117] In the embodiment of the present invention, both the TX end and the RX end use shift registers, which has a smaller area overhead than using an algorithm (such as a for loop) to implement a sampling and analysis circuit.

[0118] In some embodiments, the above-mentioned input and output interface group can be a general input and output interface of the system on chip Soc, or a general input and output interface of an external device. In the system on chip Soc, the general input and output interface is usually used to connect external devices, such as a keyboard, a mouse, a display, a storage device, etc. These interfaces can communicate with external devices through standard communication protocols such as UART, SPI, I2C, etc. Through these interfaces, the system on chip Soc can exchange data and perform control operations with external devices.

[0119] See also Figure 7 The second aspect of the present invention is to provide an oversampling method for a universal input / output interface, which is applied to an oversampling circuit of the universal input / output interface as described above, and the transmitting channel includes the following steps:

[0120] S1, sampling multiple general input and output signals of the input and output interface group to obtain payload data;

[0121] S2, adding a cyclic redundancy check and a message count to the payload data to obtain a payload data with the cyclic redundancy check and the message count;

[0122] S3, packing the payload data with the cyclic redundancy check and the message count into a data packet in a predetermined format and sending it to the peripheral device.

[0123] As for more implementation details of the method, the oversampling circuit has been disclosed and will not be described in detail in this embodiment.

[0124] The advantages or beneficial effects of adopting the above technical solution are: the oversampling circuit of the present invention implements the oversample mode in the protocol and provides an implementation scheme, the transmission channel samples multiple universal input and output signals of the input and output interface group through the sampling unit; then the cyclic redundancy check and message count are added to the payload data through the adding unit to ensure the integrity and accuracy of the data; finally, the data is packaged in a predetermined format through the packaging unit and sent to the peripheral device for further processing, so as to effectively sample and process the universal input and output signals and improve the reliability and accuracy of the data.

[0125] At the same time, the problem of payload data valid bit ambiguity was solved in the implementation process, arbitrary sampling rate configuration was achieved, and the rising edge triggered sampling mode was innovatively adopted to reduce the bandwidth occupied by invalid packets.

[0126] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.

Claims

1. An oversampling circuit for a general purpose input / output interface, It is characterized in that The invention comprises a transmission channel connected between an input-output interface group and a peripheral device, wherein the transmission channel comprises: a sampling unit, connected to the input-output interface group, and used to sample a plurality of universal input-output signals of the input-output interface group to obtain effective load data; an adding unit, connected to the sampling unit, and used for adding a cyclic redundancy check and a message count to the payload data to obtain a payload data with the cyclic redundancy check and the message count; A packing unit is connected to the adding unit and the peripheral device respectively, and is used to pack the effective load data with cyclic redundancy check and message count into a data packet of a predetermined format, and send it to the peripheral device.

2. The oversampling circuit of the universal input / output interface according to claim 1, It is characterized in that The sampling unit comprises: a first sampling module, configured to sample the plurality of universal input and output signals based on a plurality of consecutive sampling periods; Each of the sampling cycles includes a first preset number of state groups, each state group includes a second preset number of states, and each state corresponds to a state mask; The product of the first preset number and the second preset number is a multiple of bits of a payload page; and the status mask is all 1.

3. The oversampling circuit of the universal input / output interface according to claim 1, It is characterized in that The sampling unit also includes: a second sampling module, configured to sample the plurality of universal input and output signals when a preset sampling trigger condition is met; The preset sampling trigger condition is to determine that at least one of the universal input and output signals is a rising edge at the first sampling point of each sampling period.

4. The oversampling circuit of the universal input / output interface according to claim 1, It is characterized in that The sampling unit also includes: a third sampling module, configured to sample the plurality of universal input and output signals according to a preset sampling logic; The preset sampling logic samples the plurality of general input and output signals once every a third preset number of chip clocks.

5. The oversampling circuit of the universal input / output interface according to claim 4, It is characterized in that The third preset number is a ratio of the chip clock frequency to the general input and output sampling frequency.

6. The oversampling circuit of the universal input / output interface according to claim 1, It is characterized in that In the data packet, a payload page is used as a carrier for carrying the payload data; The sampling unit also includes: a storage module, used to store the payload data in the payload page.

7. The oversampling circuit of the universal input / output interface according to claim 6, It is characterized in that The storage module comprises: A first shift register is used to shift the payload data and store them in the payload page.

8. The oversampling circuit of the universal input / output interface according to claim 1, It is characterized in that It also includes a receiving channel connected between the input and output interface group and the peripheral device, and the receiving channel includes: a verification unit, connected to the peripheral device, used to obtain the data packet from the peripheral device, parse the data packet, and perform cyclic redundancy check and message count verification to obtain the payload data; a parsing unit, connected to the verification unit, for parsing the payload data to obtain a parsing result; A control unit is connected to the analysis unit, and is used to generate a corresponding control signal according to the analysis result, and transmit the control signal to the input and output interface group.

9. The oversampling circuit of the universal input / output interface according to claim 8, It is characterized in that In the data packet, a payload page is used as a carrier for carrying the payload data; The parsing unit comprises: A second shift register is used to parse the payload data from the payload page by shifting the payload data to obtain the parsing result.

10. An oversampling method for a general purpose input / output interface, It is characterized in that The oversampling circuit applied to the universal input / output interface according to any one of claims 1 to 9, wherein the transmitting channel comprises the following steps: Sampling a plurality of general input and output signals of the input and output interface group to obtain payload data; Adding a cyclic redundancy check and a message count to the payload data to obtain a payload data with a cyclic redundancy check and a message count; The effective load data with the cyclic redundancy check and the message count are packaged into a data packet in a predetermined format and sent to the peripheral device.

Citation Information

Patent Citations

  • Method and processor for controlling digital input and output

    CN106708759A

  • Method and apparatus for automatic skew compensation

    CN107431614A

  • Data transmission method and communication device

    CN113381838A

  • Recording Circuit and a Method of Controlling the Same

    US20130063290A1

  • Communication apparatus and communication method, and program

    US20220060282A1