Time sequence measuring circuit of static random access memory
By using the clock pulse generation circuit in the timing measurement circuit of static random memory to generate a self-trigger clock signal, calculating the delay from its clock port to the output terminal, the SRAM frequency measurement problem is solved, the chip operation frequency is calculated, and the chip operation speed bottleneck is alleviated. .
Patent Information
- Application Number
- CN202310583832.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2024-12-03
AI Technical Summary
How to measure the maximum frequency from a static random memory (SRAM) clock port to the output has become one of the bottlenecks in the computing speed of digital chips.
Provide a timing measurement circuit for static random memory. The clock pulse generation circuit generates a self-trigger clock signal in the self-ocular mode, and calculates the delay from the clock port to the output terminal based on the flip frequency of the output signal of the circuit to be measured, solving the timing Measurement problems.
The delay of the static random memory clock port to the output terminal is measured, and the chip operation frequency is calculated, which effectively solves the chip operation bottleneck caused by SRAM.
Smart Images

Figure CN119068963A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip technology, and in particular to a timing measurement circuit and method for a static random access memory. Background Art
[0002] High-performance digital chips usually use static random-access memory (SRAM). Since SRAM occupies a large proportion of the chip, the maximum frequency of SRAM is called one of the bottlenecks restricting the chip's computing speed. How to measure the maximum frequency from the clock port to the output end of the SRAM has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides a timing measurement circuit of a static random access memory, the measurement circuit comprising:
[0004] A circuit to be tested, the circuit to be tested comprising a static random access memory; and
[0005] a clock pulse generating circuit, wherein when the measuring circuit is in a self-oscillation mode, the clock pulse generating circuit is used to generate a self-triggering clock signal according to an output signal received from the circuit to be measured, and transmit the self-triggering clock signal to a clock port of the static random access memory, so that the static random access memory works under the drive of the self-triggering clock signal;
[0006] The output signal of the circuit under test is used to calculate the time delay from the clock port to the output end of the static random access memory.
[0007] The measurement circuit of the present application, when the measurement circuit is in the self-oscillation mode, can generate a self-triggering clock signal through a clock pulse generating circuit, and calculate the time delay from the clock port to the output end of the static random access memory by measuring the flip frequency of the output signal of the circuit to be measured, thereby solving the timing measurement problem of the static random access memory, and further facilitating solving the chip operation bottleneck caused by the static random access memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a structural block diagram of a timing measurement circuit in one embodiment;
[0009] Figure 2 is a schematic structural diagram of a timing measurement circuit in another embodiment;
[0010] Figure 3 is a structural schematic diagram of a timing measurement circuit in yet another embodiment;
[0011] Figure 4This is a signal timing diagram of the timing measurement circuit in the initialization mode and the self-oscillation mode in an embodiment of the present application;
[0012] Figure 5 This is a waveform diagram of the self-triggering clock signal generation and change when the timing measurement circuit is in the self-oscillation mode in the embodiment of the present application. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0014] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0015] It should be understood that the term "and / or" used in this article is only a description of the same field of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0016] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present application, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present application, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0017] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0018] High-performance digital chips usually use static random-access memory (SRAM). Since SRAM occupies a large proportion of the chip, the maximum frequency of SRAM is called one of the bottlenecks restricting the chip's computing speed. How to measure the maximum frequency from the clock port to the output end of the SRAM has become a technical problem that needs to be solved urgently.
[0019] Based on the above-mentioned technical problems, the present application provides a timing measurement circuit for a static random access memory. The measurement circuit can calculate the time delay from the clock port to the output end of the static random access memory in the circuit to be tested by measuring the flip frequency of the output signal of the circuit to be tested (the circuit to be tested includes the static random access memory), thereby inferring the frequency at which the chip can operate.
[0020] Among them, the chip includes but is not limited to a central processing chip CPU (CPU, Central Processing Unit), a graphics processing chip GPU (GPU, Graphics Processing Unit), a digital signal processing chip DSP (DSP, Digital Signal Processing) or a neural network processing chip NPU (Neural network Processing Unit) and the like.
[0021] like Figure 1 and Figure 3 As shown, the present application provides a timing measurement circuit for a static random access memory, such as Figure 1 As shown, the measuring circuit 100 is used to determine the timing of the static random access memory according to the flip frequency of the output signal of the circuit under test. The measuring circuit may include the circuit under test 110 and the clock pulse generating circuit 120. Figure 3 As shown, the circuit under test 310 includes a static random access memory 311 , the output end of the circuit under test 310 is connected to the input end of the clock pulse generating circuit 320 , and the output end of the clock pulse generating circuit 320 can be connected to the clock port of the static random access memory 311 .
[0022] In the disclosed embodiment, the circuit under test 110 can work under the drive of an external clock, or can work under the drive of a self-triggering clock signal output by the clock pulse generating circuit 120. That is, the measuring circuit 100 of the present application can include two working modes: 1) initialization mode, the circuit under test can work under the drive of an external clock; 2) self-oscillation mode, the circuit under test works under the drive of a self-triggering clock signal output by the clock pulse generating circuit.
[0023] When the measurement circuit 100 is in the self-oscillation mode, the clock pulse generating circuit 120 is used to generate a self-triggering clock signal according to the output signal received from the circuit to be tested 110, and transmit the self-triggering clock signal to the clock port of the static random access memory, so that the static random access memory works under the drive of the self-triggering clock signal. For example, the static random access memory can perform a read operation under the drive of the self-triggering clock signal. Each time the static random access memory performs a read operation, the output signal of the static random access memory is flipped once, and then the output signal causes the self-triggering clock signal to flip, thus forming a self-oscillating clock circuit. At this time, the output signal of the circuit to be tested 110 can be used to calculate the timing of the static random access memory. Specifically, the measurement circuit 100 can calculate the delay from the clock port of the static random access memory to the output end according to the flip frequency of the output signal of the circuit to be tested.
[0024] The embodiment of the present application provides the above-mentioned measurement circuit. When the measurement circuit is in the self-oscillation mode, a self-triggering clock signal can be generated by a clock pulse generating circuit, and the time delay from the clock port to the output end of the static random access memory is calculated by measuring the flip frequency of the output signal of the circuit to be tested, thereby solving the timing measurement problem of the static random access memory, and further facilitating solving the chip operation bottleneck caused by the static random access memory.
[0025] In an optional embodiment, the measurement circuit may further include a counter, which may be connected to the output end of the circuit to be tested and used to count the flip frequency of the output signal of the circuit to be tested. The measurement circuit may determine the delay from the clock port to the output end of the static random access memory based on the flip frequency of the output signal.
[0026] In an optional embodiment, the clock pulse generating circuit 120 may have an enable signal, and when the enable signal of the clock pulse generating circuit 120 is a preset value, the measuring circuit 100 is in a self-oscillation mode. For example, the enable signal of the clock pulse generating circuit 120 may be represented by 0 (low level) or 1 (high level), and if the value of the enable signal is 1, the measuring circuit 100 enters the self-oscillation mode. If the value of the enable signal is 0, the measuring circuit 100 may be in an initialization mode. Optionally, the default value of the enable signal may be 0. Further, the measuring circuit 100 may operate in an initialization mode. When the measuring circuit 100 detects that the enable signal of the clock pulse generating circuit is a preset value (such as the enable signal is set to 1), the measuring circuit 100 automatically switches from the initialization mode to the self-oscillation mode.
[0027] In the embodiment of the present application, the operation of the circuit under test 110 may include a static random access memory performing a read operation or a write operation. When the measurement circuit 100 is in the initialization mode, the static random access memory may perform a write operation under the drive of an external clock. Specifically, within N (N is an integer greater than or equal to 2) clock cycles, the static random access memory performs a write operation. The write operation is specifically: writing data x'b00...00 at address A0 and writing data x'b00...00 at address A1. x’ b 11…11 ..., and so on, where x is the bit width of the output signal of the output terminal Q of the static random access memory. For example, the static random access memory can perform a write operation within 8 clock cycles to write data into the static random access memory. When the measurement circuit detects the enable signal of the clock pulse generating circuit, the measurement circuit switches from the initialization mode to the self-oscillation mode. In the self-oscillation mode, the static random access memory can perform a read operation driven by the self-triggering clock signal generated by the clock pulse generating circuit, and the static random access memory alternately reads the data previously written to addresses A0 and A1. In each clock cycle, the static random access memory performs a read operation, and the output signal of the static random access memory flips once, and then the output signal causes the self-triggering clock signal to flip. In this way, the measurement circuit can calculate the delay from the clock port to the output end of the static random access memory according to the flip frequency of the output signal of the circuit to be tested.
[0028] In an alternative embodiment, Figure 3 As shown, the circuit under test 310 further includes a combinational logic circuit 312, which is used to implement different circuit functions. The function of the combinational logic circuit 312 may be determined by a specific chip structure. For example, the combinational logic circuit 312 includes at least one or more combinations of a delay circuit, a clock gating circuit, or a buffer circuit. Optionally, the combinational logic circuit 312 of the embodiment of the present application may be a delay circuit.
[0029] The input end of the combinational logic circuit 312 is connected to the output port Q of the static random access memory 311, and the output end of the combinational logic circuit 312 is connected to the clock pulse generating circuit 320. Further, the output signal of the circuit under test 310 may include a first output signal output from the output port Q of the static random access memory, and a second output signal output from the output end OUT of the combinational logic circuit 312. The second output signal output from the output end OUT of the combinational logic circuit 312 can be used to calculate the delay from the clock port to the output end of the static random access memory.
[0030] In the embodiment of the present application, the timing of the combinational logic circuit 312 can be obtained by pre-measurement. In this way, the measurement circuit can determine the delay from the clock port to the output end of the static random access memory through the timing of the second output signal (i.e., the signal output from the output end of the circuit to be tested) output from the output end OUT of the combinational logic circuit 312 and the known timing of the combinational logic circuit 312, thereby solving the problem that the timing of the static random access memory cannot be measured.
[0031] Furthermore, the first output signal and the second output signal are both transmitted to a pulse clock generating circuit, and the pulse clock generating signal can generate a self-triggering clock signal according to the above-mentioned first output signal and the second output signal, as described below for details.
[0032] In an alternative embodiment, Figure 3 As shown, the clock pulse generating circuit 320 may include a signal flipping circuit 321 and a signal selecting circuit 322. The signal flipping circuit 321 is used to generate an internal clock signal SELF_CLK according to an output signal received from the circuit under test 310. Specifically, the signal flipping circuit 321 is used to generate an internal clock signal SELF_CLK according to a first output signal, a second output signal received from the circuit under test 310, and an enable signal EN of the clock pulse generating circuit 320. The signal selecting circuit 322 is used to generate a self-triggering clock signal CLK according to the internal clock signal SELF_CLK and a preset clock signal BIST_CLK.
[0033] Specifically, when the measuring circuit is in the self-oscillation mode, the enable signal EN of the clock pulse generating circuit 320 is a preset value (for example, 1), then the signal flipping circuit 321 can generate the internal clock signal SELF_CLK according to the output signal of the circuit to be measured (including the first output signal and the second output signal) and the above-mentioned enable signal EN, and then the signal selection circuit 322 can generate the self-triggering clock signal CLK according to the internal clock signal SELF_CLK and the preset clock signal BIST_CLK. Among them, when the measuring circuit is in the self-oscillation mode, the preset clock signal BIST_CLK is always at a low level, for example, the value of the preset clock signal BIST_CLK is always 0. The signal selection circuit 322 can use the above-mentioned internal clock signal as the self-triggering clock signal CLK of the clock pulse circuit.
[0034] Alternatively, if Figure 3As shown, the signal flip circuit 321 may include an XOR gate, and the signal selection circuit 322 may include a selector. Specifically, the first input end of the XOR gate is connected to the output end of the static random access memory, and is used to receive the first output signal of the circuit to be tested 310, and the second input end of the XOR gate is connected to the output end of the combinational logic circuit of the circuit to be tested 310, and is used to receive the second output signal of the circuit to be tested. The XOR gate is used to generate an internal clock signal according to the above-mentioned first output signal and the second output signal. The input end of the selector is used to input the internal clock signal and the preset clock signal respectively, and the output end of the selector is connected to the clock port of the static random access memory.
[0035] In an alternative embodiment, if Figure 2 and 3 As shown, the measurement circuit also includes a read / write control circuit 230, 330, which can be connected to the static random access memory. The read / write control circuit 230, 330 is used to control the static random access memory to perform a read operation or a write operation under the drive of a clock signal.
[0036] When performing a read operation or a write operation in a static random access memory, it is necessary not only to control the data to be read / written but also to control the data address of the data to be read / written. Figure 3 As shown, the read / write control circuit 330 may include a data selector 332 for controlling data and an address selector 331 for data address. Among them, one input end of the data selector 332 is used to input an initialization signal, another input end of the data selector 332 is used to input a preset voltage signal, and the output end of the data selector 332 is connected to the data input end D of the static random access memory.
[0037] One input end of the address selector 331 is used to input an initialization signal, and the other input end of the address selector 331 is connected to the output end Q of the static random access memory. Furthermore, the output end Q of the static random access memory is connected in series with a logic NOT gate and then connected to the other input end of the address selector 331. The address selector 331 can be updated according to the read / write operation of the static random access memory 311, and the output end of the address selector 331 is connected to the address input end A of the static random access memory.
[0038] In an alternative embodiment, Figure 2 and 3 As shown, the measurement circuit also includes an initialization signal controller 240, 340, the input signal of the initialization signal controller 240, 340 is the external clock signal REF_CLK, and the initialization signal controller can be connected to the circuit under test 210, 310 through the read-write control circuit 230, 330 to make the circuit under test work in the initialization mode. Figure 3As shown, the initialization signal controller 340 can be used to generate control signals of the above-mentioned data selector 332 and address selector 331 and the above-mentioned initialization signal, so that the initialization signal controller 340 can control the circuit under test to operate under the drive of the external clock signal, that is, the circuit under test operates in the initialization mode.
[0039] Optionally, the initialization signal controller 340 may also be connected to the clock pulse generating circuit 320. Specifically, the initialization signal controller 340 may be connected to the signal selecting circuit 322 of the clock pulse generating circuit 320. The initialization signal controller 340 may generate a control signal of the signal selecting circuit 322 in the clock pulse generating circuit. The initialization signal controller may also generate the above-mentioned preset clock signal BIST_CLK, which is used to generate the self-triggering clock signal CLK.
[0040] It should be clear that Figure 3 The circuit structure of the combinational logic circuit, the clock pulse generating circuit, the read / write control circuit and the initialization signal controller is only described in an exemplary manner, and is not intended to limit its specific structure. In the case of realizing the same or similar functions mentioned above, improvements or circuit structure variations made by technicians in this field on the basis of this application all fall within the protection scope of this application.
[0041] Combine the following Figures 1 to 3 The measurement circuit of FIG. 1 is used to illustrate the working process of the measurement circuit by way of example:
[0042] First, reset the initialization signal controller. Figure 3 As shown, RST is the reset signal of the initialization controller. In the embodiment of the present application, the reset signal RST is valid at a high level and is used to perform a reset operation before each operation. After the reset operation is completed, the initialization signal controller 340 automatically starts the operation of initializing the static random access memory 311. Specifically, the initialization signal controller 340 receives an external clock signal REF_CLK, and performs an initialization operation on the static random access memory based on the external clock signal REF_CLK, so that the measurement circuit is in an initialization mode. The initialization operation can be a write operation to the static random access memory. After N (for example, 2) clock cycles, a write operation is performed on the static random access memory in the circuit to be measured, and data is written at address A0. x’b00...00 , write data at address A1 x’b11…11, where x is the bit width of the output signal of the output terminal Q of the static random access memory. When the measurement circuit detects that the enable signal EN of the clock pulse generating circuit is a preset value, the measurement circuit automatically switches from the initialization mode to the self-oscillation mode. Further, the initialization signal controller 340 is also used to generate a preset clock signal BIST_CLK and an initialization signal. When the measurement circuit is in the self-oscillation mode, the preset clock signal BIST_CLK and the initialization signal are always at a low level. Figure 4 As shown, Figure 4 , which shows the initialization mode and the waveform diagram after the initialization mode is switched to the self-oscillation mode.
[0043] Then, when the measuring circuit operates in the self-oscillation mode, the pulse clock generating circuit 320 can generate the internal clock signal SELF_CLK according to the output signal of the circuit to be measured (the above-mentioned first output signal and second output signal), and then generate the rising edge of the self-triggering clock signal CLK required by the static random access memory 311. When the enable signal and the read signal of the static random access memory are both valid, the static random access memory performs a read operation. The read operation is specifically: reading the data of address A1, and after performing a read operation, the output signal Q of the static random access memory is flipped. Afterwards, the output signal of the output terminal Q of the static random access memory 311 is fed back to the read-write control circuit 330, and the read address of the static random access memory 311 is changed through the address selector 331 of the read-write control circuit 330. At the same time, the falling edge of the internal clock signal SELF_CLK of the clock pulse generating circuit is also triggered by the flipping of the output signal of the output terminal Q of the static random access memory, thereby forming a completed waveform of the self-triggering clock signal CLK.
[0044] Furthermore, the output signal of the output terminal Q of the static random access memory 311 can generate the rising edge of the next clock of the self-triggering clock signal CLK through the clock pulse signal generator 320. Specifically, when the output signal of the output terminal Q of the static random access memory 311 is flipped, it can trigger the second output signal of the output terminal OUT of the circuit to be tested to flip, and then the flip of the second output signal can generate the rising edge of the next clock of the self-triggering clock signal CLK. In this way, in the next clock cycle of the self-triggering clock, the static random access memory performs a read operation to read the data at address A0. After completing this read operation, the output signal Q of the static random access memory flips again to form a ring shock circuit. Figure 5 As shown, Figure 5 The waveform diagram of the measurement circuit in the self-oscillation mode is shown.
[0045] Finally, through the flipping of the above-mentioned self-trigger signal, the static random access memory 311 can continuously perform read operations, so that the measurement circuit can calculate the delay from the clock port to the output end of the static random access memory by measuring the flipping frequency of the output signal of the circuit to be tested and the known timing of the combinational logic circuit.
[0046] In the embodiment of the present application, the delay from the clock port to the output end of the static random access memory can be measured through the above-mentioned measurement circuit, and the frequency of chip operation can be calculated, which helps to solve the chip operation bottleneck problem caused by the static memory.
[0047] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0048] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A timing measurement circuit for a static random access memory, characterized in that: The measuring circuit comprises: A circuit to be tested, the circuit to be tested comprising a static random access memory; and a clock pulse generating circuit, wherein when the measuring circuit is in a self-oscillation mode, the clock pulse generating circuit is used to generate a self-triggering clock signal according to an output signal received from the circuit to be measured, and transmit the self-triggering clock signal to a clock port of the static random access memory, so that the static random access memory works under the drive of the self-triggering clock signal; The output signal of the circuit under test is used to calculate the time delay from the clock port to the output end of the static random access memory.
2. The measuring circuit according to claim 1, characterized in that: When the enable signal of the clock pulse generating circuit is a preset value, the measuring circuit is in a self-oscillation mode.
3. The measuring circuit according to claim 1 or 2, characterized in that: The circuit to be tested also includes a combinational logic circuit, which is connected between the static random access memory and the clock pulse generating circuit, and the output signal of the combinational logic circuit is used to calculate the delay from the clock port to the output end of the static random access memory.
4. The measuring circuit according to claim 3, characterized in that: The combinational logic circuit at least includes one or more combinations of a delay circuit, a clock gating circuit or a buffer circuit.
5. The measuring circuit according to any one of claims 1 to 4, characterized in that: The clock pulse generating circuit comprises: a signal inversion circuit, configured to generate an internal clock signal according to an output signal received from the circuit under test; and A signal selection circuit is used to generate the self-triggering clock signal according to the internal clock signal and the preset clock signal.
6. The measuring circuit according to claim 5, characterized in that: When the clock pulse generating circuit is in the self-oscillation mode, the preset clock signal is kept at a low level.
7. The measuring circuit according to claim 5, characterized in that: The signal inversion circuit comprises: An XOR gate is used to generate an internal clock signal according to the output signal of the combinational logic circuit and the output signal of the random static memory.
8. The measuring circuit according to any one of claims 1 to 7, characterized in that: The measurement circuit also includes a read-write control circuit, and the read-write control circuit is used to control the static random access memory to perform a read operation or a write operation; The output end of the static random access memory is connected to the read-write control circuit.
9. The measuring circuit according to any one of claims 1 to 8, characterized in that: The measurement circuit also includes an initialization signal controller for generating an initialization signal of the static random access memory according to a received external clock signal, and transmitting the initialization signal to the static random access memory.
10. The measuring circuit according to any one of claims 1 to 9, characterized in that: The measuring circuit also includes a counter; the counter is used to calculate the time delay from the clock port to the output end of the static random access memory according to the output signal of the circuit to be measured.
