WO2023065706A1 - 写入缓存电路、数据写入方法和存储器 - Google Patents

写入缓存电路、数据写入方法和存储器 Download PDF

Info

Publication number
WO2023065706A1
WO2023065706A1 PCT/CN2022/101171 CN2022101171W WO2023065706A1 WO 2023065706 A1 WO2023065706 A1 WO 2023065706A1 CN 2022101171 W CN2022101171 W CN 2022101171W WO 2023065706 A1 WO2023065706 A1 WO 2023065706A1
Authority
WO
WIPO (PCT)
Prior art keywords
write
pointer
output
cache
mask
Prior art date
Application number
PCT/CN2022/101171
Other languages
English (en)
French (fr)
Inventor
高恩鹏
Original Assignee
长鑫存储技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 长鑫存储技术有限公司 filed Critical 长鑫存储技术有限公司
Publication of WO2023065706A1 publication Critical patent/WO2023065706A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to but is not limited to a write buffer circuit, a data writing method and a memory.
  • the timing of obtaining the write address is consistent with that of the write operation in order to realize the data write operation.
  • the obtained write address is stored in the storage unit, and then the slave storage unit is set.
  • the timing of obtaining the write address is consistent with the timing of the write operation, so as to ensure that the timing of obtaining the write address is consistent with the timing of the write operation.
  • data writing to memory includes multiple writing modes, for example, direct write operation and mask write operation, direct write operation is to write sequentially according to the write address, mask write operation is to write according to The input address is selected for writing, and the unselected address does not perform data writing.
  • direct write operation is to write sequentially according to the write address
  • mask write operation is to write according to The input address is selected for writing
  • unselected address does not perform data writing.
  • the disclosure provides a write cache circuit, a data writing method and a memory.
  • a first aspect of the present disclosure provides a write cache circuit, including: a control module configured to generate a first write pointer and a pointer to be located based on a masked write command, and generate a second write pointer based on a write command, The first output pointer is generated based on the mask write shift instruction, and the second output pointer is generated based on the write shift instruction; wherein the write command is one of the write instruction and the mask write instruction, and the pointer to be positioned is based on the mask write instruction.
  • the generated second write pointer corresponds to the same write address;
  • the first cache module is configured to cache data in the form of a queue, cache the pointer to be positioned based on the first write pointer, and output the location based on the first output pointer pointer; wherein, the location pointer is the pointer to be positioned cached by the first cache module, and is used to instruct the second cache module to output the write address written by the second write pointer generated according to the mask write instruction;
  • the second cache module is It is configured to cache the data in the form of a queue, and cache the write address based on the second write pointer, and output the write address of the cache based on the second output pointer or the positioning pointer.
  • the depth of the first cache module is smaller than the depth of the second cache module.
  • control module includes: a first control submodule, configured to generate a first write pointer based on a mask write instruction, and generate a first output pointer based on a mask write shift instruction; a second control submodule is configured to , generating a second write pointer based on the write command, generating a second output pointer based on the write shift instruction, and generating a pointer to be positioned based on the mask write instruction.
  • the first control submodule includes: a first input control unit, configured to receive a mask write instruction, and generate a first write pointer according to the mask write instruction; a first output control unit, configured to receive a mask write shift instruction, and generate the first output pointer according to the mask write shift instruction.
  • the first input control unit includes: a first data receiving subunit, used to receive a mask write instruction, when receiving a mask write instruction, the first data receiving subunit is used to generate a first pointer generation command; the first write The input pointer generation subunit is configured to receive a first pointer generation command, and generate a first write pointer based on the first pointer generation command, where the first write pointer is used to indicate that the pointer to be positioned is stored in the first cache module.
  • the first output control unit includes: a second data receiving subunit, used to receive the mask write shift instruction, when receiving the mask write shift instruction, the second data receiving subunit is used to generate the first pointer output command ;
  • the first output pointer generation subunit is used to receive the first pointer output command and generate the first output pointer based on the first pointer output command, the first output pointer is used to instruct the first cache module to output the positioning pointer.
  • the second control sub-module includes: a second input control unit, configured to receive a write command, and generate a second write pointer according to the write command, when the write command is a mask write instruction, the second input control unit writes according to the mask The instruction generates a pointer to be positioned; the second output control unit is configured to receive the write shift instruction, and generate a second output pointer according to the write shift instruction.
  • the second input control unit includes: a third data receiving subunit for receiving a write command, when receiving a write command, the third data receiving subunit is used for generating a second pointer generation command; the second write pointer generation subunit The unit is configured to receive a second pointer generation command, and generate a second write pointer based on the second pointer generation command, and the second write pointer is used to indicate that the write address is stored in the second cache module; the data acquisition subunit uses for receiving a masked write command and generating a pointer to be located based on the masked write command.
  • the second output control unit includes: a fourth data receiving subunit, used to receive a write shift instruction, when receiving a write shift instruction, the fourth data receiving subunit is used to generate a second pointer output command; the second output The pointer generating subunit is configured to receive a second pointer output command and generate a second output pointer based on the second pointer output command, and the second output pointer is used to instruct the second cache module to output a write address.
  • the second cache module includes: a first cache unit for caching the write address; a first drive unit connected to the first cache unit for receiving the second output pointer, and conducting according to the second output pointer to sequentially Outputting the write address of the first cache unit cache; the second drive unit, connected to the first cache unit, for receiving the positioning pointer, and conducting according to the positioning pointer to select and output the write address of the first cache unit cache; the first The latch unit is connected to the first driving unit and the second driving unit, and is used for maintaining the output voltage of the first driving unit or the output level of the second driving unit.
  • the first cache unit includes: a plurality of first D flip-flops, and each first D flip-flop is used to store a write address with a preset width.
  • the first driving unit includes: a first driver, the input terminal is connected to the first buffer unit, and the output terminal is connected to the first latch unit; the receiving subunit is connected to the control module, used to receive the second output pointer, and based on the second output The pointer turns on the first driver.
  • the first latch unit includes: a first inverter and a second inverter, wherein the output terminal of the first inverter is connected to the input terminal of the second inverter, and the output terminal of the second inverter is connected to Input to the first inverter.
  • the first cache module includes: a second cache unit for caching the pointer to be positioned; a third drive unit connected to the second cache unit for receiving the first output pointer and for conducting according to the first output pointer to Outputting the pointer to be positioned buffered by the second buffer unit; the second latch unit is connected to the third driving unit and is used to maintain the output level of the third driving unit.
  • the second buffer unit includes: a plurality of second D flip-flops, and each second D flip-flop is used to store an output pointer with a preset width.
  • the second aspect of the present disclosure provides a data writing method, which is applied to the write cache circuit described in the first aspect, including: based on the write command, writing the write address corresponding to the write command into the second cache module,
  • the write command is one of a write instruction and a mask write instruction; based on the mask write instruction, the pointer to be positioned is written into the first cache module, and the pointer to be positioned is used to indicate the value of writing the second cache module based on the mask write instruction Write address; based on the write shift instruction, sequentially read the write address stored in the second cache module, or based on the mask write shift instruction, select and read the second cache module through the pointer to be located in the first cache module The write address stored in .
  • sequentially reading the write address stored in the second cache module includes: obtaining the second output pointer based on the write shift instruction, and sequentially reading the address stored in the second cache module based on the second output pointer. Write address.
  • selecting and reading the write address stored in the second cache module through the pointer to be located in the first cache module includes: obtaining the first output pointer based on the mask write shift instruction, based on The first output pointer sequentially reads the positioning pointer, the positioning pointer is the pointer to be located stored in the first cache module, based on the positioning pointer, selects and reads the write address stored in the second cache module.
  • a third aspect of the present disclosure provides a memory, including the write cache circuit as described in the first aspect
  • the write cache circuit In the write cache circuit, data write method, and memory provided by the embodiments of the present disclosure, whether it is a write operation or a mask write operation, the address of the required cache is stored in the second cache module, and the second cache module A cache module is used to store the location of the address required for mask writing in the second cache module; compared to the mode in which the write operation is independent of the mask write operation, the write cache circuit provided by the present disclosure passes The data of the write operation and the mask write operation are stored in one storage space, thus saving a storage space; in addition, a new location storage space for storing the address corresponding to the mask write operation, and the data stored in the location storage space The number of bars is not greater than the number of data bars used to store the write address. That is, the capacity of the newly added storage space is smaller than the capacity of the saved storage space, thereby reducing the layout area of the write cache circuit in practical applications.
  • 1 to 3 are schematic structural diagrams of a write buffer circuit provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of receiving a second cache module provided by an embodiment of the present disclosure.
  • Fig. 5 is a schematic diagram of receiving a first cache module provided by an embodiment of the present disclosure.
  • An embodiment of the present disclosure provides a write cache circuit for integrating the write address storage space required by the write operation and the mask write operation, so as to reduce the layout area of the write circuit in practical applications.
  • FIGS 1 to 3 are schematic structural diagrams of the write cache circuit provided in this embodiment
  • Figure 4 is a schematic diagram of receiving the second cache module provided in this embodiment
  • Figure 5 is a schematic diagram of receiving the first cache module provided in this embodiment
  • the write cache circuit provided by this embodiment will be further described in detail below in conjunction with the accompanying drawings, specifically as follows:
  • the write cache circuit 100 includes: a first cache module 101, a second cache module 102 and a control module 103, wherein the second cache module 102 is used to store data addresses, and the first cache module 101 is used to store pointers .
  • the control module 103 is configured to generate the first write pointer CntIn1 ⁇ C:0> and the pointer to be positioned Cnt ⁇ E:0> based on the mask write instruction MaskWrite, and generate the second write pointer CntIn2 ⁇ A:0> based on the write command 0>, the first output pointer FifoOut1 ⁇ D:0> is generated based on the mask write shift instruction MaskWriteShift, and the second output pointer FifoOut2 ⁇ B:0> is generated based on the write shift instruction WriteShift.
  • the write command is one of the write command Write and the mask write command MaskWrite, that is, the write command includes the write command Write and the mask write command MaskWrite, that is, whether it is receiving the write command Write or receiving the mask write command MaskWrite
  • the control module 103 will generate the second write pointer CntIn2 ⁇ A:0>, the pointer to be positioned Cnt ⁇ E:0> and the second write pointer CntIn2 ⁇ A:0> generated based on the mask write instruction correspond to the same write address Address .
  • the write command Write and the mask write command MaskWrite are used to cache the corresponding write address Address
  • the write shift command WriteShift and the mask write shift command MaskWriteShift are used to cache the cached write
  • the address Address is output, so that the memory completes the writing of data based on the writing address Address.
  • the second write pointer CntIn2 ⁇ A:0> is used to indicate the storage space of the write address Address required to be written by the write instruction Write and the mask write instruction MaskWrite
  • the second output pointer FifoOut2 ⁇ B:0> is used to indicate , the storage space of the write address Address required to output the write shift instruction WriteShift
  • the first write pointer CntIn1 ⁇ C:0> is used to indicate, the storage space of the write pointer required by the mask write instruction MaskWrite
  • the pointer FifoOut1 ⁇ D:0> is used to indicate the storage space of the output pointer required by the mask write shift instruction MaskWriteShift
  • the pointer written by the first write pointer CntIn1 ⁇ C:0> is the pointer to be positioned Cnt ⁇ E:0 >
  • the pointer output by the first output pointer FifoOut1 ⁇ D:0> is the positioning pointer Out0 ⁇ F:0>
  • the first cache module 101 is configured to cache data in the form of a queue, such as a first-in-first-out queue, and cache the pointer Cnt ⁇ E:0> based on the first write pointer CntIn1 ⁇ C:0>, and based on The first output pointer FifoOut1 ⁇ D:0> outputs the positioning pointer Out0 ⁇ F:0>.
  • a queue such as a first-in-first-out queue
  • the location pointer Out0 ⁇ F:0> is the pointer to be positioned Cnt ⁇ E:0> cached by the first cache module 101, that is, the data of the location pointer Out0 ⁇ F:0> and the corresponding pointer to be positioned Cnt ⁇ E:0> The data of > are the same; the location pointer Out0 ⁇ F:0> is used to instruct the second cache module 102 to output the write address Address written by the second write pointer CntIn2 ⁇ A:0> generated according to the mask write instruction.
  • the second cache module 102 is configured to cache data in the form of a queue, such as a first-in-first-out queue, and cache the write address Address based on the second write pointer CntIn2 ⁇ A:0>, and based on the second output pointer FifoOut2 ⁇ B:0> or location pointer Out0 ⁇ F:0> output buffer write address Address.
  • a queue such as a first-in-first-out queue
  • the address output based on the write shift instruction WriteShift is the real write address WriteAddress
  • the address output based on the mask write shift instruction MaskWriteShift is the real mask write address MaskWriteAddress
  • the real write address WriteAddress and the real mask write address MaskWriteAddress is used to indicate the write address of the memory.
  • the second write pointer CntIn2 ⁇ A:0> is generated, and the second cache module sequentially writes 8 address data, namely data 1, data 2, and data 3 , data 4, data 5, data 6, data 7 and data 8; continue to assume that data 1, data 3 and data 5 need to be written as a mask, at this time, the second write pointer CntIn2 ⁇ A:0> is used to write Data 1 to data 8 are written into the second cache module 102, and when data 1, data 3 and data 5 are written, a pointer to be positioned Cnt ⁇ E:0>, the first write pointer CntIn1 ⁇ C:0> is used to write the to-be-located pointer Cnt ⁇ E:0> into the first cache module 101 .
  • the write cache circuit uses both the data of the write operation and the mask write operation Stored in one storage space, thus saving one storage space;
  • a new location storage space is added for storing the address corresponding to the mask write operation.
  • the number of data pieces stored in the location storage space is not greater than the number of data pieces used to store the write address (the reason is: the data of the write address is stored Including write data and mask write data. For extreme cases, all write data is mask write data. At this time, the number of data pieces stored in the location storage space is equal to the number of data pieces stored in the address storage space. However, for a normal mask write operation, the number of mask write data is less than the number of write data, that is, the required location storage space is smaller than the required data storage space). That is, the capacity of the newly added storage space is smaller than the capacity of the saved storage space, thereby reducing the layout area of the write cache circuit in practical applications.
  • the depth of the first cache module 101 is smaller than the depth of the second cache module 102, by setting the number of data pieces stored in the location storage space to be smaller than the number of data pieces stored in the address storage space, to reduce the actual cost of the write cache circuit.
  • the layout area in the application is smaller.
  • control module 103 (refer to FIG. 1 ) includes: a first control submodule 113 and a second control submodule 123 .
  • the first control submodule 113 is configured to generate the first write pointer CntIn1 ⁇ C:0> based on the mask write instruction MaskWrite, and generate the first output pointer FifoOut1 ⁇ D:0> based on the mask write shift instruction WriteShift
  • the second control submodule 123 is configured to generate the second write pointer CntIn2 ⁇ A:0> based on the write command, and generate the second output pointer FifoOut2 ⁇ B:0> based on the write shift instruction WriteShift, and also based on the mask
  • the code writing command MaskWrite generates the pointer Cnt ⁇ E:0> to be positioned.
  • the first control submodule 113 is used to control the first cache module 101 to store the pointer Cnt ⁇ E:0> to be located, and to control the first cache module 101 to output the location pointer Out0 ⁇ F:0>;
  • the second control submodule 123 uses The second cache module 102 is controlled to store the write address Address, and the second cache module 102 is controlled to output the real write address WriteAddress or the real mask write address MaskWriteAddress.
  • the first control submodule 113 includes: a first input control unit 201 and a first output control unit 301 .
  • the first input control unit 201 is used to receive the mask write instruction MaskWrite, and generate the first write pointer CntIn1 ⁇ C:0> according to the mask write instruction MaskWrite; the first output control unit 301 is used to receive the mask A write shift instruction MaskWriteShift, and generate a first output pointer FifoOut1 ⁇ D:0> according to the mask write shift instruction MaskWriteShift.
  • the first input control unit 201 includes: a first data receiving subunit 202 and a first write pointer generating subunit 203 .
  • the first data receiving subunit 202 is used to receive the mask write instruction MaskWrite, when the mask write instruction MaskWrite is received, the first data receiving subunit 202 is used to generate the first pointer generation command; the first write pointer generation The subunit 203 is configured to receive a first pointer generation command, and generate a first write pointer CntIn1 ⁇ C:0> based on the first pointer generation command, and the first write pointer CntIn1 ⁇ C:0> is used to indicate that the The pointer Cnt ⁇ E:0> is stored in the first cache module 101 .
  • the first output control unit 301 includes: a second data receiving subunit 302 and a first output pointer generating subunit 303 .
  • the second data receiving subunit 302 is used to receive the mask write shift instruction MaskWriteShift, when the mask write shift instruction MaskWriteShift is received, the second data receiving subunit 302 is used to generate the first pointer output command;
  • the first The output pointer generating subunit 303 is configured to receive a first pointer output command, and generate a first output pointer FifoOut1 ⁇ D:0> based on the first pointer output command, and the first output pointer FifoOut1 ⁇ D:0> is used to indicate the first The cache module 101 outputs the location pointer Out0 ⁇ F:0>.
  • the second control submodule 123 includes: a second input control unit 401 and a second output control unit 501 .
  • the second input control unit 401 is configured to receive a write command, and generate a second write pointer CntIn2 ⁇ A:0> according to the write command, when the write command is a mask write command MaskWrite, the second input control unit 401 according to the mask
  • the code write instruction MaskWrite generates the pointer to be positioned Cnt ⁇ E:0>
  • the second output control unit 501 is configured to receive the write shift instruction WriteShift, and generate the second output pointer FifoOut2 ⁇ B:0> according to the write shift instruction WriteShift.
  • the second output control unit 501 needs to generate a second write pointer CntIn2 ⁇ A:0>, in some
  • the write instruction Write and the mask write instruction MaskWrite may be received through a logic OR gate, and the output terminal of the logic OR gate outputs the above-mentioned write command.
  • the second input control unit 401 includes: a third data receiving subunit 402 , a second write pointer generating subunit 403 and a data obtaining subunit 404 .
  • the third data receiving subunit 402 is used to receive the write command, when the write command is received, the third data receiving subunit 402 is used to generate the second pointer generation command;
  • the second write pointer generation subunit 403 is used to Receive a second pointer generation command, and generate a second write pointer CntIn2 ⁇ A:0> based on the second pointer generation command, and the second write pointer CntIn2 ⁇ A:0> is used to indicate that the write address Address is stored in the second Cache module;
  • data acquisition subunit 404 configured to receive a mask write instruction MaskWrite, and generate a pointer Cnt ⁇ E:0> to be positioned based on the mask write instruction MaskWrite.
  • the second output control unit 501 includes: a fourth data receiving subunit 502 and a second output pointer generating subunit 503 .
  • the fourth data receiving subunit 502 is used to receive the write shift instruction WriteShift, when receiving the write shift instruction WriteShift, the fourth data receiving subunit 502 is used to generate the second pointer output command; the second output pointer generation subunit A unit 503, configured to receive a second pointer output command, and generate a second output pointer FifoOut2 ⁇ B:0> based on the second pointer output command, where the second output pointer FifoOut2 ⁇ B:0> is used to instruct the second cache module 102 to output Write address Address.
  • the first data receiving subunit 202, the second data receiving subunit 302, the third data receiving subunit 402, and the fourth data receiving subunit 502 are provided with counters with the same drive clock frequency, which are used to implement the second cache module 102
  • the input data and the output data maintain the same transmission rate to realize the first-in-first-out data.
  • the second cache module 102 (refer to FIG. 1 ) includes: a first cache unit 601 , a first drive unit 602 , a second drive unit 603 and a first latch unit 604 .
  • the first cache unit 601 is used to cache the write address Address;
  • the first drive unit 602, connected to the first cache unit 601, is used to receive the second output pointer FifoOut2 ⁇ B:0>, and according to the second output pointer FifoOut2 ⁇ B:0> B:0> is turned on to output the write address Address cached by the first cache unit 601 at one time;
  • the second drive unit 603 is connected to the first cache unit 601 for receiving the positioning pointer Out0 ⁇ F:0>, and according to the positioning The pointer Out0 ⁇ F:0> is turned on to select and output the write address Address cached by the first cache unit 601;
  • the first latch unit 604 is connected to the first drive unit 602 and the second drive unit 603 for maintaining the first The output voltage of the driving unit 602 or the output voltage of the second driving unit 603 .
  • the first drive unit 602 is used to respond to the output of the write shift command WriteShift
  • the second drive unit 603 is used to respond to the output of the mask write shift command MaskWriteShift .
  • the first cache unit 601 includes a plurality of first D flip-flops, and each first D flip-flop is used to store a write address Address with a preset width, wherein the width of the write address Address is based on the required
  • the stored address width is limited, and the embodiment of the present disclosure does not limit the storage width of the first D flip-flop.
  • each first D flip-flop includes a preset width of sub-flip-flops, wherein each sub-flip-flop is used to store 1 bit of data.
  • the first driving unit 602 includes: a first driver, the input end of which is connected to the output end of the first cache unit 601, and the output end is connected to the first latch unit 604; the first receiving subunit is connected to the control module 103 (refer to Figure 1), used to receive the second output pointer FifoOut2 ⁇ B:0>, and turn on the first driver based on the second output pointer FifoOut2 ⁇ B:0>, the first driver is in the second output pointer FifoOut2 ⁇ B:0>
  • the data stored in the first cache unit 601 is outputted under the drive of .
  • the second driving unit 603 includes: a second driver, the input end of which is connected to the output end of the first buffer unit 601, and the output end is connected to the input end of the first latch unit 604; the second receiving subunit is connected to the control module 103 (refer to FIG. 1), for receiving the positioning pointer Out0 ⁇ F:0>, and conducting the second driver based on the positioning pointer Out0 ⁇ F:0>, and the second driver is driven by the positioning pointer Out0 ⁇ F:0>
  • the stored data in the first cache unit 601 is output.
  • the first latch unit 604 is used for buffering the data output by the first drive unit 602 and the second drive unit 603.
  • the first latch unit 604 includes: a first inverter and a second inverter, wherein , the output terminal of the first inverter is connected to the input terminal of the second inverter, and the output terminal of the second inverter is connected to the input terminal of the first inverter, that is, two stages of inverters are connected end to end to form a latch
  • other latches may also be used as the first latch unit.
  • the first cache module 101 (refer to FIG. 1 ) includes: a second cache unit 701 , a third drive unit 702 and a second latch unit 703 .
  • the second buffer unit 701 is used for buffering the pointer Cnt ⁇ E:0> to be positioned;
  • the third drive unit 702 is connected to the output end of the second buffer unit 701 for receiving the first output pointer FifoOut1 ⁇ D:0>, and uses According to the conduction of the first output pointer FifoOut1 ⁇ D:0>, the pointer Cnt ⁇ E:0> to be positioned cached by the second buffer unit 701 is output;
  • the second latch unit 703 is connected to the third drive unit 702 for The output level of the third driving unit 702 is maintained.
  • the third drive unit 702 is used to respond to the mask write shift command MaskWriteShift, and output the positioning pointer Out0 ⁇ F:0> to control the output of the second cache module 102 Real mask write address MaskWriteAddress.
  • the second cache unit 701 includes a plurality of second D flip-flops, and each second D flip-flop is used to store a write address Address with a preset width, wherein the width of the write address Address is based on the required
  • the width of the stored address is limited, and the embodiment of the present disclosure does not limit the storage width of the second D flip-flop; for example, each second D flip-flop includes sub-flip-flops with a preset width, and each sub-trigger Devices are used to store 1bit data.
  • the third driving unit 702 includes: a third driver, the input end of which is connected to the output end of the second cache unit 701, and the output end is connected to the second latch unit 703; the third receiving subunit is connected to the control module 103 (refer to FIG. 1 ), for receiving the first output pointer FifoOut1 ⁇ D:0>, and turning on the third driver based on the first output pointer FifoOut1 ⁇ D:0>.
  • the second latch unit 703 is used to buffer the data output by the third driving unit 702.
  • the second latch unit 703 includes: a third inverter and a fourth inverter, wherein the third inverter The output end of the fourth inverter is connected to the input end of the fourth inverter, and the output end of the fourth inverter is connected to the input end of the third inverter, that is, two stages of inverters are connected end to end to form a latch.
  • other latches can also be used as the second latch unit.
  • the write cache circuit saves a storage space by storing the data of the write operation and the mask write operation in one storage space; in addition, a newly added address for storing the mask write operation Location storage space, the number of data pieces stored in the location storage space is not greater than the number of data pieces used to store the write address (the reason is that: the data for storing the write address includes write data and mask write data, for extreme cases In other words, the write data is all mask write data, and at this moment, the number of data pieces stored in the location storage space is equal to the number of data pieces stored in the address storage space). That is, the capacity of the newly added storage space is smaller than the capacity of the saved storage space, thereby reducing the layout area of the write cache circuit in practical applications.
  • another embodiment of the present disclosure provides a data writing method, including the following steps:
  • the write address corresponding to the write command is written into the second cache module, and the write command is one of a write command and a mask write command.
  • the to-be-located pointer is written into the first cache module, and the to-be-located pointer is used to indicate a write address to be written to the second cache module based on the masked write instruction.
  • sequentially reading the write address stored in the second cache module includes: obtaining the second output pointer based on the write shift instruction, and sequentially reading the second cache module based on the second output pointer The write address stored in the module.
  • selecting and reading the write address stored in the second cache module through the pointer to be located in the first cache module includes: obtaining the first address based on the mask write shift instruction
  • the output pointer is based on the first output pointer, sequentially reading the positioning pointer, the positioning pointer is the pointer to be located stored in the first cache module, based on the positioning pointer, selecting and reading the write address stored in the second cache module.
  • Another embodiment of the present disclosure further provides a memory, including the write cache circuit provided in the above embodiment.
  • the memory referred to in this document includes but is not limited to dynamic random access memory, etc., and the memory adopts the write buffer circuit provided by the above embodiment to reduce the layout area of the write circuit in practical applications.
  • the memory is a dynamic random access memory DRAM (Dynamic Random Access Memory) chip, wherein the memory of the dynamic random access memory DRAM chip conforms to the DDR2 (Double Data Rate 2) memory specification.
  • DRAM Dynamic Random Access Memory
  • the memory is a DRAM chip, wherein the memory of the DRAM chip conforms to the DDR3 memory specification.
  • the memory is a dynamic random access memory DRAM chip, wherein the memory of the dynamic random access memory DRAM chip conforms to the DDR4 memory specification.
  • the memory is a dynamic random access memory DRAM chip, wherein the memory of the dynamic random access memory DRAM chip conforms to the DDR5 memory specification.
  • the write cache circuit stores the data of the write operation and the mask write operation in one storage space, thus saving a Storage space; in addition, a new location storage space is added for storing the address corresponding to the mask write operation, and the number of data pieces stored in the location storage space is not greater than the number of data pieces used to store the write address. That is, the capacity of the newly added storage space is smaller than the capacity of the saved storage space, thereby reducing the layout area of the write cache circuit in practical applications.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本公开提供一种写入缓存电路、数据写入方法和存储器,其中,写入缓存电路包括:控制模块,基于掩码写指令生成第一写入指针和待定位指针,基于写命令生成第二写入指针,基于掩码写移位指令生成第一输出指针,基于写移位指令生成第二输出指针;第一缓存模块,基于第一写入指针缓存待定位指针,基于第一输出指针输出定位指针;定位指针用于指示第二缓存模块输出根据掩码写指令生成的第二写入指针写入的写入地址;第二缓存模块,基于第二写入指针缓存写入地址,基于第二输出指针或定位指针输出缓存的写入地址。

Description

写入缓存电路、数据写入方法和存储器
本公开基于申请号为202111210536.2、申请日为2021年10月18日、申请名称为“写入缓存电路、数据写入方法和存储器”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及但不限于一种写入缓存电路、数据写入方法和存储器。
背景技术
存储器在进行数据写入的过程中,需保证获取写入地址与写入操作的时序一致,才能实现数据的写入操作,通常将获取的写入地址存储在存储单元中,然后设置从存储单元中获取写入地址的时序与写入操作的时序一致,来保证获取写入地址与写入操作的时序一致。
然而,对于存储器的数据写入包括多种写入模式,例如,直接写入操作和掩码写入操作,直接写入操作即根据写入地址进行依次写入,掩码写入操作即根据写入地址进行选择写入,未被选择地址不进行数据写入。
对于不同的写入模式,采用不同存储单元来存储写入地址,以确保不同写入模式之间相互独立运行,互不影响,但不同的写入模式需要设置不同的存储单元,极大增加了存储器写入电路的面积,不符合当前存储器的发展趋势。
发明内容
以下是对本公开详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本公开提供了一种写入缓存电路、数据写入方法及存储器。
本公开的第一方面提供了一种写入缓存电路,包括:控制模块,被配置为,基于掩码写指令生成第一写入指针和待定位指针,基于写命令生成第二写入指针,基于掩码写移位指令生成第一输出指针,基于写移位指令生成第二输出指针;其中,写命令为写指令和掩码写指令中的一者,待定位指针与基于掩码写指令生成的第二写入指针对应于同一写入地址;第一缓存模块,被配置为,采用队列的形式缓存数据,并基于第一写入指针缓存待定位指针,并基于第一输出指针输出定位指针;其中,定位指针为第一缓存模块缓存的待定位指针,用于指示第二缓存模块输出根据掩码写指令生成的第二写入指针写入的写入地址;第二缓存模块,被配置为,采用队列的形式缓存数据,并基于第二写入指针缓存写入地址,并基于第二输出指针或定位指针输出缓存的写入地址。
其中,第一缓存模块的深度小于第二缓存模块的深度。
其中,控制模块包括:第一控制子模块,被配置为,基于掩码写指令生成第一写入指针,基于掩码写移位指令生成第一输出指针;第二控制子模块,被配置为,基于写命令生成第二写入指针,基于写移位指令生成第二输出指针,还基于掩码写指令生成待定位指针。
其中,第一控制子模块包括:第一输入控制单元,用于接收掩码写指令,并根据掩码写指令生成第一写入指针;第一输出控制单元,用于接收掩码写移位指令,并根据掩码写移位指令生成第一输出指针。
其中,第一输入控制单元包括:第一数据接收子单元,用于接收掩码写指令,当接收到掩码写指令,第一数据接收子单元用于生成第一指针生成命令;第一写入指针生成子单元,用于接收第一指针生成命令,并基于第一指针生成命令生成第一 写入指针,第一写入指针用于指示将待定位指针存入第一缓存模块。
其中,第一输出控制单元包括:第二数据接收子单元,用于接收掩码写移位指令,当接收到掩码写移位指令,第二数据接收子单元用于生成第一指针输出命令;第一输出指针生成子单元,用于接收第一指针输出命令,并基于第一指针输出命令生成第一输出指针,第一输出指针用于指示第一缓存模块输出定位指针。
其中,第二控制子模块包括:第二输入控制单元,用于接收写命令,并根据写命令生成第二写入指针,当写命令为掩码写指令,第二输入控制单元根据掩码写指令生成待定位指针;第二输出控制单元,用于接收写移位指令,并根据写移位指令生成第二输出指针。
其中,第二输入控制单元包括:第三数据接收子单元,用于接收写命令,当接收到写命令,第三数据接收子单元用于生成第二指针生成命令;第二写入指针生成子单元,用于接收第二指针生成命令,并基于第二指针生成命令生成第二写入指针,第二写入指针用于指示将写入地址存入第二缓存模块;数据获取子单元,用于接收掩码写指令,并基于掩码写指令生成待定位指针。
其中,第二输出控制单元包括:第四数据接收子单元,用于接收写移位指令,当接收到写移位指令,第四数据接收子单元用于生成第二指针输出命令;第二输出指针生成子单元,用于接收第二指针输出命令,并基于第二指针输出命令生成第二输出指针,第二输出指针用于指示第二缓存模块输出写入地址。
其中,第二缓存模块包括:第一缓存单元,用于缓存写入地址;第一驱动单元,连接第一缓存单元,用于接收第二输出指针,并根据第二输出指针导通,以依次输出第一缓存单元缓存的写入地址;第二驱动单元,连接第一缓存单元,用于接收定位指针,并根据定位指针导通,以选择输出第一缓存单元缓存的写入地址;第一锁存单元,连接第一驱动单元和第二驱动单元,用于保持第一驱动单元的输出电压或第二驱动单元的输出电平。
其中,第一缓存单元包括:多个第一D触发器,每个第一D触发器用于存储预设宽度的写入地址。
其中,第一驱动单元包括:第一驱动器,输入端连接第一缓存单元,输出端连接第一锁存单元;接收子单元,连接控制模块,用于接收第二输出指针,并基于第二输出指针导通第一驱动器。
其中,第一锁存单元包括:第一反相器和第二反相器,其中,第一反相器的输出端连接第二反相器的输入端,第二反相器的输出端连接第一反相器的输入端。
其中,第一缓存模块包括:第二缓存单元,用于缓存待定位指针;第三驱动单元,连接第二缓存单元,用于接收第一输出指针,并用于根据第一输出指针导通,以输出第二缓存单元缓存的待定位指针;第二锁存单元,连接第三驱动单元,用于保持第三驱动单元的输出电平。
其中,第二缓存单元包括:多个第二D触发器,每个第二D触发器用于存储预设宽度的输出指针。
本公开的第二方面提供了一种数据写入方法,应用于如第一方面所述的写入缓存电路,包括:基于写命令,将写命令对应的写入地址写入第二缓存模块,写命令为写指令和掩码写指令中的一者;基于掩码写指令,将待定位指针写入第一缓存模块,待定位指针用于指示基于掩码写指令写入第二缓存模块的写入地址;基于写移位指令,依次读出第二缓存模块中存储的写入地址,或基于掩码写移位指令,通过第一缓存模块中的待定位指针选择读出第二缓存模块中存储的写入地址。
其中,基于写移动指令,依次读出第二缓存模块中存储的写入地址,包括:基于写移位指令获取第二输出指针,基于第二输出指针,依次读出第二缓存模块中存 储的写入地址。
其中,基于掩码写移位指令,通过第一缓存模块中的待定位指针选择读出第二缓存模块中存储的写入地址,包括:基于掩码写移位指令获取第一输出指针,基于第一输出指针,依次读出定位指针,定位指针为第一缓存模块中存储的待定位指针,基于定位指针,选择读出第二缓存模块中存储的写入地址。
本公开的第三方面提供了一种存储器,包括如第一方面所述的写入缓存电路
本公开实施例所提供的写入缓存电路、数据写入方法及存储器中,无论是对于写入操作,还是掩码写入操作,所需缓存的地址都存储在第二缓存模块中,而第一缓存模块中用于存储掩码写入所需的地址在第二缓存模块中的位置;相比于写入操作独立于掩码写入操作的方式,本公开提供的写入缓存电路通过将写入操作和掩码写入操作的数据都存放在一个存储空间,从而节省了一个存储空间;另外,新增用于存储掩码写入操作对应地址的位置存储空间,位置存储空间存储的数据条数不大于用于存储写入地址的数据条数。即新增存储空间的容量小于节省的存储空间的容量,从而减小了写入缓存电路在实际应用中的版图面积。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
并入到说明书中并且构成说明书的一部分的附图示出了本公开的实施例,并且与描述一起用于解释本公开实施例的原理。在这些附图中,类似的附图标记用于表示类似的要素。下面描述中的附图是本公开的一些实施例,而不是全部实施例。对于本领域技术人员来讲,在不付出创造性劳动的前提下,可以根据这些附图获得其他的附图。
图1~图3为本公开一实施例提供的写入缓存电路的结构示意图;
图4为本公开一实施例提供的第二缓存模块的接收示意图;
图5为本公开一实施例提供的第一缓存模块的接收示意图。
具体实施方式
下面将结合本公开实施例中的附图,对公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互任意组合。
对于不同的写入模式,采用不同存储单元来存储写入地址,以确保不同写入模式之间相互独立运行,互不影响,但不同的写入模式需要设置不同的存储单元,极大增加了存储器写入电路的面积,不符合当前存储器的发展趋势。
本公开一实施例提供了一种写入缓存电路,用于整合写入操作和掩码写入操作所需的写入地址存储空间,以减小写入电路在实际应用中的版图面积。
本领域的普通技术人员可以理解,在本公开各实施例中,为了使读者更好地理解本公开而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本公开所要求保护的技术方案。
图1~图3为本实施例提供的写入缓存电路的结构示意图,图4为本实施例提供的第二缓存模块的接收示意图,图5为本实施例提供的第一缓存模块的接收示意图,以下结合附图对本实施例提供的写入缓存电路作进一步详细说明,具体如下:
参考图1,写入缓存电路100,包括:第一缓存模块101、第二缓存模块102和控制模块103,其中,第二缓存模块102用于存储数据地址,第一缓存模块101用于存储指针。
控制模块103,被配置为,基于掩码写指令MaskWrite生成第一写入指针CntIn1<C:0>和待定位指针Cnt<E:0>,基于写命令生成第二写入指针CntIn2<A:0>,基于掩码写移位指令MaskWriteShift生成第一输出指针FifoOut1<D:0>,基于写移位指令WriteShift生成第二输出指针FifoOut2<B:0>。
其中,写命令为写指令Write和掩码写指令MaskWrite中的一者,即写命令包括写指令Write和掩码写指令MaskWrite,即无论是接收写指令Write或接收掩码写指令MaskWrite,控制模块103都会产生第二写入指针CntIn2<A:0>,待定位指针Cnt<E:0>与基于掩码写指令生成的第二写入指针CntIn2<A:0>对应于同一写入地址Address。
对于上述提到的各特征,其中,写指令Write和掩码写指令MaskWrite用于将对应的写入地址Address缓存,写移位指令WriteShift和掩码写移位指令MaskWriteShift用于将缓存的写入地址Address输出,以使得存储器基于写入地址Address完成数据的写入。
第二写入指针CntIn2<A:0>用于指示,写指令Write和掩码写指令MaskWrite所需写入的写入地址Address的存储空间,第二输出指针FifoOut2<B:0>用于指示,写移位指令WriteShift所需输出的写入地址Address的存储空间,第一写入指针CntIn1<C:0>用于指示,掩码写指令MaskWrite所需写入指针的存储空间,第一输出指针FifoOut1<D:0>用于指示,掩码写移位指令MaskWriteShift所需输出指针的存储空间,第一写入指针CntIn1<C:0>写入的指针即待定位指针Cnt<E:0>,第一输出指针FifoOut1<D:0>输出的指针即定位指针Out0<F:0>,待定位指针Cnt<E:0>用于指示掩码写指令MaskWrite所需写入的写入地址Address的存储空间,定位指针Out0<F:0>用于指示掩码写移位指令MaskWriteShift输出的写入地址Address的存储空间。
第一缓存模块101,被配置为,采用队列的形式缓存数据,例如采用先入先出队列,并基于第一写入指针CntIn1<C:0>缓存待定位指针Cnt<E:0>,并基于第一输出指针FifoOut1<D:0>输出定位指针Out0<F:0>。
其中,定位指针Out0<F:0>为第一缓存模块101缓存的待定位指针Cnt<E:0>,即定位指针Out0<F:0>的数据与相应的待定位指针Cnt<E:0>的数据相同;定位指针Out0<F:0>用于指示第二缓存模块102输出根据掩码写指令生成的第二写入指针CntIn2<A:0>写入的写入地址Address。
第二缓存模块102,被配置为,采用队列的形式缓存数据,例如采用先入先出队列,并基于第二写入指针CntIn2<A:0>缓存写入地址Address,并基于第二输出指针FifoOut2<B:0>或定位指针Out0<F:0>输出缓存的写入地址Address。
其中,基于写移位指令WriteShift输出的地址为真实写入地址WriteAddress,基于掩码写移位指令MaskWriteShift输出的地址为真实掩码写入地址MaskWriteAddress,真实写入地址WriteAddress和真实掩码写入地址MaskWriteAddress用于指示存储器的写入地址。
需要说明的是,上述“A”、“B”、“C”、“D”、“E”和“F”用于表征各指针对应的二进制位置,在具体应用中可以根据所应用的存储器类型进行设定,本实施例并不构成对这一数据的限定。
假设写指令与掩码写指令同时输入控制模块103,生成第二写入指针CntIn2<A:0>,第二缓存模块依次写入有8个地址数据,分别是数据1、数据2、数据3、数据4、数据5、数据6、数据7和数据8;继续假设数据1、数据3和数据5需要为掩码写入,此时,第二写入指针CntIn2<A:0>用于将数据1~数据8写入第二缓存模块102,且在写入数据1、数据3和数据5时,生成与第二写入指针CntIn2<A:0>指示相同存储空间的待定位指针Cnt<E:0>,第一写入指针CntIn1<C:0>用于将待定位指针Cnt<E:0>写入第一缓存模块101。
在基于写移位指令WriteShift进行读出时,基于第二输出指针FifoOut2<B:0>依次读出第二缓存模块102中缓存的数据,即数据1~数据8;在基于掩码写移位指令MaskWriteShift进行读出时,基于第一输出指针FifoOut1<D:0>一次读出定位指针Out0<F:0>,再根据定位指针选择读出数据1、数据3和数据5。
根据上述分析可知,无论是对于写入操作,还是掩码写入操作,所需缓存的地址都存储在第二缓存模块102中,而第一缓存模块101中用于存储掩码写入所需的地址在第二缓存模块102中的位置;相比于写入操作独立于掩码写入操作的方式,本公开提供的写入缓存电路通过将写入操作和掩码写入操作的数据都存放在一个存储空间,从而节省了一个存储空间;
另外,新增用于存储掩码写入操作对应地址的位置存储空间,位置存储空间存储的数据条数不大于用于存储写入地址的数据条数(其原因在于:存储写入地址的数据包括写入数据和掩码写入数据,对于极端情况而言,写入数据全部为掩码写入数据,此时位置存储空间存储的数据条数才等于地址存储空间所存储的数据条数,而对于正常的掩码写入操作,掩码写入数据的条数小于写入数据的条数,即所需位置存储空间小于所需数据存储空间)。即新增存储空间的容量小于节省的存储空间的容量,从而减小了写入缓存电路在实际应用中的版图面积。
在一个例子中,第一缓存模块101的深度小于第二缓存模块102的深度,通过设置位置存储空间存储的数据条数小于地址存储空间存储的数据条数,以减小写入缓存电路在实际应用中的版图面积。
参考图2并结合图1,在一些实施例中,控制模块103(参考图1)包括:第一控制子模块113和第二控制子模块123。
第一控制子模块113,被配置为,基于掩码写指令MaskWrite生成第一写入指针CntIn1<C:0>,并基于掩码写移位指令WriteShift生成第一输出指针FifoOut1<D:0>;第二控制子模块123,被配置为,基于写命令生成第二写入指针CntIn2<A:0>,并基于写移位指令WriteShift生成第二输出指针FifoOut2<B:0>,还基于掩码写指令MaskWrite生成待定位指针Cnt<E:0>。即第一控制子模块113用于控制第一缓存模块101存储待定位指针Cnt<E:0>,并控制第一缓存模块101输出定位指针Out0<F:0>;第二控制子模块123用于控制第二缓存模块102存储写入地址Address,并控制第二缓存模块102输出真实写入地址WriteAddress或真实掩码写入地址MaskWriteAddress。
参考图3并且结合图2,在一些实施例中,第一控制子模块113包括:第一输入控制单元201和第一输出控制单元301。
其中,第一输入控制单元201,用于接收掩码写指令MaskWrite,并根据掩码写指令MaskWrite生成第一写入指针CntIn1<C:0>;第一输出控制单元301,用于接收掩码写移位指令MaskWriteShift,并根据掩码写移位指令MaskWriteShift生成第一输出指针FifoOut1<D:0>。
在一些实施例中,参考图3,第一输入控制单元201包括:第一数据接收子单元202和第一写入指针生成子单元203。
其中,第一数据接收子单元202,用于接收掩码写指令MaskWrite,当接收到掩码写指令MaskWrite,第一数据接收子单元202用于生成第一指针生成命令;第一写入指针生成子单元203,用于接收第一指针生成命令,并基于第一指针生成命令生成第一写入指针CntIn1<C:0>,第一写入指针CntIn1<C:0>用于指示将待定位指针Cnt<E:0>存入第一缓存模块101。
在一些实施例中,参考图3,第一输出控制单元301包括:第二数据接收子单元302和第一输出指针生成子单元303。
其中,第二数据接收子单元302,用于接收掩码写移位指令MaskWriteShift,当接收到掩码写移位指令MaskWriteShift,第二数据接收子单元302用于生成第一指针输出命令;第一输出指针生成子单元303,用于接收第一指针输出命令,并基于第一指针输出命令生成第一输出指针FifoOut1<D:0>,第一输出指针FifoOut1<D:0>用于指示第一缓存模块101输出定位指针Out0<F:0>。
参考图3并且结合图2,在一些实施例中,第二控制子模块123包括:第二输入控制单元401和第二输出控制单元501。
其中,第二输入控制单元401,用于接收写命令,并根据写命令生成第二写入指针CntIn2<A:0>,当写命令为掩码写指令MaskWrite,第二输入控制单元401根据掩码写指令MaskWrite生成待定位指针Cnt<E:0>;第二输出控制单元501,用于接收写移位指令WriteShift,并根据写移位指令WriteShift生成第二输出指针FifoOut2<B:0>。由于写命令包括写指令Write和掩码写指令MaskWrite,无论接收到写指令Write还是掩码写指令MaskWrite,第二输出控制单元501都需要生成第二写入指针CntIn2<A:0>,在一些实施例中,可以通过逻辑或门来接收写指令Write和掩码写指令MaskWrite,逻辑或门的输出端即输出上述写命令。
在一些实施例中,参考图3,第二输入控制单元401包括:第三数据接收子单元402、第二写入指针生成子单元403和数据获取子单元404。
其中,第三数据接收子单元402,用于接收写命令,当接收到写命令,第三数据接收子单元402用于生成第二指针生成命令;第二写入指针生成子单元403,用于接收第二指针生成命令,并基于第二指针生成命令生成第二写入指针CntIn2<A:0>,第二写入指针CntIn2<A:0>用于指示将写入地址Address存入第二缓存模块;数据获取子单元404,用于接收掩码写指令MaskWrite,并基于掩码写指令MaskWrite生成待定位指针Cnt<E:0>。
在一些实施例中,参考图3,第二输出控制单元501包括:第四数据接收子单元502和第二输出指针生成子单元503。
其中,第四数据接收子单元502,用于接收写移位指令WriteShift,当接收到写移位指令WriteShift,第四数据接收子单元502用于生成第二指针输出命令;第二输出指针生成子单元503,用于接收第二指针输出命令,并基于第二指针输出命令生成第二输出指针FifoOut2<B:0>,第二输出指针FifoOut2<B:0>用于指示第二缓存模块102输出写入地址Address。
第一数据接收子单元202、第二数据接收子单元302、第三数据接收子单元402和第四数据接收子单元502内设置有驱动时钟频率相同的计数器,用于实现第二缓存模块102的输入数据与输出数据保持一致的传输速率,实现数据的先入先出。
参考图4并结合图1~图3,第二缓存模块102(参考图1)包括:第一缓存单元601、第一驱动单元602、第二驱动单元603和第一锁存单元604。
其中,第一缓存单元601用于缓存写入地址Address;第一驱动单元602,连接第一缓存单元601,用于接收第二输出指针FifoOut2<B:0>,并根据第二输出指针FifoOut2<B:0>导通,以一次输出第一缓存单元601缓存的写入地址Address;第二驱动单元603,连接第一缓存单元601,用于接收定位指针Out0<F:0>,并根据定位指针Out0<F:0>导通,以选择输出第一缓存单元601缓存的写入地址Address;第一锁存单元604,连接第一驱动单元602和第二驱动单元603,用于保持第一驱动单元602的输出电压或第二驱动单元603的输出电压。结合上述对第二缓存模块102(参考图1)的描述可知,第一驱动单元602用于响应写移位指令WriteShift的输出,第二驱动单元603用于响应掩码写移位指令MaskWriteShift的输出。
在一个例子中,第一缓存单元601包括多个第一D触发器,每个第一D触发器 都用于存储预设宽度的写入地址Address,其中,写入地址Address的宽度根据所需存储的地址宽度进行限定,本公开实施例并不构成对第一D触发器存储宽度的限定。
在一些实施例中,每个第一D触发器都包括预设宽度个的子触发器,其中,每个子触发器都用于存储1bit的数据。
在一个例子中,第一驱动单元602包括:第一驱动器,输入端连接第一缓存单元601的输出端,输出端连接第一锁存单元604;第一接收子单元,连接控制模块103(参考图1),用于接收第二输出指针FifoOut2<B:0>,并基于第二输出指针FifoOut2<B:0>导通第一驱动器,第一驱动器在第二输出指针FifoOut2<B:0>的驱动下输出第一缓存单元601内的存储数据。
在一个例子中,第二驱动单元603包括:第二驱动器,输入端连接第一缓存单元601的输出端,输出端连接第一锁存单元604的输入端;第二接收子单元,连接控制模块103(参考图1),用于接收定位指针Out0<F:0>,并基于定位指针Out0<F:0>导通第二驱动器,第二驱动器在定位指针Out0<F:0>的驱动下输出第一缓存单元601内的存储数据。
第一锁存单元604用于缓存第一驱动单元602和第二驱动单元603输出的数据,在一个例子中,第一锁存单元604包括:第一反相器和第二反相器,其中,第一反相器的输出端连接第二反相器的输入端,第二反相器的输出端连接第一反相器的输入端,即通过两级反相器首尾相连以构成锁存器,在其他实施例中,也可以采用其他锁存器作为第一锁存单元。
参考图5并结合图1~图3,第一缓存模块101(参考图1)包括:第二缓存单元701、第三驱动单元702和第二锁存单元703。
其中,第二缓存单元701用于缓存待定位指针Cnt<E:0>;第三驱动单元702连接第二缓存单元701的输出端,用于接收第一输出指针FifoOut1<D:0>,并用于根据第一输出指针FifoOut1<D:0>导通,以输出第二缓存单元701缓存的待定位指针Cnt<E:0>;第二锁存单元703,连接第三驱动单元702,用于保持第三驱动单元702的输出电平。结合上述对第一缓存模块101(参考图1)的描述可知,第三驱动单元702用于响应掩码写移位指令MaskWriteShift,输出定位指针Out0<F:0>以控制第二缓存模块102输出真实掩码写入地址MaskWriteAddress。
在一个例子中,第二缓存单元701包括多个第二D触发器,每个第二D触发器都用于存储预设宽度的写入地址Address,其中,写入地址Address的宽度根据所需存储的地址宽度进行限定,本公开实施例并不构成对第二D触发器存储宽度的限定;示例性的,每个第二D触发器都包括预设宽度个的子触发器,每个子触发器都用于存储1bit的数据。
在一个例子中,第三驱动单元702包括:第三驱动器,输入端连接第二缓存单元701的输出端,输出端连接第二锁存单元703;第三接收子单元,连接控制模块103(参考图1),用于接收第一输出指针FifoOut1<D:0>,并基于第一输出指针FifoOut1<D:0>导通第三驱动器。
第二锁存单元703用于缓存第三驱动单元702输出的数据,在一个例子中,第二锁存单元703包括:第三反相器和第四反相器,其中,第三反相器的输出端连接第四反相器的输入端,第四反相器的输出端连接第三反相器的输入端,即通过两级反相器首尾相连以构成锁存器,在其他实施例中,也可以采用其他锁存器作为第二锁存单元。
本公开提供的写入缓存电路通过将写入操作和掩码写入操作的数据都存放在一个存储空间,从而节省了一个存储空间;另外,新增用于存储掩码写入操作对应地 址的位置存储空间,位置存储空间存储的数据条数不大于用于存储写入地址的数据条数(其原因在于:存储写入地址的数据包括写入数据和掩码写入数据,对于极端情况而言,写入数据全部为掩码写入数据,此时位置存储空间存储的数据条数才等于地址存储空间所存储的数据条数)。即新增存储空间的容量小于节省的存储空间的容量,从而减小了写入缓存电路在实际应用中的版图面积。
基于上述实施例提供的写入缓存电路,本公开另一实施例提供一种数据写入方法,包括以下步骤:
基于写命令,将写命令对应的写入地址写入第二缓存模块,写命令为写指令和掩码写指令中的一者。
基于掩码写指令,将待定位指针写入第一缓存模块,待定位指针用于指示基于掩码写指令写入第二缓存模块的写入地址。
基于写移位指令,依次读出第二缓存模块中存储的写入地址,或者基于掩码写移位指令,通过第一缓存模块中的待定位指针选择读出第二缓存模块中存储的写入地址。
在一些实施例中,基于写移动指令,依次读出第二缓存模块中存储的写入地址,包括:基于写移位指令获取第二输出指针,基于第二输出指针,依次读出第二缓存模块中存储的写入地址。
在一些实施例中,基于掩码写移位指令,通过第一缓存模块中的待定位指针选择读出第二缓存模块中存储的写入地址,包括:基于掩码写移位指令获取第一输出指针,基于第一输出指针,依次读出定位指针,定位指针为第一缓存模块中存储的待定位指针,基于定位指针,选择读出第二缓存模块中存储的写入地址。
需要说明的是,以上数据写入方法的描述,与上述写入缓存电路实施例的描述是类似的,具有同写入缓存电路实施例相似的有益效果,因此不做赘述。对于本公开实施例数据写入方法中未披露的技术细节,请参照本公开实施例中写入缓存电路的描述而理解。
本公开又一实施例还提供一种存储器,包括上述实施例提供的写入缓存电路。本工开所指的存储器包括但不限于动态随机存取存储器等,存储器采用上述实施例提供的写入缓存电路,以减小写入电路在实际应用中的版图面积。
在一些实施例中,存储器为动态随机存取存储器DRAM(Dynamic Random Access Memory)芯片,其中,动态随机存取存储器DRAM芯片的内存符合DDR2(Double Data Rate 2)内存规格。
在一些实施例中,存储器为动态随机存取存储器DRAM芯片,其中,动态随机存取存储器DRAM芯片的内存符合DDR3内存规格。
在一些实施例中,存储器为动态随机存取存储器DRAM芯片,其中,动态随机存取存储器DRAM芯片的内存符合DDR4内存规格。
在一些实施例中,存储器为动态随机存取存储器DRAM芯片,其中,动态随机存取存储器DRAM芯片的内存符合DDR5内存规格。
本说明书中各实施例或实施方式采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分相互参见即可。
在本说明书的描述中,参考术语“实施例”、“示例性的实施例”、“一些实施方式”、“示意性实施方式”、“示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施方式或示例中。
在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。
在本公开的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本公开和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本公开的限制。
可以理解的是,本公开所使用的术语“第一”、“第二”等可在本公开中用于描述各种结构,但这些结构不受这些术语的限制。这些术语仅用于将第一个结构与另一个结构区分。
在一个或多个附图中,相同的元件采用类似的附图标记来表示。为了清楚起见,附图中的多个部分没有按比例绘制。此外,可能未示出某些公知的部分。为了简明起见,可以在一幅图中描述经过数个步骤后获得的结构。在下文中描述了本公开的许多特定的细节,例如器件的结构、材料、尺寸、处理工艺和技术,以便更清楚地理解本公开。但正如本领域技术人员能够理解的那样,可以不按照这些特定的细节来实现本公开。
最后应说明的是:以上各实施例仅用以说明本公开的技术方案,而非对其限制;尽管参照前述各实施例对本公开进行了详细的说明,本领域技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本公开各实施例技术方案的范围。
工业实用性
本公开实施例所提供的一种写入缓存电路、数据写入方法及存储器中,写入缓存电路通过将写入操作和掩码写入操作的数据都存放在一个存储空间,从而节省了一个存储空间;另外,新增用于存储掩码写入操作对应地址的位置存储空间,位置存储空间存储的数据条数不大于用于存储写入地址的数据条数。即新增存储空间的容量小于节省的存储空间的容量,从而减小了写入缓存电路在实际应用中的版图面积。

Claims (19)

  1. 一种写入缓存电路,包括:
    控制模块,被配置为,基于掩码写指令生成第一写入指针和待定位指针,基于写命令生成第二写入指针,基于掩码写移位指令生成第一输出指针,基于写移位指令生成第二输出指针;其中,所述写命令为写指令和所述掩码写指令中的一者,所述待定位指针与基于所述掩码写指令生成的所述第二写入指针对应于同一写入地址;
    第一缓存模块,被配置为,采用队列的形式缓存数据,并基于所述第一写入指针缓存所述待定位指针,并基于所述第一输出指针输出定位指针;其中,所述定位指针为第一缓存模块缓存的所述待定位指针,用于指示第二缓存模块输出根据所述掩码写指令生成的所述第二写入指针写入的所述写入地址;
    所述第二缓存模块,被配置为,采用队列的形式缓存数据,并基于所述第二写入指针缓存所述写入地址,并基于所述第二输出指针或所述定位指针输出缓存的所述写入地址。
  2. 根据权利要求1所述的写入缓存电路,其中,所述第一缓存模块的深度小于所述第二缓存模块的深度。
  3. 根据权利要求1所述的写入缓存电路,其中,所述控制模块包括:
    第一控制子模块,被配置为,基于所述掩码写指令生成所述第一写入指针,基于所述掩码写移位指令生成所述第一输出指针;
    第二控制子模块,被配置为,基于所述写命令生成所述第二写入指针,基于所述写移位指令生成所述第二输出指针,还基于所述掩码写指令生成所述待定位指针。
  4. 根据权利要求3所述的写入缓存电路,其中,所述第一控制子模块包括:
    第一输入控制单元,用于接收所述掩码写指令,并根据所述掩码写指令生成所述第一写入指针;
    第一输出控制单元,用于接收所述掩码写移位指令,并根据所述掩码写移位指令生成所述第一输出指针。
  5. 根据权利要求4所述的写入缓存电路,其中,所述第一输入控制单元包括:
    第一数据接收子单元,用于接收所述掩码写指令,当接收到所述掩码写指令,所述第一数据接收子单元用于生成第一指针生成命令;
    第一写入指针生成子单元,用于接收所述第一指针生成命令,并基于所述第一指针生成命令生成所述第一写入指针,所述第一写入指针用于指示将所述待定位指针存入所述第一缓存模块。
  6. 根据权利要求4所述的写入缓存电路,其中,所述第一输出控制单元包括:
    第二数据接收子单元,用于接收所述掩码写移位指令,当接收到所述掩码写移位指令,所述第二数据接收子单元用于生成第一指针输出命令;
    第一输出指针生成子单元,用于接收所述第一指针输出命令,并基于所述第一指针输出命令生成所述第一输出指针,所述第一输出指针用于指示所述第一缓存模块输出所述定位指针。
  7. 根据权利要求3所述的写入缓存电路,其中,所述第二控制子模块包括:
    第二输入控制单元,用于接收所述写命令,并根据所述写命令生成所述第二写入指针,当所述写命令为所述掩码写指令,所述第二输入控制单元根据所述掩码写指令生成所述待定位指针;
    第二输出控制单元,用于接收所述写移位指令,并根据所述写移位指令生成所述第二输出指针。
  8. 根据权利要求7所述的写入缓存电路,其中,所述第二输入控制单元包括:
    第三数据接收子单元,用于接收所述写命令,当接收到所述写命令,所述第三数据接收子单元用于生成第二指针生成命令;
    第二写入指针生成子单元,用于接收所述第二指针生成命令,并基于所述第二指针生成命令生成所述第二写入指针,所述第二写入指针用于指示将所述写入地址存入所述第二缓存模块;
    数据获取子单元,用于接收所述掩码写指令,并基于所述掩码写指令生成所述待定位指针。
  9. 根据权利要求7所述的写入缓存电路,其中,所述第二输出控制单元包括:
    第四数据接收子单元,用于接收所述写移位指令,当接收到所述写移位指令,所述第四数据接收子单元用于生成第二指针输出命令;
    第二输出指针生成子单元,用于接收所述第二指针输出命令,并基于所述第二指针输出命令生成所述第二输出指针,所述第二输出指针用于指示所述第二缓存模块输出所述写入地址。
  10. 根据权利要求1所述的写入缓存电路,其中,所述第二缓存模块包括:
    第一缓存单元,用于缓存所述写入地址;
    第一驱动单元,连接所述第一缓存单元,用于接收所述第二输出指针,并根据所述第二输出指针导通,以依次输出所述第一缓存单元缓存的所述写入地址;
    第二驱动单元,连接所述第一缓存单元,用于接收所述定位指针,并根据所述定位指针导通,以选择输出所述第一缓存单元缓存的所述写入地址;
    第一锁存单元,连接所述第一驱动单元和所述第二驱动单元,用于保持所述第一驱动单元的输出电压或所述第二驱动单元的输出电平。
  11. 根据权利要求10所述的写入缓存电路,其中,所述第一缓存单元包括:多个第一D触发器,每个所述第一D触发器用于存储预设宽度的所述写入地址。
  12. 根据权利要求10所述的写入缓存电路,其中,所述第一驱动单元包括:
    第一驱动器,输入端连接所述第一缓存单元,输出端连接所述第一锁存单元;
    接收子单元,连接所述控制模块,用于接收所述第二输出指针,并基于所述第二输出指针导通所述第一驱动器。
  13. 根据权利要求10所述的写入缓存电路,其中,所述第一锁存单元包括:第一反相器和第二反相器,其中,所述第一反相器的输出端连接所述第二反相器的输入端,所述第二反相器的输出端连接所述第一反相器的输入端。
  14. 根据权利要求1所述的写入缓存电路,其中,所述第一缓存模块包括:
    第二缓存单元,用于缓存所述待定位指针;
    第三驱动单元,连接所述第二缓存单元,用于接收所述第一输出指针,并第三驱动单元用于根据所述第一输出指针导通,以输出所述第二缓存单元缓存的所述待定位指针;
    第二锁存单元,连接所述第三驱动单元,用于保持所述第三驱动单元的输出电平。
  15. 根据权利要求14所述的写入缓存电路,其中,所述第二缓存单元包括:多个第二D触发器,每个所述第二D触发器用于存储预设宽度的所述输出指针。
  16. 一种数据写入方法,应用于权利要求1~15任一项所述的写入缓存电路,包括:
    基于写命令,将所述写命令对应的写入地址写入第二缓存模块,所述写命令为写指令和掩码写指令中的一者;
    基于所述掩码写指令,将待定位指针写入第一缓存模块,所述待定位指针用于指示基于所述掩码写指令写入所述第二缓存模块的所述写入地址;
    基于写移位指令,依次读出所述第二缓存模块中存储的所述写入地址,或基于掩码写移位指令,通过所述第一缓存模块中的所述待定位指针选择读出所述第二缓存模块中存储的所述写入地址。
  17. 根据权利要求16所述的数据写入方法,其中,所述基于写移动指令,依次读出所述第二缓存模块中存储的所述写入地址,包括:基于所述写移位指令获取第二输出指针,基于所述第二输出指针,依次读出所述第二缓存模块中存储的所述写入地址。
  18. 根据权利要求16所述的数据写入方法,其中,所述基于掩码写移位指令,通过所述第一缓存模块中的所述待定位指针选择读出所述第二缓存模块中存储的所述写入地址,包括:基于掩码写移位指令获取第一输出指针,基于所述第一输出指针,依次读出定位指针,所述定位指针为所述第一缓存模块中存储的所述待定位指针,基于所述定位指针,选择读出所述第二缓存模块中存储的所述写入地址。
  19. 一种存储器,包括权利要求1~15任一项所述的写入缓存电路。
PCT/CN2022/101171 2021-10-18 2022-06-24 写入缓存电路、数据写入方法和存储器 WO2023065706A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111210536.2 2021-10-18
CN202111210536.2A CN115994102A (zh) 2021-10-18 2021-10-18 写入缓存电路、数据写入方法和存储器

Publications (1)

Publication Number Publication Date
WO2023065706A1 true WO2023065706A1 (zh) 2023-04-27

Family

ID=85992785

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/101171 WO2023065706A1 (zh) 2021-10-18 2022-06-24 写入缓存电路、数据写入方法和存储器

Country Status (2)

Country Link
CN (1) CN115994102A (zh)
WO (1) WO2023065706A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056060A1 (en) * 2001-09-17 2003-03-20 Seagate Technology Llc Adaptive bi-directional write skip masks in a data storage device
CN101840383A (zh) * 2010-04-28 2010-09-22 中国科学院自动化研究所 支持连续/离散地址多数据并行访问的可配置存储器结构
CN104375946A (zh) * 2013-08-16 2015-02-25 华为技术有限公司 一种数据处理的方法及装置
CN104461964A (zh) * 2014-12-12 2015-03-25 杭州华澜微科技有限公司 一种存储装置
WO2019010703A1 (zh) * 2017-07-14 2019-01-17 华为技术有限公司 读、部分写数据方法以及相关装置
CN113326020A (zh) * 2020-02-28 2021-08-31 北京百度网讯科技有限公司 缓存器件、缓存器、系统、数据处理方法、装置及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030056060A1 (en) * 2001-09-17 2003-03-20 Seagate Technology Llc Adaptive bi-directional write skip masks in a data storage device
CN101840383A (zh) * 2010-04-28 2010-09-22 中国科学院自动化研究所 支持连续/离散地址多数据并行访问的可配置存储器结构
CN104375946A (zh) * 2013-08-16 2015-02-25 华为技术有限公司 一种数据处理的方法及装置
CN104461964A (zh) * 2014-12-12 2015-03-25 杭州华澜微科技有限公司 一种存储装置
WO2019010703A1 (zh) * 2017-07-14 2019-01-17 华为技术有限公司 读、部分写数据方法以及相关装置
CN113326020A (zh) * 2020-02-28 2021-08-31 北京百度网讯科技有限公司 缓存器件、缓存器、系统、数据处理方法、装置及介质

Also Published As

Publication number Publication date
CN115994102A (zh) 2023-04-21

Similar Documents

Publication Publication Date Title
US6466511B2 (en) Semiconductor memory having double data rate transfer technique
US5726947A (en) Synchronous semiconductor memory device suitable for graphic data processing
US5241222A (en) Dram interface adapter circuit
US11209999B2 (en) Memory controller and method capable of using different storing modes to store data units having different data sizes
JP2002216479A (ja) クワッドデータレートシンクロナス半導体メモリ装置の駆動方法及び駆動回路
CN110838310B (zh) 半导体存储器设备
WO2023065706A1 (zh) 写入缓存电路、数据写入方法和存储器
US20210312974A1 (en) Semiconductor devices
US6178139B1 (en) Semiconductor memory device comprised of a double data rate-synchronous dynamic random access memory
CN211125039U (zh) 写操作电路和半导体存储器
EP0337385A2 (en) Cache memory controller associated with a microprocessor
JP4004847B2 (ja) 連想メモリ装置
US11244709B2 (en) Write operation circuit, semiconductor memory, and write operation method
US11714645B2 (en) Write cache circuit, data write method, and memory
CN211125037U (zh) 写操作电路和半导体存储器
KR100472723B1 (ko) 뱅크 리프레쉬 제어 장치 및 방법
US20040153904A1 (en) [memory architecture and method for repairing a serial access memory]
US6014333A (en) Semiconductive memory device capable of carrying out a write-in operation at a high speed
KR100846394B1 (ko) 반도체 메모리장치
JP2010092528A (ja) 不揮発性半導体記憶装置
US7415590B2 (en) Integrated circuit having a memory cell array capable of simultaneously performing a data read operation and a data write operation
US8446789B2 (en) Global line sharing circuit of semiconductor memory device
US11895043B2 (en) Method for accessing system memory and associated processing circuit within a network card
US20230368824A1 (en) Semiconductor memory devices having efficient serializers therein for transferring data
JP5337247B2 (ja) 半導体記憶装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22882329

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022882329

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022882329

Country of ref document: EP

Effective date: 20240510