Data delay method, apparatus and circuit, and electronic device and readable storage medium
By performing storage and reading operations on one register in only one clock cycle in the data delay circuit, the problem of high power consumption of the data delay circuit in the existing technology is solved, and efficient data delay is achieved, especially in bit The power consumption is significantly reduced in the case of large width or large number of levels.
Patent Information
- Application Number
- PCT/CN2024/081792
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-21
- Filing Date
- 2024-03-15
- Publication Date
- 2024-09-26
AI Technical Summary
Existing data delay circuits consume large amounts of power when the data bit width is large or there are many register levels, and there is a problem of high power consumption due to data delay.
A data delay method is adopted to achieve data delay by storing data into the target register in the Mth clock cycle, and when M is greater than N, obtaining the second data output by the target register in the Mth clock cycle. In N clock cycles, storage and reading operations are performed in only one register, reducing power consumption of data delay.
It effectively reduces the power consumption of the data delay circuit. Especially in scenarios with large data bit width or many register levels, the power consumption can be reduced by up to 81.86%, significantly improving energy efficiency.
Smart Images

Figure CN2024081792_26092024_PF_FP
Abstract
Description
Data delay method, device, circuit, electronic device and readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202310273886.6 filed in China on March 21, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of digital circuits, and specifically relates to a data delay method, device, circuit, electronic device and readable storage medium. Background Art
[0004] In the field of digital circuits, there is a common data delay circuit that uses multi-stage registers to register valid input data step by step for each clock pulse, so that the data output of the last-stage register is delayed by multiple clock cycles compared to the input data.
[0005] For example, in a clock cycle where the input data is valid, the input data is stored in data register 0, and the output data Q of register 0 is stored in data register 1, and so on. If the input data is invalid, the registers at each level maintain the value of the previous clock cycle. After multiple clock cycles, the output value Q of data register N-1 is the final output data of the entire data delay circuit. Since data is updated at each level of registers during a clock cycle where the data is valid, if the data bit width is large or there are many register levels, the power consumption of the data delay circuit will be high. Therefore, in the related art, there is a problem of high power consumption of data delay.
[0006] Summary of the Invention
[0007] The purpose of the embodiments of the present application is to provide a data delay method, device, circuit, electronic device and readable storage medium, which can solve the problem of high power consumption of data delay.
[0008] In a first aspect, an embodiment of the present application provides a data delay method, which is applied to an electronic device, wherein the electronic device includes a data delay circuit, and the data delay circuit includes N independent first registers. The method includes:
[0009] storing the first data in a target register in an Mth clock cycle, where the target register is the Lth first register among the N first registers;
[0010] When M is greater than N, the second data output by the target register is obtained in the Mth clock cycle, and the second data is the data stored in the target register in the MNth clock cycle.
[0011] In a second aspect, an embodiment of the present application provides a data delay device, applied to an electronic device, wherein the electronic device includes a data delay circuit, the data delay circuit includes N independent first registers, and the data delay device includes:
[0012] A storage control module, configured to store the first data to a target register in an Mth clock cycle, where the target register is the Lth first register among the N first registers;
[0013] An acquisition module is used to acquire second data output by the target register in the Mth clock cycle when M is greater than N, where the second data is data stored in the target register in the MNth clock cycle.
[0014] In a third aspect, an embodiment of the present application provides a data delay circuit, comprising: a first counter, a second counter, a delay sub-circuit, N first registers, a first selection element, and a second selection element, where N is an integer greater than 1, wherein:
[0015] The input end of the first counter is electrically connected to the input end of the second counter through the delay sub-circuit, the output end of the first counter is electrically connected to the control end of the first selection element, and the output end of the second counter is electrically connected to the control end of the second selection element;
[0016] The N output terminals of the first selection element are electrically connected to the data input terminals of the N first registers in a one-to-one correspondence, and the first selection element is used to control the data input terminal of the first selection element to be connected to the first register associated with the value of the first counter via the data output terminal of the first selection element;
[0017] The N input terminals of the second selection element are electrically connected to the data input terminals of the N first registers in a one-to-one correspondence, and the second selection element is used to control the data output terminal of the second selection element to be connected to the first register associated with the value of the first counter through the data input terminal of the second selection element.
[0018] In a fourth aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0019] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0020] In a sixth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0021] In a seventh aspect, an embodiment of the present application provides a chip, which includes the data delay circuit as described in the third aspect.
[0022] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a computer program / instruction, and when the computer program / instruction is executed by at least one processor, it implements the steps of the data delay method described in the first aspect.
[0023] In the embodiment of the present application, first data is stored in a target register during the Mth clock cycle, where the target register is the Lth first register among the N independent first registers; and when M is greater than N, second data output by the target register is obtained during the Mth clock cycle, where the second data is the data stored in the target register during the MNth clock cycle. Thus, because data storage and / or read operations are only performed on one first register during a clock cycle, compared to the related art that requires data storage and read operations to be performed on each level of registers, the embodiment of the present application can reduce power consumption during data delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0025] FIG1 is a flow chart of a data delay method provided in an embodiment of the present application;
[0026] FIG2 is a structural diagram of a data delay circuit provided in an embodiment of the present application;
[0027] FIG3 is a flow chart of another data delay method provided in an embodiment of the present application;
[0028] FIG4 is a structural diagram of another data delay circuit provided in an embodiment of the present application;
[0029] FIG5 is a structural diagram of a data delay device provided in an embodiment of the present application;
[0030] FIG6 is a structural diagram of another data delay device provided in an embodiment of the present application;
[0031] FIG7 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0032] FIG8 is a structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0034] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects and are not used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of this application can be implemented in an order other than those illustrated or described herein. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0035] The data delay method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0036] Referring to FIG. 1 , FIG. 1 is a flow chart of a data delay method provided in an embodiment of the present application. The data delay method is applied to an electronic device. The electronic device includes a data delay circuit (as shown in FIG. 2 ). The data delay circuit includes N independent first registers. As shown in FIG. 1 , the data delay method includes the following steps:
[0037] Step 101: storing first data into a target register in the Mth clock cycle, where the target register is the Lth first register among the N first registers;
[0038] In an embodiment of the present application, the above-mentioned N independent first registers can be understood as there being no electrical connection between the data ports of the N first registers, and the data output by one first register will not affect the data currently stored in other first registers, that is, the data output by one first register will not be written into other first registers as input data.
[0039] Optionally, in some embodiments, data can be stored in N first registers in a cyclic manner. Of course, in some embodiments, the validity of the clock cycle can be further considered. For invalid clock cycles, data will not be stored. In this case, one or more first registers can be spaced to achieve jumpy storage. Among them, a valid clock cycle can indicate that the data corresponding to the clock cycle is valid, and an invalid clock cycle can indicate that the data of the clock cycle is invalid. Among them, the valid clock cycle can include a valid clock cycle for storage operation and a valid clock cycle for read operation. The storage operation can be performed during the valid clock cycle for storage operation, and the read operation can be performed during the valid clock cycle for read operation.
[0040] Optionally, in some embodiments, the value of L may correspond to the value obtained by taking the modulo value of M over N. In some embodiments, when M is an integer multiple of N, the value of L is the same as the value of N; when M is a non-integer multiple of N, the value of L is the same as the value obtained by taking the modulo value of M over N. For example, the modulo values of 1, 2, ..., N-1, and 0 are obtained, and the corresponding registers are the first, second, ..., N-1th, and Nth, respectively. In other words, the data corresponding to the first clock cycle is stored in the first first register (i.e., register 0), and the data corresponding to the second clock cycle is stored in the second first register (i.e., register 1). After N clock cycles, storage continues from the first first register. That is, the data corresponding to the N+1th clock cycle is stored in the first first register (i.e., register 0), and the data corresponding to the N+2th clock cycle is stored in the second first register (i.e., register 1). In this way, only one first register needs to be stored in each clock cycle, thereby reducing power consumption.
[0041] Step 102: When M is greater than N, obtain second data output by the target register in the Mth clock cycle, where the second data is data stored in the target register in the MNth clock cycle.
[0042] It should be understood that the data stored in the Mth clock cycle will only take effect in the M+1th clock cycle, that is, the data stored in the Mth clock cycle cannot be read out in the Mth clock cycle, and what is read out in the Mth clock cycle is the data stored in the MNth clock cycle, that is, the data last stored in the target register.
[0043] In the embodiment of the present application, since the data stored in the target register in the MNth clock cycle output by the target register is obtained in the Mth clock cycle, the data is delayed by N clock cycles by the data delay circuit. For example, when M is equal to N+1, the data stored in the first clock cycle can be read from the first first register, and when M is equal to N+2, the data stored in the second clock cycle can be read from the second first register.
[0044] It should be noted that when M is greater than N, the data stored in the MNth cycle can be obtained from the corresponding first register in each clock cycle or each valid clock cycle.
[0045] In the embodiment of the present application, first data is stored in a target register during the Mth clock cycle, where the target register is the Lth first register among the N independent first registers; and when M is greater than N, second data output by the target register is obtained during the Mth clock cycle, where the second data is the data stored in the target register during the MNth clock cycle. Thus, because data storage and / or read operations are only performed on one first register during a clock cycle, compared to the related art that requires data storage and read operations to be performed on each level of registers, the embodiment of the present application can reduce power consumption during data delay.
[0046] Optionally, as shown in FIG2 and FIG3, in some embodiments, the data delay circuit further includes a delay subcircuit formed by sequentially cascading N second registers.
[0047] Storing the first data into the target register in the Mth clock cycle includes:
[0048] When the first signal is a valid signal, storing the first data in the target register in the Mth clock cycle;
[0049] The method further comprises:
[0050] Step 103: input the first signal into the delay sub-circuit;
[0051] Step 104, obtaining a second signal obtained by delaying the first signal by N clock cycles through the delay sub-circuit;
[0052] Step 105: Acquire the first data output by the target register in the M+Nth clock cycle according to the second signal.
[0053] In the embodiment of the present application, each second register is used to delay the first signal by one clock cycle. By sequentially cascading N second registers, the first signal can be delayed by N clock cycles. It should be understood that the first signal and the second signal are of the same type. That is, if the first signal corresponding to the Mth clock cycle is a valid signal, the second signal corresponding to the M+Nth clock cycle is a valid signal; if the first signal corresponding to the Mth clock cycle is an invalid signal, the second signal corresponding to the M+Nth clock cycle is an invalid signal.
[0054] Optionally, in the Mth clock cycle, when the first signal is a valid signal, the first data corresponding to the Mth clock cycle can be stored in the target register. Similarly, in the M+Nth clock cycle, when the corresponding second signal is a valid signal, the first data output by the target register can be obtained in the M+Nth clock cycle.
[0055] It should be understood that the above-mentioned first signal and second signal can be understood as validity signals, which are used to indicate the validity of the data in the corresponding clock cycle, or to indicate the validity of the corresponding clock cycle. For example, the first signal corresponding to the Mth clock cycle is a valid signal, which can be understood as the Mth clock cycle being a valid clock cycle for storage operation; the second signal corresponding to the M+Nth clock cycle is a valid signal, which can be understood as the M+Nth clock cycle being a valid clock cycle for read operation. In the embodiment of the present application, since the validity of the signal is increased, data can be stored and read only for the clock cycle corresponding to the validity signal, thereby further reducing the power consumption of the electronic device.
[0056] Optionally, in some embodiments, the data delay circuit further includes a first counter and a second counter, the value of the first counter cycles between 1 and N, and the value of the second counter cycles between 1 and N;
[0057] In the Mth clock cycle, the value of the first counter is L; when M is greater than N, the value of the second counter is L in the Mth clock cycle.
[0058] In an embodiment of the present application, the first counter and the second counter are used to count the number of clock cycles. Specifically, they can be used to record the total number of clock cycles or the number of valid clock cycles. The value of the first counter is used to determine the location of the first register for storing data, and the value of the second counter is used to determine the location of the first register for reading data.
[0059] For example, each time a clock cycle or a valid clock cycle passes, the first counter and the second counter perform an increment operation. Since the first counter and the second counter are used to record the number of clock cycles or valid clock cycles, and the location of the first register for storing data is determined based on the value of the first counter, and the location of the first register for reading data is determined based on the value of the second counter, the first register for storing and / or reading operations can be quickly located, thereby reducing the latency of the data storage and / or reading operations.
[0060] Optionally, in some embodiments, the first counter performs a first counting operation when receiving a first signal and the first signal is a valid signal;
[0061] The second counter performs a second counting operation when receiving a second signal and the second signal is a valid signal.
[0062] In the embodiment of the present application, when the first counter receives the first signal and the first signal is a valid signal, the current clock cycle may be considered a valid clock cycle, thereby controlling the first counter to increment by 1. It should be understood that if the current value of the first counter is N, the value of the first counter after the first counter performs the first counting operation is 1.
[0063] Similarly, when the second counter receives the second signal and the second signal is a valid signal, the current clock cycle can be considered as a valid clock cycle, thereby controlling the second counter to increase by 1. It should be understood that if the current value of the second counter is N, the value of the second counter after the second counter performs the second counting operation is 1.
[0064] 2 , an embodiment of the present application further provides a data delay circuit. As shown in FIG2 , the data delay circuit provided in the embodiment of the present application includes: a first counter 11, a second counter 12, a delay sub-circuit 13, N first registers 14, a first selection element 15, and a second selection element 16, where N is an integer greater than 1, wherein:
[0065] The input end of the first counter 11 is electrically connected to the input end of the second counter 12 through the delay sub-circuit 13, the output end of the first counter 11 is electrically connected to the control end of the first selection element 15, and the output end of the second counter 12 is electrically connected to the control end of the second selection element;
[0066] The N output terminals of the first selection element 15 are electrically connected to the data input terminals of the N first registers 14 in a one-to-one correspondence, and the first selection element is used to control the data input terminal of the first selection element 15 to be connected to the first register 14 associated with the value of the first counter via the data output terminal of the first selection element 15;
[0067] The N input terminals of the second selection element are electrically connected to the data input terminals of the N first registers 14 in a one-to-one correspondence, and the second selection element 16 is used to control the data output terminal of the second selection element 16 to be connected to the first register 14 associated with the value of the first counter through the data input terminal of the second selection element 16.
[0068] In the embodiment of the present application, the increment of each count of the first counter 11 and the second counter 12 may be 1, and the range of the cyclic count may be 1 to N, or 0 to N-1.
[0069] Optionally, the first counter 11 and the second counter 12 are used to count the number of clock cycles. Specifically, they can be used to record the total number of clock cycles or the number of valid clock cycles. The value of the first counter 11 is used to determine the location of the first register 14 for storing data, and the value of the second counter 12 is used to determine the location of the first register 14 for reading data.
[0070] For example, each time a clock cycle or a valid clock cycle passes, the first counter 11 and the second counter 12 perform an increment operation. Since the first counter 11 and the second counter 12 are used to record the number of clock cycles or valid clock cycles, and the location of the first register 14 for storing data is determined based on the value of the first counter 11, and the location of the first register 14 for reading data is determined based on the value of the second counter 12, the first register 14 to be affected by the storage operation and / or the reading operation can be quickly located, thereby reducing the latency of the data storage operation and / or the reading operation.
[0071] Optionally, in some embodiments, the first counter 11 may be incremented by 1 in each clock cycle, starting from 1 and counting to N before continuing to the next round of counting. The second counter 12 operates on the same counting principle as the first counter 11 .
[0072] Optionally, in some embodiments, the counter may be incremented by 1 for each valid clock cycle. For example, if the first counter 11 receives the first signal in the Mth clock cycle, and the first signal is a valid signal, the first counter 11 increments by 1, counts to N, and then continues the next round of counting. The second counter 12 operates on the same principle as the first counter 11, except that the technical object of the second counter 12 is the second signal. That is, if the second counter 12 receives the second signal in the Mth clock cycle, and the second signal is a valid signal, the second counter 12 increments by 1.
[0073] Optionally, the specific structures of the first selection element 15 and the second selection element 16 can be set according to actual needs. For example, in some embodiments, a multiplexer can be used. That is, the first selection element 15 and / or the second selection element 16 can be an N-to-1 selector.
[0074] Alternatively, in some embodiments, it may be assumed that the data output port of the first selection element 15 includes port 0 to port N-1. When the first count value is 1, port 0 of the first selection element 15 is connected to the data input port of the first selection element 15, thereby storing data input from the data input port into register 0 via port 0. Similarly, it may be assumed that the data output port of the second selection element 16 includes data output port 0 to data output port N-1. When the second count value is 1, the data input port of the second selection element 16 is connected to data output port 0 of the first selection element 15, thereby obtaining data output from register 0.
[0075] It should be understood that the first counter 11 and the second counter 12 may have multiple output terminals. For example, when N is 16, the first counter 11 and the second counter 12 may each have four output terminals, thereby outputting a 4-bit count value.
[0076] Optionally, the structure of the delay subcircuit 13 can be configured according to actual needs. For example, as shown in FIG4 , in some embodiments, the delay subcircuit 13 can be formed by cascading N second registers. For example, a first signal can be input to the input of a first-stage second register. During the propagation of the first signal through the N second registers, the output of the previous-stage second register can be used as the input of the next-stage second register in each clock cycle. The data output from the output of the last-stage second register is the second signal, i.e., the signal after the first signal has been delayed by N clock cycles through the N second registers.
[0077] In the embodiment of the present application, the data delay method described above is implemented by using a data delay circuit formed by a first counter 11, a second counter 12, a delay sub-circuit 13, N first registers 14, a first selection element 15, and a second selection element 16. Thus, because data storage and / or reading operations are performed on only one first register within a clock cycle, compared to the related art that requires data storage and reading operations to be performed on each stage of registers, the embodiment of the present application can reduce power consumption during data delay.
[0078] It should be noted that the first and second counters described above can also be implemented using other control chips with data processing capabilities. Other logic gate circuit structures can also be used, without further limitation here. Furthermore, the selection element can be implemented using a multi-pole single-throw switch in conjunction with a control chip, without further limitation here.
[0079] Alternatively, taking a data bit width of 120 bits and a delay of 16 levels (i.e., N and M equal 16, and the delay is 16 clock cycles) as an example, a power consumption evaluation tool was used to test and compare the power consumption of a traditional data delay circuit with that of the data delay circuit of the present application. The following data were obtained: the power consumption of the traditional data delay circuit was 0.2806 milliwatts; the power consumption of the data delay circuit of the present application was 0.0509 milliwatts, a reduction of 81.86%. Therefore, the data delay circuit provided by the present application has greater benefits in scenarios with larger bit widths and more delay levels.
[0080] It should be noted that the data delay method provided in the embodiments of the present application can be executed by a data delay device, or a control module in the data delay device for executing the loading data delay method. In the embodiments of the present application, the data delay device provided in the embodiments of the present application is described by taking the data delay device executing the loading data delay method as an example.
[0081] 5 , an embodiment of the present application further provides a data delay device, as shown in FIG5 , which is applied to an electronic device. The electronic device includes a data delay circuit, and the data delay circuit includes N independent first registers. The data delay device 500 includes:
[0082] A storage control module 501 is configured to store the first data into a target register in an M-th clock cycle, where the target register is the L-th first register among the N first registers;
[0083] The acquisition module 502 is configured to acquire, when M is greater than N, second data output by the target register in the Mth clock cycle, where the second data is data stored in the target register in the MNth clock cycle.
[0084] Optionally, the second data is delayed by N clock cycles relative to the first data.
[0085] Optionally, the data delay circuit further includes a delay subcircuit formed by sequentially cascading N second registers, and the storage control module is specifically configured to store the first data into the target register in the Mth clock cycle when the first signal is a valid signal;
[0086] Optionally, as shown in FIG6 , the data delay device 500 further includes:
[0087] An input module 503, configured to input the first signal into the delay sub-circuit;
[0088] The acquisition module 502 is further configured to acquire a second signal obtained after the first signal is delayed by N clock cycles by the delay sub-circuit; and acquire the first data output by the target register in the M+Nth clock cycle according to the second signal.
[0089] Optionally, the data delay circuit further includes a first counter and a second counter, the value of the first counter cycles between 1 and N, and the value of the second counter cycles between 1 and N;
[0090] In the Mth clock cycle, the value of the first counter is L; when M is greater than N, the value of the second counter is L in the Mth clock cycle.
[0091] Optionally, the first counter performs a first counting operation when receiving a first signal and the first signal is a valid signal;
[0092] The second counter performs a second counting operation when receiving a second signal and the second signal is a valid signal.
[0093] Optionally, when M is an integer multiple of N, the value of L is the same as the value of N; when M is a non-integer multiple of N, the value of L is the same as the value obtained by taking M modulo N.
[0094] The data delay device in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.
[0095] The data delay device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0096] The data delay device provided in the embodiment of the present application can implement each process implemented by the data delay device in the method embodiments of Figures 1 and 3. To avoid repetition, they are not described here.
[0097] Optionally, referring to Figure 7, an embodiment of the present application also provides an electronic device 700, including a processor 702, a memory 701, and a program or instruction stored in the memory 701 and executable on the processor 702. When the program or instruction is executed by the processor 702, each process of the above-mentioned data delay method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0098] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0099] FIG8 is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present application.
[0100] The electronic device 800 includes but is not limited to components such as a radio frequency unit 801 , a network module 802 , an audio output unit 803 , an input unit 804 , a sensor 805 , a display unit 806 , a user input unit 807 , an interface unit 808 , a memory 809 , and a processor 810 .
[0101] Those skilled in the art will appreciate that the electronic device 800 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 810 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG8 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.
[0102] In which, the electronic device includes a data delay circuit, the data delay circuit includes N independent first registers, and the processor 810 is used to store the first data to the target register in the Mth clock cycle, and the target register is the Lth first register among the N first registers; when M is greater than N, the second data output by the target register is obtained in the Mth clock cycle, and the second data is the data stored in the target register in the MNth clock cycle.
[0103] Optionally, the data delay circuit also includes a delay subcircuit formed by cascading N second registers in sequence, and the processor 810 is further used to: input the first signal into the delay subcircuit; obtain a second signal obtained after the first signal is delayed by N clock cycles through the delay subcircuit; and obtain the first data output by the target register in the M+Nth clock cycle based on the second signal.
[0104] Optionally, the data delay circuit further includes a first counter and a second counter, the value of the first counter cycles between 1 and N, and the value of the second counter cycles between 1 and N;
[0105] In the Mth clock cycle, the value of the first counter is L; when M is greater than N, the value of the second counter is L in the Mth clock cycle.
[0106] Optionally, the first counter performs a first counting operation when receiving a first signal and the first signal is a valid signal;
[0107] The second counter performs a second counting operation when receiving a second signal and the second signal is a valid signal.
[0108] Optionally, when M is an integer multiple of N, the value of L is the same as the value of N; when M is a non-integer multiple of N, the value of L is the same as the value obtained by taking M modulo N.
[0109] It should be noted that in the embodiment of the present application, the processor can be any module with processing functions, such as CPU, GPU, NPU, DSP, ISP and other processing chips.
[0110] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data delay method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0111] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.
[0112] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data delay method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0113] An embodiment of the present application further provides a chip, which includes the above-mentioned data delay circuit.
[0114] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0115] An embodiment of the present application further provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by at least one processor, it implements the various processes of the above-mentioned data delay method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0116] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0118] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A data delay method, applied to an electronic device, wherein the electronic device comprises a data delay circuit, the data delay circuit comprises N independent first registers, and the method comprises: storing the first data in a target register in an Mth clock cycle, wherein the target register is the Lth first register among the N first registers; When M is greater than N, the second data output by the target register is obtained in the Mth clock cycle, and the second data is the data stored in the target register in the MNth clock cycle.
2. The method according to claim 1, wherein: The data delay circuit also includes a delay subcircuit formed by sequentially cascading N second registers. The storing of the first data into the target register in the Mth clock cycle comprises: When the first signal is a valid signal, storing the first data in the target register in the Mth clock cycle; The method further comprises: inputting the first signal into the delay subcircuit; Acquire a second signal obtained after the first signal is delayed by N clock cycles through the delay subcircuit; According to the second signal, the first data output by the target register is obtained in the M+Nth clock cycle.
3. The method according to claim 1, wherein: The data delay circuit further includes a first counter and a second counter, the value of the first counter cycles between 1 and N, and the value of the second counter cycles between 1 and N; In which, in the Mth clock cycle, the value of the first counter is L; when M is greater than N, the value of the second counter is L in the Mth clock cycle.
4. The method according to claim 3, wherein: The first counter performs a first counting operation when receiving a first signal and the first signal is a valid signal; The second counter performs a second counting operation when receiving a second signal and the second signal is a valid signal.
5. The method according to claim 1, wherein: When M is an integer multiple of N, the value of L is the same as the value of N; when M is a non-integer multiple of N, the value of L is the same as the value obtained by taking M modulo N.
6. A data delay device, applied to an electronic device, the electronic device comprising a data delay circuit, the data delay circuit comprising N independent first registers, the data delay device comprising: A storage control module, configured to store the first data to a target register in an Mth clock cycle, wherein the target register is an Lth first register among the N first registers; The acquisition module is used to acquire the second data output by the target register in the Mth clock cycle when M is greater than N, and the second data is the data stored in the target register in the MNth clock cycle.
7. The device according to claim 6, wherein: The data delay circuit also includes a delay subcircuit formed by sequentially cascading N second registers, and the storage control module is specifically used to store the first data into the target register in the Mth clock cycle when the first signal is a valid signal; The data delay device also includes: An input module, used for inputting the first signal into the delay sub-circuit; The acquisition module is also used to acquire a second signal obtained after the first signal is delayed by N clock cycles through the delay subcircuit; and acquire the first data output by the target register in the M+Nth clock cycle according to the second signal.
8. The device according to claim 6, wherein: The data delay circuit further includes a first counter and a second counter, the value of the first counter cycles between 1 and N, and the value of the second counter cycles between 1 and N; In which, in the Mth clock cycle, the value of the first counter is L; when M is greater than N, the value of the second counter is L in the Mth clock cycle.
9. The device according to claim 8, wherein: The first counter performs a first counting operation when receiving a first signal and the first signal is a valid signal; The second counter performs a second counting operation when receiving a second signal and the second signal is a valid signal.
10. The method according to claim 6, wherein: When M is an integer multiple of N, the value of L is the same as the value of N; when M is a non-integer multiple of N, the value of L is the same as the value obtained by taking M modulo N.
11. A data delay circuit, comprising: A first counter, a second counter, a delay subcircuit, N first registers, a first selection element, and a second selection element, where N is an integer greater than 1, wherein: The input end of the first counter is electrically connected to the input end of the second counter through the delay subcircuit, the output end of the first counter is electrically connected to the control end of the first selection element, and the output end of the second counter is electrically connected to the control end of the second selection element; The N output terminals of the first selection element are electrically connected to the data input terminals of the N first registers in a one-to-one correspondence, and the first selection element is used to control the data input terminal of the first selection element to be connected to the first register associated with the value of the first counter through the data output terminal of the first selection element; The N input terminals of the second selection element are electrically connected to the data input terminals of the N first registers in a one-to-one correspondence, and the second selection element is used to control the data output terminal of the second selection element to be connected to the first register associated with the value of the first counter through the data input terminal of the second selection element.
12. The data delay circuit according to claim 11, wherein: The first selection element and / or the second selection element is an N-to-1 selector.
13. An electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data delay method as claimed in any one of claims 1 to 5.
14. A readable storage medium having a program or instruction stored thereon, wherein the program or instruction, when executed by a processor, implements the steps of the data delay method according to any one of claims 1 to 5.
15. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction, and the program or instruction, when executed by the processor, implements the steps of the data delay method described in any one of claims 1 to 5.
16. A chip, comprising the data delay circuit according to any one of claims 11 to 12.
17. A computer program product, comprising a computer program / instruction, wherein the computer program / instruction is executed by at least one processor to implement the steps of the data delay method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Signal processing device based on low-power consumption digital circuit
CN106920573A
Data transmission method and device and computer readable storage medium
CN114006787A
Data delay method, device and circuit, electronic equipment and readable storage medium
CN116248088A
Squence control circuit
US20010027516A1
Data processor capable of accessing the content of internal counters at a high speed
US4931983A
