Phase change memory write-in circuit and method based on SPI (Serial Peripheral Interface)

By optimizing the phase change memory write circuit of the SPI interface and merging multiple data into the phase change memory at one time, the problem of slow data transmission speed is solved and a higher data transmission rate and clock frequency are achieved.

CN120636500APending Publication Date: 2025-09-12SHANGHAI INST OF MICROSYSTEM & INFORMATION TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510585420.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the existing phase-change memory writing method based on the SPI interface, the data transmission speed is limited by the phase-change memory writing delay, resulting in a slow interface transmission speed.

Method used

A combination circuit of an N-bit address register, a 2M-bit input data register, a K-bit write address decoder, a 2K-bit write mask register and a 2M+K-bit write data register is used to merge multiple data and write them into the phase change memory at one time, thereby optimizing the writing process.

Benefits of technology

The data transmission rate of the phase change memory of the SPI interface is improved, and the write delay of the phase change memory is maximized by merging data writes, thereby improving the clock frequency and parallelism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120636500A_ABST
    Figure CN120636500A_ABST
Patent Text Reader

Abstract

The invention relates to a phase change memory write circuit and method based on an SPI (Serial Peripheral Interface), and the circuit comprises an N-bit address register, a 2M-bit input data register, an N-K-bit phase change memory write address register, a K-bit write address decoder, a 2K-bit write mask register and a 2M + K-bit write data register. According to the invention, at most 2K data received by the SPI interface is merged and then written into the phase change memory at one time, so that the write-in delay of the phase change memory is utilized to the maximum extent, and the data transmission rate of the phase change memory based on the SPI interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuits, and in particular to a phase change memory writing circuit and method based on an SPI interface. Background Art

[0002] Phase Change Memory (PCM, PCRAM) is a novel non-volatile storage technology based on chalcogenide materials. It utilizes the ability of phase change materials to rapidly and reversibly switch between an amorphous state (high-resistance) and a polycrystalline state (low-resistance) to store data. Due to its advantages such as high read / write speed, high density, high durability, low power consumption, and compatibility with CMOS processes, as well as the proven success of 3D stacking and multi-level storage technologies, PCM is expected to become a mainstream next-generation storage technology for high-performance computing and integrated computing and storage architectures.

[0003] The Serial Peripheral Interface (SPI) is a high-speed, full-duplex synchronous serial communication protocol first defined by Motorola for its MC68HCXX series processors. It utilizes a master-slave architecture with four signal lines: a clock signal (SCK) output by the master, data sent by the master to the slave (MOSI), data sent by the slave to the master (MISO), and a chip select line (SS) for selecting a specific slave. The master adjusts the data rate by controlling the clock frequency and can simultaneously transmit and receive data in full-duplex mode, resulting in high efficiency. Its advantages include a simple interface and fast transmission speed. It is primarily used in EEPROMs, Flash memories, real-time clocks, A / D converters, and between digital signal processors and digital signal decoders.

[0004] The writing method of the phase change memory based on the SPI interface in the prior art is as follows:

[0005] Figure 1 The figure shows a timing diagram of an 8M-bit phase-change memory write method based on the SPI interface in the prior art. After receiving a write instruction from the host, the write operation address is received. After the address is received, the write data is received. After each data is received, the data is written to the phase-change memory under the action of the write enable signal WE, thereby completing the write operation. In this process, to ensure that the data can be written correctly and sequentially, the phase-change memory needs to complete the write preparation before the next data arrives to write the new data. This requires that the write interval between two data cannot be less than the write delay of the phase-change memory. However, in order to ensure the programming effect, the write delay of the phase-change memory is usually hundreds of nanoseconds or even microseconds. Writing once for each data received will seriously slow down the data transmission speed of the SPI interface. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a phase change memory writing circuit and method based on an SPI interface, which can enable the SPI interface to transmit data at a higher frequency, thereby improving the data transmission rate of the phase change memory based on the SPI interface.

[0007] The technical solution adopted by the present invention to solve the technical problem is to provide a phase change memory writing circuit based on an SPI interface, comprising:

[0008] An N-bit address register, used to latch the address information that the phase change memory needs to operate;

[0009] 2 M 2-bit input data register, used to latch the 2-bit data sent to the phase change memory M Write data in bits and receive 2 M After writing data to the 2 M+K bit write data register, and output address self-increment signal to the N-bit address register;

[0010] K-bit phase change memory write address register, connected to the N-bit address register, used in the 2 M+K When writing data in the N-bit write data register into the phase change memory, the high (NK) bit in the N-bit address register is latched as the write operation address;

[0011] The K-bit write address decoder is connected to the N-bit address register and is used to decode the low K-bit address in the N-bit address register and output the decoding result to 2 K bit write mask register and the 2 M+K bit write data register;

[0012] 2 K A bit write mask register is connected to the K-bit write address decoder and is used to set the corresponding write mask bit to be valid according to the decoding result to mark the 2 M+K Valid write data in the bit write data register;

[0013] 2 M+K bit write data register, respectively with the 2 M The SPI interface receives up to 2 bits of data from the input data register and the K-bit write address decoder. K 2 M bit data, whenever the 2 M Bit input data register receives 2 M After the bit data is decoded, 2 M bit data is written into the 2M+K If the address increment triggers the (LSB+K) bit flip of the N-bit address register, the 2 M+K The data in the bit write data register is written into the phase change memory.

[0014] The least significant bit of the N-bit address register is the LSB bit, and the most significant bit is the MSB bit.

[0015] The N-bit address register and the 2 M The data of the bit input data register is input in series, and the input order is from high to low.

[0016] The phase change memory has an (NK) bit address, 2 M+K bit data width, the phase change memory capacity is 2 M+N Bit.

[0017] The technical solution adopted by the present invention to solve the technical problem is: to provide a phase change memory writing method based on an SPI interface, comprising the following steps:

[0018] Step 1: The phase change memory receives a write instruction and enters write mode. The N-bit address register begins to receive the external input address bit by bit.

[0019] Step 2: After receiving the address, M The bit input data register starts to receive the data sent through the SPI interface bit by bit;

[0020] Step 3: When the 2 M Bit input data register receives 2 M After the K-bit write address decoder decodes the low K-bit address, and converts the 2 M bit data is written into the 2 M+K The corresponding position in the bit write data register is set at the same time K The corresponding bit in the bit mask register is written to get 2 K bit write mask, and output address increment signal to the N-bit address register;

[0021] Step 4: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is incremented by 1. M bit input data register for the next 2 M Receiving bit data;

[0022] Step 5: If the address in the N-bit address register is added by 1 and causes the (LSB+K) bit to flip, the high (NK) bit of the current address is retained and output to the NK-bit phase change memory write address register, and the 2 bits corresponding to the current address are MAfter receiving the 2 bits of input data, M+K The data in the bit write data register is based on 2 K A bit write mask is used to write the address in the NK-bit phase change memory write address register, and then an address self-increment signal is output to the N-bit address register;

[0023] Step 6: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is increased by 1, the low K bits of the address are flipped to 0, and the next set of data is received.

[0024] The write instruction in step 1 is a binary operation code input from the outside.

[0025] The start and end of the write operation of the phase change memory based on the SPI interface are both controlled by an external selection signal.

[0026] Beneficial effects

[0027] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art: the present invention receives at most 2 K The data are merged and written into the phase change memory at one time, maximizing the use of the write delay of the phase change memory, thereby improving the data transmission rate of the phase change memory based on the SPI interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a timing diagram of an 8M-bit phase change memory writing method based on an SPI interface in the prior art;

[0029] Figure 2 Schematic diagram of a phase change memory write circuit based on an SPI interface according to an embodiment of the present invention;

[0030] Figure 3 Schematic diagram of a phase change memory writing method based on an SPI interface according to an embodiment of the present invention;

[0031] Figure 4 This is a timing diagram of an 8M-bit phase-change memory writing method based on an SPI interface according to an embodiment of the present invention;

[0032] Component number description

[0033] 1 Phase change memory writing circuit based on SPI interface

[0034] 11N-bit address register

[0035] 12 2 M 1-bit input data register

[0036] 13(NK)-bit phase change memory write address register

[0037] 14K-bit write address decoder

[0038] 15 2 K Bit Write Mask Register

[0039] 16 2 M+K bit write data register

[0040] Number of bits in the N address register

[0041] M is the base 2 logarithm of the data width

[0042] K write address decoder bit number

[0043] CS_Strobe

[0044] SCK external clock

[0045] MOSI input signal

[0046] WE Write Enable

[0047] Mask Write mask. DETAILED DESCRIPTION

[0048] Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiments are only used to illustrate the present invention and are not used in limiting the scope of the present invention.In addition, should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall equally within the scope limited by the appended claims of the application.

[0049] The embodiment of the present invention relates to a phase change memory writing circuit based on an SPI interface, such as Figure 2 As shown, it includes: N-bit address register 11, 2 M bit input data register 12, NK bit phase change memory write address register 13, K bit write address decoder 14, 2 K Bit write mask register 15, and 2 M+K Bit write data register 16.

[0050] The N-bit address register 11 is used to latch the address information required for the phase change memory operation; the least significant bit of the N-bit address register is the LSB bit, and the most significant bit is the MSB bit; the data of the N-bit address register is input in series, and the input order is from high to low. Wherein, N is the number of address bits; the number of bits N of the address register can be set according to actual needs. In this embodiment, the number of address bits N is set to 20, that is, N=20, and the address bits are A, B, C, D, and E. <0> ~A <19> , a total of 20 bits of address, the lowest bit LSB is A <0> , the highest bit MSB is A <19> , the input order of the address is A <19> 、A <18> 、A <17> ...A <0> .

[0051] Said 2 M The 2-bit input data register 12 is used to latch the 2-bit data sent to the phase change memory. M Write data in bits, every time 2 M The data is output to the 2 M+K bit write data register 16, and output address self-increment signal to the N-bit address register 11; the 2 M The data of the bit input data register 12 is input in series, and the input order is from high to low. In this embodiment, M is set to 3, the K-bit write address decoder 14 is set to 2 bits, and the 2 M The 8-bit input data register 12 is an 8-bit input data register, which is used to latch the write data in 8-bit units sent by the host end to the phase change memory. After receiving each 8-bit data, the data is output to the 32-bit write data register 16, and the address self-increment signal is output to the 20-bit address register 11; the data of the 8-bit input data register 12 is input in series, and the input order is from high bit to low bit.

[0052] The NK-bit phase change memory write address register 13 is connected to the N-bit address register 11. M+K When data in the 32-bit write data register 16 is written into the phase change memory, the NK-bit phase change memory write address register 13 latches the upper (NK) bits of the N-bit address register 11 as the write operation address. In this embodiment, the (NK)-bit phase change memory write address register 13 is an 18-bit phase change memory write address register. When data in the 32-bit write data register 16 is written into the phase change memory, the 18-bit phase change memory write address register 13 latches the upper 18 bits of the 20-bit address register 11 as the write operation address.

[0053] The K-bit write address decoder 14 is connected to the N-bit address register 11, decodes the low K-bit address in the N-bit address register 11, and outputs the decoding result to the 2 KBit write mask register 15 and the 2 M+K In this embodiment, the K-bit write address decoder 14 is a 2-bit write address decoder, which decodes the lower 2 bits of the address in the 20-bit address register 11 and outputs the decoding result to the 4-bit write mask register 15 and the 32-bit write data register 16.

[0054] Said 2 K The bit write mask register 15 is connected to the K-bit write address decoder 14, and sets the corresponding write mask bit to be valid according to the decoding result of the K-bit write address decoder 14, which is used to mark the 2 M+K In this embodiment, the 2 bits are used to write valid data into the data register 16. K The bit write mask register 15 is a 4-bit write mask register, which sets the corresponding write mask bit to be valid according to the decoding result of the 2-bit write address decoder 14 and is used to mark the valid write data in the 32-bit write data register 16.

[0055] Said 2 M+K The write data register 16 is connected to the 2 M The K-bit input data register 12 and the K-bit write address decoder 14 are used to combine up to 2 K 2 M bit data, whenever the 2 M Bit input data register 12 receives 2 M After the K-bit data is received, the 2 bits are decoded according to the decoding result of the K-bit write address decoder 14. M bit data is written into the 2 M+K If the address increment triggers the (LSB+K) bit flip of the N-bit address register 11, the 2 M+K The data in the bit write data register 16 is written into the phase change memory. M+K The 8-bit write data register 16 is a 32-bit write data register used to merge up to four 8-bit data received through the SPI interface. Whenever the 8-bit input data register 12 receives 8-bit data, the 8-bit data is written into the corresponding position in the 32-bit write data register 16 according to the decoding result of the 2-bit write address decoder 14. If the address is incremented, the A of the 20-bit address register 11 is triggered. <2> If the bits are flipped, the data in the 32-bit write data register 16 is written into the phase change memory.

[0056] The phase change memory has an NK bit address, 2 M+K bit data width, the phase change memory capacity is 2 M+NThe phase change memory can be of any capacity, and its read address decoder bit number and data width can also be set to any value that meets the application requirements. In this embodiment, the address bit number of the phase change memory is 18, the data width is 32, and the phase change memory capacity is 8M-bit.

[0057] like Figure 3 and Figure 4 As shown, this embodiment also provides a phase change memory writing method based on the SPI interface, comprising the following steps:

[0058] Step 1: The phase change memory receives a write instruction and enters a write mode, and the N-bit address register begins to receive an external input address bit by bit.

[0059] The write instruction is a binary operation code input from the outside, such as Figure 4 As shown, after receiving the write instruction with the operation code 8'b00000010, the phase change memory enters the write mode.

[0060] In this embodiment, the address register uses a 20-bit address register, and the address bits are A <0> ~A <19> , a total of 20 bits of address, the lowest bit LSB is A <0> , the highest bit MSB is A <19> , the input order of the address is A <19> 、A <18> 、A <17> ...A <0> .

[0061] Step 2: After receiving the address, the 2 M The bit input data register starts to receive the data sent by the host bit by bit.

[0062] In this embodiment, M is set to 3, and the input data register is an 8-bit input data register.

[0063] Step 3: When the 2 M Bit input data register receives 2 M After the K-bit write address decoder decodes the lower K bits of the address, the 2 M bit data is written into the 2 M+K bit write data register corresponding position, and set the 2 K The corresponding bit in the bit mask register is written to get 2 K The bit is written into the mask and the address increment signal is output to the N-bit address register.

[0064] In this embodiment, K is set to 2, the write address decoder is a 2-bit write address decoder, the write data register is 32 bits, and the write mask register is 4 bits. Figure 3As shown in the figure, after the 8-bit input data register receives 8-bit data, the 2-bit write address decoder decodes the lower 2 bits A<1:0> in the 20-bit address, writes the 8-bit data into the corresponding position in the 32-bit write data register according to the decoding result, and outputs the address increment signal to the 20-bit address register. Figure 4 As shown, the corresponding bits in the 4-bit write mask register are also set to valid in sequence to obtain a 4-bit write mask.

[0065] Step 4: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is incremented by 1. M bit input data register for the next 2 M bit data reception.

[0066] In this embodiment, if Figure 3 As shown, every time 8 bits of data are received from the outside, the address in the 20-bit address register is increased by 1 and the next 8 bits of data are received.

[0067] Step 5: If the address in the N-bit address register is increased by 1, which will cause the (LSB+K) bit to flip, then the high (NK) bit of the current address is retained and output to the NK-bit phase change memory write address register, and the 2 bits corresponding to the current address are M After receiving the 2 bits of input data, M+K The data in the bit write data register is based on 2 K The bit write mask is written into the address in the NK-bit phase change memory write address register, and then an address self-increment signal is output to the N-bit address register.

[0068] In this embodiment, the phase change memory write address register is 18 bits, the least significant bit (LSB) is bit 0, i.e., A <0> bit, (LSB+K) bit is the second bit, i.e. A <2> Position. Figure 3 and Figure 4 As shown, if the address in the 20-bit address register is increased by 1, it will cause A <2> Bit flip, that is, when the 8-bit data corresponding to A<1:0> being 2'b11 is received, the upper 18 bits of the current address are retained and output to the 18-bit phase-change memory write address register, and the data in the 32-bit write data register is written to the address in the 18-bit phase-change memory write address register according to the 4-bit write mask. The address in the 20-bit address register will be incremented after the write clock edge ends.

[0069] Step 6: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is increased by 1, the low K bits of the address are flipped to 0, and the next set of data is received.

[0070] The start and end of the write operation of the phase change memory based on the SPI interface is controlled by an external selection signal. Figure 4 As shown, after the external selection signal CS_ is pulled low, the write operation starts. When CS_ is not pulled high, the write operation will continue.

[0071] Through the above operation method, the present embodiment and the prior art phase change memory writing method based on SPI interface (such as Figure 1 As shown in the figure, it can be found that in the prior art, a write is performed every time 8 bits of data are received. If the write delay of the phase change memory is T, the clock frequency is limited to less than 8 / T. However, based on the write method of this embodiment, the phase change memory performs a one-time write after receiving at most 4 8-bit data. Under the same write delay, the parallelism of the write is improved, and the clock frequency can reach 32 / T, thereby greatly improving the data transmission rate of the phase change memory based on the SPI interface.

[0072] In summary, the phase change memory writing circuit and method based on the SPI interface provided in this embodiment can write at most 2 K After the data are merged, they are written into the phase change memory at one time, maximizing the write delay of the phase change memory, thereby improving the data transmission rate of the phase change memory based on the SPI interface. Therefore, the present invention effectively overcomes the various shortcomings of the existing technology and has high industrial application value.

[0073] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be encompassed therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

[0074] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation method can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A phase change memory writing circuit based on SPI interface, characterized in that: include: An N-bit address register, used to latch the address information that the phase change memory needs to operate; 2 M 2-bit input data register, used to latch the 2-bit data sent to the phase change memory M Write data in bits and receive 2 M After writing data to the 2 M+K bit write data register, and output address self-increment signal to the N-bit address register; NK bit phase change memory write address register, connected to the N bit address register, for M+K When writing data in the N-bit write data register into the phase change memory, the high (NK) bit in the N-bit address register is latched as the write operation address; A K-bit write address decoder is connected to the N-bit address register and is used to decode the low The K-bit address is decoded and the decoding result is output to 2 K bit write mask register and the 2 M+K bit write data register; 2 K A bit write mask register is connected to the K-bit write address decoder and is used to set the corresponding write mask bit to be valid according to the decoding result to mark the 2 M+K Valid write data in the bit write data register; 2 M+K bit write data register, respectively with the 2 M The SPI interface receives up to 2 bits of data from the input data register and the K-bit write address decoder. K 2 M bit data, whenever the 2 M Bit input data register receives 2 M After the bit data is decoded, 2 M bit data is written into the 2 M+K If the address increment triggers the (LSB+K) bit flip of the N-bit address register, the 2 M+K The data in the bit write data register is written into the phase change memory.

2. The phase change memory writing circuit based on the SPI interface according to claim 1, characterized in that: The least significant bit of the N-bit address register is the LSB bit, and the most significant bit is the MSB bit.

3. The phase change memory writing circuit based on the SPI interface according to claim 1, characterized in that: The N-bit address register and the 2 M The data of the bit input data register is input in series, and the input order is from high to low.

4. The phase change memory writing circuit based on the SPI interface according to claim 1, characterized in that: The phase change memory has an (NK) bit address, 2 M+K bit data width, the phase change memory capacity is 2 M+N Bit.

5. A phase change memory writing method based on SPI interface, characterized in that: The following steps are involved: Step 1: The phase change memory receives a write instruction and enters write mode. The N-bit address register begins to receive the external input address bit by bit. Step 2: After receiving the address, M The bit input data register starts to receive the data sent through the SPI interface bit by bit; Step 3: When the 2 M Bit input data register receives 2 M After the K-bit write address decoder decodes the low K-bit address, and converts the 2 M bit data is written into the 2 M+K The corresponding position in the bit write data register is set at the same time K The corresponding bit in the bit mask register is written to get 2 K bit write mask, and output address increment signal to the N-bit address register; Step 4: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is incremented by 1. M bit input data register for the next 2 M Receiving bit data; Step 5: If the address in the N-bit address register is incremented by 1 and causes the (LSB+K) bit to flip, the high (NK) bit of the current address is retained and output to the NK-bit phase change memory write address register, and the 2 bits corresponding to the current address are M After receiving the input data, the 2 M+K The data in the bit write data register is based on 2 K A bit write mask is used to write the address in the NK-bit phase change memory write address register, and then an address self-increment signal is output to the N-bit address register; Step 6: After the N-bit address register receives the address self-increment signal, the address in the N-bit address register is increased by 1, the low K bits of the address are flipped to 0, and the next set of data is received.

6. The phase change memory writing method based on the SPI interface according to claim 5, characterized in that: The write instruction in step 1 is a binary operation code input from the outside.

7. The method for writing phase change memory based on SPI interface according to claim 5, characterized in that: The start and end of the write operation of the phase change memory based on the SPI interface are both controlled by an external selection signal.