Inter-chip communication circuit and method, communication interval time determination circuit and method, and chip
By using interval time determination circuits in the inter-chip communication circuit, dynamically adjusting the transmission interval of data frames, the communication failure problem caused by clock deviation is solved, tolerance for frequency deviation and reliability of data transmission is achieved, and the cost is low and small area circuit features.
Patent Information
- Application Number
- CN202410987632.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-22
AI Technical Summary
Clock deviations between different chips may lead to communication failures. The prior art such as high-precision clock schemes and large-capacity cache schemes cannot effectively solve the problem of inter-chip chain communication failures caused by clock frequency deviations.
By introducing an interval time determination circuit into the inter-chip communication circuit, using a counter, decoder and adder circuit, the negative feedback adjustment value is calculated based on the duration of the received data frame and the amount of data to be sent, and the transmission between data frames is dynamically adjusted. interval to tolerate frequency deviation.
It realizes the tolerance of frequency deviation, prevents inter-chip chain communication failure, ensures the accuracy and reliability of data transmission, and has a low cost and a small circuit area.
Smart Images

Figure CN118964260A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an inter-chip communication circuit and method, a communication interval time determination circuit and method, and a chip. Background Art
[0002] When communicating between chips, clocks of different chips may deviate, which may cause communication failure. A circuit or method that can effectively communicate between chips is desired. Summary of the invention
[0003] According to one aspect of the present disclosure, there is provided an inter-chip communication circuit, comprising: a receiving circuit for receiving a data frame; a memory for storing the received data frame; a counter circuit for determining a receiving frame duration over which the data frame is received; a decoder circuit for obtaining a negative feedback adjustment value based on the amount of data to be sent stored in the memory; an adder circuit for determining an interval time based on the receiving frame duration and the negative feedback adjustment value; and a sending circuit for sending the data frame by using the determined interval time as the sending interval between the data frames.
[0004] According to another aspect of the present disclosure, there is provided an interval time determination circuit for inter-chip communication, comprising: a counter circuit for obtaining a reception frame duration elapsed for receiving a data frame; a decoder circuit for obtaining a negative feedback adjustment value based on an amount of data to be sent stored in a memory; and an adder circuit for determining an interval time based on the reception frame duration and the negative feedback adjustment value, wherein the interval time is used as a transmission interval between data frames.
[0005] According to yet another aspect of the present disclosure, a chip is provided, including the inter-chip communication circuit according to the various embodiments of the present disclosure or the interval time determination circuit for inter-chip communication according to the various embodiments of the present disclosure.
[0006] According to another aspect of the present disclosure, there is provided a method for inter-chip communication, comprising: receiving a data frame; storing the received data frame; determining a reception frame duration during which the data frame is received; obtaining a negative feedback adjustment value based on the stored amount of data to be sent; determining an interval time based on the reception frame duration and the negative feedback adjustment value; and sending the data frame by using the determined interval time as the sending interval between data frames.
[0007] According to another aspect of the present disclosure, a method for determining an interval time for inter-chip communication is provided, comprising: obtaining a reception frame duration during which a data frame is received; obtaining a negative feedback adjustment value based on an amount of data to be sent stored in a memory; and determining an interval time based on the reception frame duration and the negative feedback adjustment value, wherein the interval time is used as a sending interval between data frames.
[0008] These and other aspects of the disclosure will be apparent from and elucidated with reference to the embodiments described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Further details, features and advantages of the present disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0010] Figure 1 is a schematic diagram illustrating a topological structure of a distributed battery management system;
[0011] Figure 2 is a schematic diagram illustrating communication frame forwarding;
[0012] Figure 3 is a schematic diagram illustrating a daisy chain forwarding communication failure caused by frequency deviation in the related art;
[0013] Figure 4 is a schematic circuit diagram illustrating a method for inter-chip communication or for determining a communication interval time according to one or more embodiments of the present disclosure;
[0014] Figure 5 is a flow chart illustrating a method for determining an interval time for inter-chip communication according to an exemplary embodiment of the present disclosure;
[0015] Figure 6 is a schematic diagram illustrating adjustment of the interval time between data frames according to an embodiment of the present disclosure;
[0016] Figure 7 is a flow chart illustrating a method for determining an interval time for inter-chip communication according to a variation of the present disclosure;
[0017] Figure 8 is a schematic diagram illustrating a communication frame format according to an exemplary embodiment of the present disclosure;
[0018] Fig. 9 is a schematic diagram illustrating a signal clock timing according to an exemplary embodiment of the present disclosure;
[0019] Fig.10 is a flow chart illustrating an inter-chip communication method according to an exemplary embodiment of the present disclosure;
[0020] Fig.11 is a schematic diagram illustrating the adjustment capability according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] It will be understood that, although the terms first, second, third, etc. may be used to describe various elements, components, regions, layers and / or parts in this article, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish an element, component, region, layer or part from another element, component, region, layer or part. Therefore, the first element, component, region, layer or part discussed below may be referred to as the second element, component, region, layer or part without departing from the teaching of the present disclosure.
[0022] Spatially relative terms such as "below," "beneath," "lower," "below," "above," "upper," and the like may be used herein for ease of description to describe the relationship of one element or feature to another element or feature as illustrated in the figure. It will be understood that these spatially relative terms are intended to cover different orientations of the device in use or operation in addition to the orientation depicted in the figure. For example, if the device in the figure is flipped, the element described as "below other elements or features" or "below other elements or features" or "below other elements or features" will be oriented to "above other elements or features." Therefore, the exemplary terms "below" and "below" can cover both orientations above and below. Terms such as "before" or "before" and "after" or "followed by" can be similarly used, for example, to indicate the order in which light passes through the elements. The device can be oriented in other ways (rotated 90 degrees or in other orientations) and the spatially relative descriptors used in this article are interpreted accordingly. In addition, it will also be understood that when a layer is referred to as being “between two layers,” it can be the only layer between the two layers, or one or more intervening layers may also be present.
[0023] The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "one", "one" and "the" are intended to also include plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "include" and / or "comprise" specify the existence of the features, integral bodies, steps, operations, elements and / or parts when used in this specification, but do not exclude the existence of one or more other features, integral bodies, steps, operations, elements, parts and / or their groups or add one or more other features, integral bodies, steps, operations, elements, parts and / or their groups. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items, and the phrase "at least one of A and B" includes only A, only B, and both A and B.
[0024] It will be understood that when an element or layer is referred to as being "on another element or layer," "connected to another element or layer," "coupled to another element or layer," or "adjacent to another element or layer," it may be directly on another element or layer, directly connected to another element or layer, directly coupled to another element or layer, or directly adjacent to another element or layer, or there may be intermediate elements or layers. Conversely, when an element is referred to as being "directly on another element or layer," "directly connected to another element or layer," "directly coupled to another element or layer," or "directly adjacent to another element or layer," there are no intermediate elements or layers. However, in no case should "on..." or "directly on..." be interpreted as requiring that one layer completely cover the layer below.
[0025] Embodiments of the present disclosure are described herein with reference to schematic illustrations (and intermediate structures) of idealized embodiments of the present disclosure. As such, variations in the illustrated shapes, for example as a result of manufacturing techniques and / or tolerances, should be expected. Therefore, embodiments of the present disclosure should not be interpreted as being limited to the specific shapes of the zones illustrated herein, but should include shape deviations, for example, due to manufacturing. Therefore, the zones illustrated in the figures are schematic in nature, and their shapes are not intended to illustrate the actual shapes of the zones of the device and are not intended to limit the scope of the present disclosure.
[0026] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the relevant art and / or the context of this specification, and will not be interpreted in an idealized or overly formal sense, unless explicitly defined as such herein.
[0027] When communicating between chips, the clocks of different chips may deviate, also known as clock mismatch, which may lead to communication failure. For example, assume a data communication scenario from the first chip to the second chip to the third chip, and assume that the clock of the first chip is faster and the clock of the second chip is slower. For example, it takes 9us for the first chip to send a one-bit communication frame, but it takes 11us for the second chip to send a one-bit communication frame. In this case, the communication rate received by the second chip corresponds to the clock of the first chip, and the sending speed corresponds to its own clock. For example, the communication rate received by the second chip is still 1 bit / 9us of the first chip, and the sending rate is bit / 11us. At this time, because the second chip takes data from the FIFO and sends it slowly, the communication FIFO of the second chip will overflow, resulting in errors in the data sent by the second chip, so that the third chip receives incorrect communication data, resulting in the failure of communication between the first chip-the second chip-the third chip.
[0028] The data communication scenario between chips is widely used. As a specific non-limiting embodiment, the following is combined with Figure 1 To describe a chip communication scenario that can be applicable to daisy chain communication and more specifically to the field of electric vehicles.
[0029] Figure 1 A schematic diagram of the topological structure of a distributed battery management system (BMS) is shown. In the use scenario of electric vehicles (EVs), stackable battery strings (Stackable Cells) can be used as their energy source. The battery management system of electric vehicles can use a distributed BMS architecture. Every several battery cells (Battery Cells) can be equipped with a monitoring chip (Monitoring IC) to measure the voltage and temperature of each battery cell. Since the battery cells are stackable, the monitoring chip can also be a stackable monitoring chip (Stackable Monitoring IC), such as chip stack (Stack) 1, stack 2, ..., stack N. The monitoring stack chips can be connected by daisy chain (Daisy Chain), and asynchronous communication can be used to return the voltage and temperature measurement results. Finally, the measurement results of all monitoring chips are summarized and returned to the BMS controller through the communication bridge chip (Bridge IC). Refer to the following. Figure 2 As shown, in a distributed BMS system, chip m will forward the communication frame from the previous chip m+1. In such an example, the daisy chain communication between the monitoring stack chips may fail due to frequency deviation. It can be understood that the above is only an example scenario, and the scenario of inter-chip communication and the communication problems that exist are not limited to this scenario.
[0030] In the related art, solutions to the problem of inter-chip communication mismatch include high-precision clock solutions and large-capacity cache solutions. The high-precision clock solution is to reduce the relative frequency deviation between the monitoring stack chips through the on-chip high-precision clock. However, this solution has very high requirements on the design accuracy of the on-chip clock module and is relatively expensive. The large-capacity cache solution solves the frequency deviation problem by placing a large-capacity FIFO between the receiving end and the transmitting end. Since the amount of return data from the BMS may be large, the FIFO capacity required for this solution is large and the cost is still high. In addition, these solutions cannot improve the communication system's tolerance to frequency deviation, and it is difficult to substantially solve the problem of inter-chip chain communication failure caused by clock frequency deviation. Therefore, according to one or more embodiments of the present disclosure, a solution based on adjusting the interval time of inter-chip communication to achieve tolerance to frequency deviation is proposed, thereby preventing the clock frequency deviation between each device from causing inter-chip chain communication failure.
[0031] Figure 3 The schematic diagram shows the failure of inter-chip data forwarding communication caused by inter-chip clock deviation, wherein data communication occurs at least between the first chip STACK1, the second chip STACK2 and the third chip STACK3, and there is a clock deviation between at least the first chip and the second chip. Figure 3 As shown, the frequency deviation causes the FIFO of the second chip to overflow, which in turn causes the forwarding communication to fail.
[0032] Based on this, according to an embodiment of the present disclosure, a method for determining an interval time for inter-chip communication, an inter-chip communication method, and corresponding circuits and chips are proposed.
[0033] Reference below Figure 4 The circuit implementation of the interval time determination scheme or the inter-chip communication scheme according to one or more embodiments of the present disclosure is described. Figure 4 As shown, the inter-chip communication circuit 400 may include an interval time determination circuit 410, which may be used to determine or adjust the interval time. For example, the interval time determination circuit 410 may be used to implement a reference Figure 5 or Figure 7 It is understood that the interval determination circuit 410 may also be referred to as an interval determination module, an interval adjustment module, an interval adjustment module, a feedback circuit, a feedback module, etc., and it is understood that it does not necessarily need to be implemented as a separate or integrated module.
[0034] like Figure 4As shown, the interval time determination circuit 410 may include a counter circuit 411, a decoder circuit 412 and an adder circuit 413. The counter circuit 411 may be used to obtain a receiving frame duration for receiving a data frame. The decoder circuit 412 may be used to obtain a negative feedback adjustment value based on the amount of data to be sent stored in a memory. The adder circuit 413 may be used to determine an interval time based on the receiving frame duration and the negative feedback adjustment value, and the interval time is used as a sending interval between data frames.
[0035] The interval time determination circuit 410 may be used to implement the interval time determination method 500 for inter-chip communication according to one or more embodiments of the present disclosure. Figure 5 As shown, the various steps of the method 500 for determining the interval time for inter-chip communication are shown. It can be understood that, as will be further described below, Figure 4 As described, the various steps of the interval time determination method 500 can be implemented using corresponding parts or elements of the circuit to be described below, and the description of other embodiments or variations of the interval time determination circuit 410 can also be applied to the interval time determination method 500, which will not be repeated in this article.
[0036] At step 510, a reception frame duration elapsed during which a data frame is received is obtained.
[0037] At step 520, a negative feedback adjustment value is obtained based on the amount of data to be sent stored in the memory. For example, the amount of data in the memory can be monitored, and the correction amount of the interval time between data frames can be determined based on the amount of data to perform negative feedback adjustment.
[0038] At step 530, an interval time is determined based on the received frame duration and the negative feedback adjustment value, and the interval time is used as a transmission interval between data frames.
[0039] According to one or more embodiments of the present disclosure, the transmission interval between data frames can be controllably adjusted, thereby achieving tolerance to frequency deviation between chips. It can be understood that the use of the name "negative feedback adjustment value" can indicate that when the amount of data to be sent stored in the memory is large, it means that the transmission rate of the current chip is slower than the receiving rate (or the transmission rate of the previous chip), so more data to be sent is accumulated in the memory. Therefore, it is necessary to perform negative feedback adjustment on the transmission interval and use a smaller transmission interval to obtain a faster transmission rate and prevent memory overflow.
[0040] like Figure 6As shown, according to an embodiment of the present disclosure, a schematic diagram of data forwarding after adopting an interval time adjustment mechanism between data frames. The first chip STACK1, the second chip STACK2 and the third chip STACK3 are shown, and there is a clock deviation between at least the first chip and the second chip. By adjusting the interval time, it can be ensured that the memory (such as a FIFO memory) does not overflow, thereby ensuring accurate data transmission between chips. It can be seen that after dynamically adjusting the data frame interval time of the sending frame according to the embodiment of the present disclosure, normal communication can be achieved even if there is a certain frequency deviation.
[0041] Return to reference Figure 4 , the circuit 400 may further include a memory 420 , a receiving circuit 430 and a transmitting circuit 440 .
[0042] The transmission circuit 440 may be used to transmit data frames by using the determined interval time as the transmission interval between data frames. The interval time determination circuit 410 may be used to provide the generated or determined interval time value to the transmission circuit (TXPHY) 440 for use by the transmission circuit for transmission.
[0043] The receiving circuit 430 may be used to receive a data frame. For example, the interval time determination circuit 410 may read a signal related to the duration of a received frame from the receiving circuit (RXPHY) 430, such as an idle_filter_out signal marking the start of a received frame.
[0044] The memory 420 may be used to store the received data frame. The interval time determination circuit 410 may read the current memory data amount from the memory 420, for example, the memory depth fifo_cnt[4:0]. Figure 4 As shown, the memory 420 may be a first-in-first-out FIFO memory, but the present disclosure is not limited thereto.
[0045] According to some embodiments, the adder circuit further determines the interval time based on an inherent time adjustment value, the inherent time adjustment value being based on a frame structure of the data frame.
[0046] Reference below Figure 7 700 for determining the interval time for inter-chip communication according to a variant of the present disclosure. It can be understood that Figure 7 In, with Figure 5 Like numbers in the method 700 indicate like steps, for example, step 510 may correspond to 710, step 520 may roughly correspond to 720, and step 530 may substantially correspond to step 730, etc., and thus repeated descriptions may be omitted. It is understood that the method 700 may also be used as shown in FIG. Figure 4 The circuit shown or its modified examples are implemented, and the details are not repeated here.
[0047] At step 710, the received frame duration of the received data frame may be obtained. For example, the time of each bit of the daisy chain during reception may be counted. For example, and for the convenience of the following description, the count result of the received frame duration may be recorded as A.
[0048] At step 715, a positive feedback adjustment value can be obtained based on the frame structure of the data frame, which can also be called an inherent time adjustment value. It can be calculated that the bit / bit interval time during transmission should be (A-inherent time), and the result is recorded as B, that is, B=(A-inherent time), where the inherent time is the inherent time defined in the communication frame format. Exemplarily, this step can be called a coarse positive feedback step.
[0049] At step 720, a negative feedback adjustment value may be obtained based on the amount of data to be sent stored in the memory. For example, the amount of data in the memory (e.g., FIFO) may be monitored, and a fine adjustment correction amount of the bit / bit interval time during transmission may be calculated based on the amount of data, which is recorded as C. Exemplarily, this step may be referred to as a fine adjustment negative feedback step. As described above, the "negative feedback" here means that when the amount of data to be sent stored in the memory is large, a smaller transmission interval will be used, thereby speeding up the transmission rate and preventing the memory from overflowing.
[0050] At step 730, an interval time may be determined based on the received frame duration, the positive feedback adjustment value, and the negative feedback adjustment value, and the interval time may be used as a transmission interval between data frames. Continuing with the above example, the coarse adjustment positive feedback and fine adjustment negative feedback algorithms may be combined to calculate that the final bit / bit interval time during transmission should be D, that is, D=BC=A-inherent time-C.
[0051] It will be appreciated that although the steps are described in a particular order, Figure 5 and Figure 7 , but it is not required that the steps must be performed in such an order. For example, step 715 can be performed after step 720. For another example, step 715 can be combined with step 720, and in such a case, the combined step 715 can be similar to step 720. Figure 5 As a specific non-limiting example, step 715 may be performed by Figure 4 The adder 413 in the embodiment is used to perform the above operation, but the present disclosure is not limited thereto.
[0052] For example, the inherent time adjustment value may represent a standard data frame time defined in a frame format. In such an example, an adder circuit may be used to subtract the inherent time adjustment value from the received frame duration. For example, in the case where the frame structure of the data frame is fixed, the feedback value may be built into an adder in the circuit, or may be built into other parts of the circuit. As another embodiment, in the case where the frame structure of the data frame is adjustable or partially adjustable, the feedback value may be input into the circuit, such as into an adder, through various circuit elements or structures (not shown) that can be understood by those skilled in the art.
[0053] According to some embodiments, the standard data frame time includes a header time, a valid data time, and a tail time.
[0054] Figure 8 An exemplary communication frame format is shown. In such an exemplary communication frame format, each bit header has a bus idle time of 1.375us (idle time 1), the middle is a nominal time of 6.5us, and the tail is a data tail time of 0.5us (bus short); in addition, there is an interval between each data frame, that is, between bits. Various embodiments of the present disclosure propose a scheme for adjusting the idle time 2, including corresponding methods, circuits, chips, etc. By dynamically adjusting the interval time between this data frame, the tolerance for asynchronous communication frequency deviation can be achieved. It can be understood that the communication frame format shown here is only an example, and the embodiments of the present disclosure can be applied to various data frame formats as long as there is an interval between data frames.
[0055] Table 1 shows an improved communication frame format according to an exemplary embodiment of the present disclosure, which includes a fixed time and an adjustable interval time.
[0056] Table 1 Example communication frame format
[0057]
[0058] As a specific non-limiting example, the following formula may be used to implement the step of “determining the interval time based on the inherent time adjustment value” or “coarse adjustment positive feedback algorithm” as referred to herein.
[0059]
[0060] Among them, interval time is the interval time, input delay cnt is the duration of the received frame, clkperiod is the clock period, bus idle time is the bus idle time defined in the data frame, nominal time is the nominal bit time, and bus short time is the data tail time.
[0061] In some embodiments, the above formula can be modified as follows:
[0062]
[0063] Among them, reference Figure 4 , clk8M period is the clock period clk_8M in the figure, input delay cnt[7:0] represents the duration of the received frame, which can be input to the adder 413 through the counter 411. In such an example, the nominal bit time and the data tail time can be fixed, for example, 56 clock cycles, and can be fixedly written into the adder. In such an example, IDLE1TIME[7:0] is the clock period corresponding to the bus idle time, which can be adjusted or not written into the circuit for other reasons, and can be input into the interval time register 415. It can be understood that the above is only an example, and the present disclosure is not limited to this. For example, in other embodiments, the time corresponding to the entire data frame format can be written into the adder, input into the adder through the circuit, or input, saved or calculated through other elements of the circuit.
[0064] Return to reference Figure 4 Exemplarily, the counter circuit may be configured to convert the duration of receiving a single data frame into a clock count based on the clock of the current receiving chip as the receiving frame duration.
[0065] refer to Fig. 9 , which shows the waveform of the circuit implementation of the inter-frame interval time adjustment algorithm. Fig. 9 shows the communication receiving signal com_rx, such as Figure 4 As shown, the receiving circuit 430 can receive the communication receiving signal com_rx. Com_rx can be counted to obtain the receiving frame duration.
[0066] According to some embodiments, the circuit 400 may further include an edge detector, the edge detector being configured to: obtain a delayed idle signal by delaying a received idle signal representing an idle time in the receiving circuit; and obtain an idle edge pulse signal based on the idle signal and the delayed idle signal. In such an embodiment, the counter circuit may be configured to obtain the receiving frame duration by accumulating and counting two adjacent idle edge pulse signals.
[0067] Return to reference Figure 4 , which shows a negative edge detector 414, which receives an idle signal idle_filter_out from the receiving circuit RXPHY and outputs a falling edge pulse signal idle_neg. Fig. 9 As shown, idle_filter_out may correspond to the idle time in the communication receiving signal com_rx. The interval time determination circuit may delay the received idle_filter_out signal by one clock cycle to obtain the delayed idle signal idle_d1, and the combinational logic operation of idle_filter_out and idle_d1 may obtain the falling edge pulse signal idle_neg. Afterwards, by accumulating and counting the two idle_neg signals, input_delay_cnt[7:0] may be obtained, and the signal value reflects the time of receiving each bit of the (RX) communication frame.
[0068] For example, the communication data to be sent can be stored in the memory first, and the interval time determination circuit will also monitor the data storage depth in the memory. Taking the memory as a FIFO memory with a depth of 16 as an example, the fifo_cnt[4:0] signal can be read, for example, stored in the buffer area 416, and used to output the fifo_max_tmp[4:0] signal to the decoder 412. Return to reference Fig. 9 , the fifo_cnt[4:0] signal value reflects the amount of data in the FIFO. The larger the data amount, the faster RX is and the slower TX is. In this case, the TX interval time should be reduced.
[0069] like Figure 4 As shown, the decoder circuit may receive the amount of data to be sent in the memory from the memory 420, such as the FIFO depth count value fifo_cnt[4:0]. The FIFO depth count value fifo_cnt[4:0] may be stored in the buffer area fifo_max_tmp[4:0], and then read by the decoder and converted into a negative feedback adjustment value fifo_tune[7:0] based on a predetermined rule. According to some embodiments, the decoder circuit is configured to determine the negative feedback adjustment value based on the amount of data to be sent stored in the memory through a decoding table.
[0070] Continuing with the exemplary formula above, the adjustment based on the negative feedback adjustment value can further adopt the following formula:
[0071] interval time=input delay cnt[7:0]-IDLE1TIME[7:0]-56-fifo_tune[7:0]
[0072] Among them, input delay cnt[7:0] represents Figure 4 or Fig. 9 The received frame duration is shown, IDLE1TIME[7:0] is the clock cycle corresponding to the bus idle time, 56 represents the number of clock cycles corresponding to the nominal bit time and the data tail time, and fifo_tune[7:0] can be obtained by decoding fifo_max_tmp. Exemplarily, input delay cnt and fifo tune are both calculated values under the current chip clock, such as 8MHz.
[0073] Table 2 gives exemplary decoded values of negative feedback adjustment values, where the memory is still taken as a FIFO memory with a depth of 16, the left column gives the amount of data stored in the current memory (FIFO depth) fifo_max_tmp[4:0], and the right column gives the negative feedback adjustment value -fifo_tune[7:0], where the negative sign indicates that the absolute value of the represented value will be subtracted therefrom. It can be understood that the following table can be obtained based on experience, and the following numerical values are only examples, and the present disclosure is not limited thereto.
[0074] Table 2 Negative feedback regulation value decoding value
[0075]
[0076]
[0077] According to some other embodiments, the decoder circuit is configured to determine a negative feedback adjustment value based on the amount of data to be sent stored in the memory through a piecewise function, and the piecewise function is used to characterize: when the amount of data to be sent stored in the memory does not exceed a predetermined proportion of the capacity of the memory, the negative feedback adjustment value is a fixed value; and when the amount of data to be sent exceeds the predetermined proportion, the absolute value of the negative feedback adjustment value is positively correlated with the amount of data to be sent.
[0078] According to some embodiments, the fixed value is 0. In such an example, when the amount of data to be sent stored in the memory does not exceed a predetermined proportion of the capacity of the memory, no negative feedback regulation is required.
[0079] According to some embodiments, the predetermined ratio is 50%. In such an example, when the amount of data to be sent stored in the memory exceeds half of the capacity of the memory, the absolute value of the negative feedback adjustment value is further increased as the amount increases, thereby more effectively avoiding overflow of the memory and ensuring correct and effective data communication.
[0080] As a specific non-limiting embodiment, when a piecewise function is used to characterize the negative feedback adjustment value, a function of the following form (still taking the memory depth as 16 as an example) can be used to calculate the negative feedback adjustment value, where x is the number stored in the memory, and y is the adjustment value (a negative value indicates a reduction in the interval time):
[0081]
[0082] Return to reference Fig. 9 , where input_delay_cnt[7:0] and FIFO_cnt[4:0] are both large because the clock of the receiving chip is faster and the clock of the sending chip is slower. In this case, the interval_time_trans[7:0] output by the interval determination circuit is reduced from 24 to 18, and the TXPHY module will send the bits of the communication frame at a smaller interval time.
[0083] Return to reference Figure 4 , illustratively, the circuit 400 may further include an interval time register 415. The interval time register 415 may be used to temporarily store the currently calculated interval time. In such an embodiment, the transmitting circuit may be configured to read the currently stored interval time interval_time_trans[7:0] from the interval time register based on the transmission state signal tstate[4:0] for transmitting the data frame.
[0084] also, Figure 4The system also includes a register module REG for storing and transmitting data, a delayed response signal comm_conf_stk_resp_dly[1:0], a push data or control signal tx_ipush_dc, a read data signal read_data_dc[7:0], a first multiplexer MUX1, a second decoder, a second multiplexer MUX2, etc. The first multiplexer MUX1 can be used to receive a local time interval signal interval_time_local[7:0]: a local time interval signal and a transmission time interval signal interval_time_trans[7:0] and generate an interval signal interval_time[7:0], and the second multiplexer MUX2 can be used to receive a read_data_dc[7:0] signal and generate a dc_data_sbit signal. Those skilled in the art will understand that these circuit portions are shown for the purpose of circuit completeness, but it does not mean that the claimed scheme requires these circuit portions. These circuit portions may be replaced by various similar circuit elements or circuit structures that can be understood by those skilled in the art, or these circuit portions may be omitted without affecting the circuits or methods proposed according to one or more embodiments of the present disclosure.
[0085] According to one or more embodiments of the present disclosure, a method 1000 for inter-chip communication is also provided. Fig.10 , which shows exemplary steps of the inter-chip communication method 1000. It is understood that the inter-chip communication method 1000 can be implemented using the circuit 400 or various variations thereof, and the various details or variations described with respect to the circuit 400, the method 500 or the method 700 are also applicable to the method 1000, and therefore, for the purpose of brevity, they are not described in detail herein.
[0086] At step 1010, a data frame is received.
[0087] At step 1020, the received data frame is stored.
[0088] At step 1030, a received frame duration over which the data frame is received is determined.
[0089] At step 1040, a negative feedback adjustment value is obtained based on the amount of stored data to be sent.
[0090] At step 1050, an interval time is determined based on the received frame duration and the negative feedback adjustment value.
[0091] At step 1060, the data frame is transmitted by using the determined interval time as the transmission interval between the data frames.
[0092] According to one or more embodiments of the present disclosure, a chip is further provided, including the inter-chip communication circuit according to various embodiments of the present disclosure or the interval time determination circuit for inter-chip communication according to various embodiments of the present disclosure.
[0093] According to one or more embodiments of the present disclosure, the gap time between bits in the transmission frame can be dynamically adjusted to ensure that the communication can cope with frequency deviation. The adjustment algorithm of the embodiment of the present disclosure is simple, the circuit area is small, and the cost is low.
[0094] According to one or more embodiments of the present disclosure, it is possible to ensure that communication has a certain frequency deviation tolerance capability by adjusting the interval time between bits of a communication frame.
[0095] According to one or more embodiments of the present disclosure, the interval time of inter-chip communication can be adjusted or data communication with adjustable interval time can be realized through coarse adjustment positive feedback and fine adjustment negative feedback algorithms. The coarse adjustment positive feedback algorithm can determine the bit interval of the TX end by monitoring the bit interval of the communication RX end. The fine adjustment negative feedback algorithm can determine the bit interval of the TX end by monitoring the amount of data in the memory.
[0096] According to one or more embodiments of the present disclosure, asynchronous communication between chips can have a certain frequency deviation tolerance capability. Fig.11 Describes the maximum tuning capability of the tuning algorithm.
[0097] When the receiving end is very slow and the sending end is very fast, assuming that the sending mechanism is that the sending end waits for 5 bits of data to be stored in the FIFO before starting to send the first bit of data, then the risk of FIFO reading empty is very small at this time, and communication can be normal. When the receiving end is very fast and the sending end is very slow, relying on the interval time determination circuit or determination method or communication circuit or communication method according to the embodiment of the present disclosure, the interval time can be dynamically adjusted to ensure that the FIFO does not overflow. Continuing with the above about Figure 3 and Figure 6 In the hypothetical example about frequency, interval_time_trans[7:0] is at least 0, and the fastest data rate sent by the transmitter is 1 bit / (1.375us+6.5us+0.5us+0us)=per bit / 8.375us. In other words, in such an example, the tolerable frequency deviation can reach (10.875-8.375) / 8.375=18.4%.
[0098] Although the present disclosure has been illustrated and described in detail in the drawings and the foregoing description, such illustration and description should be considered illustrative and schematic, not restrictive; the present disclosure is not limited to the disclosed embodiments. By studying the drawings, the disclosure and the appended claims, those skilled in the art will be able to understand and implement variations to the disclosed embodiments when practicing the claimed subject matter. In the claims, the word "comprising" does not exclude other elements or steps that are not listed, the indefinite article "a" or "an" does not exclude a plurality, the term "plurality" means two or more, and the term "based on" should be interpreted as "based at least in part on". The mere fact that certain measures are recorded in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Claims
1. An inter-chip communication circuit, comprising: A receiving circuit, used for receiving a data frame; A memory, used for storing received data frames; a counter circuit for determining a received frame duration elapsed during which a data frame is received; a decoder circuit for obtaining a negative feedback adjustment value based on the amount of data to be sent stored in the memory; an adder circuit for determining an interval time based on the received frame duration and the negative feedback adjustment value; as well as The transmitting circuit is used to transmit the data frame by using the determined interval time as the transmission interval between the data frames.
2. The inter-chip communication circuit according to claim 1, wherein: The adder circuit also determines the interval time based on an inherent time adjustment value, which is based on a frame structure of the data frame.
3. The inter-chip communication circuit according to claim 2, wherein the inherent time adjustment value represents a standard data frame time defined in a frame format, and wherein, The adder circuit is used to subtract the inherent time adjustment value from the received frame duration.
4. The inter-chip communication circuit according to claim 3, wherein: The standard data frame time includes a header time, a valid data time, and a tail time.
5. The inter-chip communication circuit according to any one of claims 1 to 4, wherein: The decoder circuit is configured to determine a negative feedback adjustment value based on the amount of data to be transmitted stored in the memory through a decoding table.
6. The inter-chip communication circuit according to any one of claims 1 to 4, wherein: The decoder circuit is configured to determine a negative feedback adjustment value based on the amount of data to be sent stored in the memory by a piecewise function, wherein the piecewise function is used to characterize: When the amount of data to be sent stored in the memory does not exceed a predetermined proportion of the capacity of the memory, the negative feedback adjustment value is a fixed value; and When the amount of data to be sent exceeds the predetermined ratio, the absolute value of the negative feedback adjustment value is positively correlated with the amount of data to be sent.
7. The inter-chip communication circuit according to claim 6, wherein: The fixed value is 0.
8. The inter-chip communication circuit according to claim 6, wherein: The predetermined ratio is 50%.
9. The inter-chip communication circuit according to any one of claims 1 to 4, wherein: The memory is a first-in-first-out FIFO memory.
10. The inter-chip communication circuit according to any one of claims 1 to 4, wherein: The counter circuit is configured to convert the duration of receiving a single data frame into clock counts based on the clock of the current receiving chip as the receiving frame duration.
11. The inter-chip communication circuit according to any one of claims 1 to 4, further comprising: an edge detector, the edge detector being configured to: Obtaining a delayed idle signal by delaying a received idle signal indicating an idle time in the receiving circuit; and obtaining an idle edge pulse signal based on the idle signal and the delayed idle signal, and The counter circuit is configured to obtain the receiving frame duration by accumulating and counting two adjacent idle edge pulse signals.
12. The inter-chip communication circuit according to any one of claims 1 to 4, further comprising: The interval time register is used to temporarily store the currently calculated interval time; and Wherein, the sending circuit is configured to read the currently stored interval time from the interval time register based on the sending state signal for use in sending the data frame.
13. A circuit for determining an interval time for inter-chip communication, comprising: A counter circuit, used for obtaining a receiving frame duration elapsed by receiving a data frame; A decoder circuit for obtaining a negative feedback adjustment value based on the amount of data to be sent stored in the memory; as well as An adder circuit is used to determine an interval time based on the received frame duration and the negative feedback adjustment value, wherein the interval time is used as a transmission interval between data frames.
14. A chip, comprising the inter-chip communication circuit according to any one of claims 1 to 12 or the interval time determination circuit for inter-chip communication according to claim 13.
15. A chip-to-chip communication method, comprising: Receive data frame; storing the received data frames; determining a received frame duration elapsed for receiving a data frame; Obtaining a negative feedback adjustment value based on the amount of stored data to be sent; Determining an interval time based on the received frame duration and the negative feedback adjustment value; as well as The data frames are transmitted by using the determined interval time as the transmission interval between the data frames.
16. A method for determining an interval time for inter-chip communication, comprising: Obtain the receiving frame duration elapsed during which the data frame is received; Obtaining a negative feedback adjustment value based on the amount of data to be sent stored in the memory; as well as An interval time is determined based on the reception frame duration and the negative feedback adjustment value, and the interval time is used as a transmission interval between data frames.
Citation Information
Patent Citations
Method and device for eliminating the error accumulation caused by the clock deviation in the network device
CN101018153A
Self-correcting algorithm applied to USB slave device clock system
CN110233620A
Data conversion method, system and device
CN114880389A
Retimer structure and clock skew compensation method thereof
CN118277317A
Data transfer device
JP1995321849A
Cited By
Audio playing method and system, sending equipment and storage medium
CN121334561A
Inter-chip communication circuit and method, communication interval time determination circuit and method, and chip
WO2026021256A1
