CN112131150A - Multi-chip external memory control method and device - Google Patents

Multi-chip external memory control method and device Download PDF

Info

Publication number
CN112131150A
CN112131150A CN202010967597.2A CN202010967597A CN112131150A CN 112131150 A CN112131150 A CN 112131150A CN 202010967597 A CN202010967597 A CN 202010967597A CN 112131150 A CN112131150 A CN 112131150A
Authority
CN
China
Prior art keywords
fifo
user interface
time sequence
data
write
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010967597.2A
Other languages
Chinese (zh)
Other versions
CN112131150B (en
Inventor
刘靖旻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shenzhou Feihang Technology Co ltd
Original Assignee
Beijing Shenzhou Feihang Technology Co ltd
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 Beijing Shenzhou Feihang Technology Co ltd filed Critical Beijing Shenzhou Feihang Technology Co ltd
Priority to CN202010967597.2A priority Critical patent/CN112131150B/en
Publication of CN112131150A publication Critical patent/CN112131150A/en
Application granted granted Critical
Publication of CN112131150B publication Critical patent/CN112131150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1694Configuration of memory controller to different memory types
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a method and a device for controlling a plurality of external memories, which are suitable for FPGA chips of Xilinx company and comprise the following steps: the user interface modules are composed of a command FIFO, a write data FIFO and a read data FIFO, and the control of a user program on the off-chip memories can be simplified into the control of the FIFOs in the user interface modules; the interface multiplexing module completes polling reading and writing and bit width comparison of a plurality of user interface modules; and the time sequence conversion module is used for completing the conversion between the FIFO time sequence and the MIG time sequence (an IP core used for controlling an off-chip memory in the FPGA of Xilinx company). The invention can avoid the complex interface time sequence of the MIG IP core directly operated by the user to a certain extent, and can complete the control of a plurality of off-chip memories only by operating the FIFO time sequence.

Description

Multi-chip external memory control method and device
Technical Field
The invention belongs to the field of electronic engineering and computer science, and particularly relates to a multi-chip external memory control method and device.
Background
An MIG (memory Interface Generator) IP core is provided by an FPGA manufacturer Xilinx for FPGA developers and is used for realizing access to off-chip memories, such as DDR2, DDR3 and the like. The MIG IP core itself provides two forms of user interface: native interface and AXI interface. The AXI interface has a form meeting international standards and complete functions, but because the AXI interface has more signals and more complex time sequence, the design progress is slowed down to a great extent in a design mode of manual coding; the Native interface is developed by Xilinx, and has the advantages of relatively less interface signals and relatively simple time sequence, but cannot adapt to the data bit width of user logic, cannot perform complete data Burst transmission operation, and does not have the control capability of a plurality of user programs on a plurality of off-chip memories. That is, when the user interface function of the IP core is complete, the interface form is complex; when the form of the user interface is relatively simple, the interface function is not complete.
Disclosure of Invention
The invention provides a method and a device for controlling a plurality of off-chip memories, aiming at solving the technical problems, and the method and the device comprise a user interface module, an interface multiplexing module and a time sequence conversion module, can avoid the situation that a user directly operates the MIG IP core complex interface time sequence to a certain extent, and can complete the control of the plurality of off-chip memories only by operating FIFO time sequence.
The technical problem to be solved by the invention is realized by adopting the following technical scheme: an apparatus for controlling an off-chip memory, comprising:
(1) the user interface module comprises a plurality of user interfaces, each user interface comprises a command FIFO, a write data FIFO and a read data FIFO, and the control of a user on a plurality of off-chip memories is simplified into the FIFO control in the user interfaces, and the user interface module specifically comprises the following steps:
each user interface of the off-chip memory to be controlled comprises three independent FIFOs, namely the command FIFO, the write data FIFO and the read data FIFO;
the command FIFO is used for storing a plurality of read-write commands of the user interface in sequence, including read commands, write commands, read-write byte length, bit width and target off-chip memory addresses;
the write data FIFO is used for storing the effective data which are to be written into the target off-chip memory by the user interface in sequence;
the read data FIFO is used for storing the effective data read by the user interface from the target off-chip memory in sequence;
(2) the interface multiplexing module is used for completing polling reading and writing, bit width comparison and sequential storage of a plurality of user interfaces, and specifically comprises:
a polling read-write module for completing polling read-write to a plurality of user interfaces, namely after completing the read-write to a certain user interface, an interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
a bit width comparison module for reading a bit width field in a command FIFO in the user interface, comparing a data bit width in a write data FIFO in the user interface with a bit width of a MIG IP core in the FPGA, namely supplementing 0 to the data in the write data FIFO when the data bit width in the write data FIFO in the user interface is less than the bit width of the MIG IP core;
the interface multiplexing module directly stores the data returned by the MIG IP core into the corresponding user interface read FIFO in sequence without bit width adjustment;
(3) the time sequence conversion module completes the conversion between the FIFO time sequence and the MIG IP core time sequence, and specifically comprises:
the device comprises a read time sequence conversion state machine module, a read time sequence conversion state machine module and a control interface module, wherein the read time sequence conversion state machine module is used for completing the conversion between an FIFO read time sequence and an MIG IP core read time sequence and realizing the data reading of an off-chip memory of a user interface based on the FIFO time sequence;
and the writing time sequence conversion state machine module is used for completing the conversion between the FIFO writing time sequence and the MIG IP core writing time sequence and realizing the data writing of the off-chip memory of the user interface based on the FIFO time sequence.
Furthermore, the multi-chip external memory control device is suitable for FPGA chips of Xilinx company.
According to another aspect of the present invention, there is provided a multi-chip external memory control method, including:
step one, for writing data to a target off-chip memory:
the method comprises the following steps that firstly, a user program respectively stores a write command and data to be written into a command FIFO and a write data FIFO in a user interface module, wherein the write command comprises a write command, a write byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
thirdly, the bit width comparison module in the interface multiplexing module reads a bit width field in a command FIFO in the user interface, compares the bit width of data in a write data FIFO in the user interface with the bit width of a MIG IP core in the FPGA according to the bit width of the MIG IP core in the FPGA, namely, when the bit width of the data in the write data FIFO in the user interface is smaller than the bit width of the MIG IP core, the data in the write data FIFO is compensated with 0 in a high position;
a write time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO write time sequence and the MIG IP core write time sequence, and realizes the data write-in of the off-chip memory of the user interface based on the FIFO time sequence;
step two, for reading data from the target off-chip memory:
firstly, a user program stores a read command into a command FIFO in a user interface module, wherein the read command comprises a read command, a read byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
the data returned by the MIG IP core is directly and sequentially stored in the corresponding user interface read FIFO by the sequential storage module in the interface multiplexing module without bit width adjustment;
and fourthly, a reading time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO reading time sequence and the MIG IP core reading time sequence, and the data reading of the off-chip memory of the user interface based on the FIFO time sequence is realized.
Furthermore, the multi-chip external memory control method is suitable for FPGA chips of Xilinx company.
Has the advantages that:
compared with the prior art, the invention has the advantages that: the method can solve the contradiction between the simple form of the MIG IP core user interface and the completeness of the interface function to a certain extent, avoid the complicated interface time sequence of the MIG IP core directly operated by a user, and can complete the control of a plurality of off-chip memories only by operating the FIFO time sequence.
Drawings
FIG. 1 is a block diagram of the apparatus of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments, and all other embodiments obtained by a person skilled in the art based on the embodiments of the present invention belong to the protection scope of the present invention without creative efforts.
The invention relates to a control method of a multi-chip external memory, which can solve the contradiction between the simple form of a MIG IP core user interface and the completeness of interface functions to a certain extent, avoid the complicated interface time sequence of the MIG IP core directly operated by a user and complete the control of the multi-chip external memory only by operating FIFO time sequence.
According to an embodiment of the present invention, as shown in fig. 1, a block diagram of a control apparatus for a multi-chip external memory is provided, which includes a user interface module, an interface multiplexing module, and a timing conversion module, and specifically includes:
(1) the user interface module comprises a plurality of user interfaces, each user interface consists of a command FIFO, a write data FIFO and a read data FIFO, and the control of a user program on a plurality of off-chip memories can be simplified into the FIFO control in the user interfaces, and the specific implementation is as follows:
designing three independent FIFOs (namely a command FIFO, a write data FIFO and a read data FIFO) aiming at a user interface (a plurality of user interfaces can be operated in parallel in one FPGA) of each off-chip memory to be controlled;
the command FIFO sequentially stores a plurality of read-write commands of the user interface, including read commands, write commands, read-write byte length, bit width and target off-chip memory addresses;
writing data FIFO sequentially storing the effective data which are to be written into the target off-chip memory by the user interface;
the reading data FIFO stores the effective data read by the user interface from the target off-chip memory in sequence;
(2) designing an interface multiplexing module which completes polling reading and writing and bit width comparison of a plurality of user interfaces, wherein a bit width field in the user interface module is less than or equal to the bit width of an MIG IP core, and the specific implementation is as follows:
firstly, the interface multiplexing module completes polling read-write to a plurality of user interfaces, namely after completing the read-write to a certain user interface, the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
secondly, the interface multiplexing module reads a bit width field in a command FIFO in the user interface, compares the bit width of data in a write data FIFO in the user interface with the bit width of a MIG IP core in the FPGA according to the bit width of the MIG IP core in the FPGA, namely, when the bit width of the data in the write data FIFO in the user interface is smaller than the bit width of the MIG IP core, the data in the write data FIFO is compensated with 0 in a high position;
the interface multiplexing module directly stores the data returned by the MIG IP core into the corresponding user interface read FIFO in sequence without bit width adjustment;
(3) designing a time sequence conversion module, wherein the module completes the conversion between the FIFO time sequence and the MIG time sequence (an IP core used for controlling an off-chip memory in FPGA of Xilinx company), and the specific implementation is as follows:
firstly, a programming state machine completes the conversion between an FIFO (first in first out) reading time sequence and an MIG (Metal inert gas) reading time sequence, and realizes the data reading of an off-chip memory of a user interface based on the FIFO time sequence;
and secondly, the writing state machine completes the conversion between the FIFO writing time sequence and the MIG writing time sequence, and realizes the data writing of the off-chip memory of the user interface based on the FIFO time sequence.
According to another embodiment of the present invention, a method for controlling a multi-chip external memory is further provided, including the steps of:
step one, for writing data to a target off-chip memory:
the method comprises the following steps that firstly, a user program respectively stores a write command and data to be written into a command FIFO and a write data FIFO in a user interface module, wherein the write command comprises a write command, a write byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
thirdly, the bit width comparison module in the interface multiplexing module reads a bit width field in a command FIFO in the user interface, compares the bit width of data in a write data FIFO in the user interface with the bit width of a MIG IP core in the FPGA according to the bit width of the MIG IP core in the FPGA, namely, when the bit width of the data in the write data FIFO in the user interface is smaller than the bit width of the MIG IP core, the data in the write data FIFO is compensated with 0 in a high position;
a write time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO write time sequence and the MIG IP core write time sequence, and realizes the data write-in of the off-chip memory of the user interface based on the FIFO time sequence;
step two, for reading data from the target off-chip memory:
firstly, a user program stores a read command into a command FIFO in a user interface module, wherein the read command comprises a read command, a read byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
the data returned by the MIG IP core is directly and sequentially stored in the corresponding user interface read FIFO by the sequential storage module in the interface multiplexing module without bit width adjustment;
and fourthly, a reading time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO reading time sequence and the MIG IP core reading time sequence, and the data reading of the off-chip memory of the user interface based on the FIFO time sequence is realized.
In summary, the present invention discloses a method and an apparatus for controlling a plurality of external storage devices, which includes designing a user interface module, an interface multiplexing module and a timing conversion module, and can solve the contradiction between the simple user interface form and the completeness of interface function of a MIG IP core to a certain extent, and avoid the user from directly operating the complex interface timing of the MIG IP core, and can complete the control of the plurality of external storage devices only by operating a FIFO timing.
Those skilled in the art will appreciate that the invention may be practiced without these specific details.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (4)

1. A multi-chip external memory control apparatus, comprising:
(1) the user interface module comprises a plurality of user interfaces, each user interface comprises a command FIFO, a write data FIFO and a read data FIFO, and the control of a user on a plurality of off-chip memories is simplified into the FIFO control in the user interfaces, and the user interface module specifically comprises the following steps:
each user interface of the off-chip memory to be controlled comprises three independent FIFOs, namely the command FIFO, the write data FIFO and the read data FIFO;
the command FIFO is used for storing a plurality of read-write commands of the user interface in sequence, including read commands, write commands, read-write byte length, bit width and target off-chip memory addresses;
the write data FIFO is used for storing the effective data which are to be written into the target off-chip memory by the user interface in sequence;
the read data FIFO is used for storing the effective data read by the user interface from the target off-chip memory in sequence;
(2) the interface multiplexing module is used for completing polling reading and writing, bit width comparison and sequential storage of a plurality of user interfaces, and specifically comprises:
a polling read-write module for completing polling read-write to a plurality of user interfaces, namely after completing the read-write to a certain user interface, an interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
a bit width comparison module for reading a bit width field in a command FIFO in the user interface, comparing a data bit width in a write data FIFO in the user interface with a bit width of a MIG IP core in the FPGA, namely supplementing 0 to the data in the write data FIFO when the data bit width in the write data FIFO in the user interface is less than the bit width of the MIG IP core;
the interface multiplexing module directly stores the data returned by the MIG IP core into the corresponding user interface read FIFO in sequence without bit width adjustment;
(3) the time sequence conversion module completes the conversion between the FIFO time sequence and the MIG IP core time sequence, and specifically comprises:
the device comprises a read time sequence conversion state machine module, a read time sequence conversion state machine module and a control interface module, wherein the read time sequence conversion state machine module is used for completing the conversion between an FIFO read time sequence and an MIG IP core read time sequence and realizing the data reading of an off-chip memory of a user interface based on the FIFO time sequence;
and the writing time sequence conversion state machine module is used for completing the conversion between the FIFO writing time sequence and the MIG IP core writing time sequence and realizing the data writing of the off-chip memory of the user interface based on the FIFO time sequence.
2. The multi-chip off-chip memory control device of claim 1, adapted for use with Xilinx FPGA chips.
3. A multi-chip external memory control method is characterized by comprising the following steps:
step one, for writing data to a target off-chip memory:
the method comprises the following steps that firstly, a user program respectively stores a write command and data to be written into a command FIFO and a write data FIFO in a user interface module, wherein the write command comprises a write command, a write byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
thirdly, the bit width comparison module in the interface multiplexing module reads a bit width field in a command FIFO in the user interface, compares the bit width of data in a write data FIFO in the user interface with the bit width of a MIG IP core in the FPGA according to the bit width of the MIG IP core in the FPGA, namely, when the bit width of the data in the write data FIFO in the user interface is smaller than the bit width of the MIG IP core, the data in the write data FIFO is compensated with 0 in a high position;
a write time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO write time sequence and the MIG IP core write time sequence, and realizes the data write-in of the off-chip memory of the user interface based on the FIFO time sequence;
step two, for reading data from the target off-chip memory:
firstly, a user program stores a read command into a command FIFO in a user interface module, wherein the read command comprises a read command, a read byte length, a bit width and a target off-chip memory address;
the polling read-write module in the interface multiplexing module finishes reading the user interface, and the interface multiplexing module points to the next user interface no matter whether the user interface has unprocessed tasks or not;
the data returned by the MIG IP core is directly and sequentially stored in the corresponding user interface read FIFO by the sequential storage module in the interface multiplexing module without bit width adjustment;
and fourthly, a reading time sequence conversion state machine module in the time sequence conversion module completes the conversion between the FIFO reading time sequence and the MIG IP core reading time sequence, and the data reading of the off-chip memory of the user interface based on the FIFO time sequence is realized.
4. The method as claimed in claim 3, wherein the device is suitable for Xilinx FPGA chip.
CN202010967597.2A 2020-09-15 2020-09-15 Multi-chip external memory control method and device Active CN112131150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010967597.2A CN112131150B (en) 2020-09-15 2020-09-15 Multi-chip external memory control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010967597.2A CN112131150B (en) 2020-09-15 2020-09-15 Multi-chip external memory control method and device

Publications (2)

Publication Number Publication Date
CN112131150A true CN112131150A (en) 2020-12-25
CN112131150B CN112131150B (en) 2023-10-03

Family

ID=73845766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010967597.2A Active CN112131150B (en) 2020-09-15 2020-09-15 Multi-chip external memory control method and device

Country Status (1)

Country Link
CN (1) CN112131150B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279309A (en) * 2013-05-15 2013-09-04 清华大学 DDR control device and method based on FPGA
US20180113826A1 (en) * 2015-06-06 2018-04-26 Huawei Technologies Co., Ltd. Storage apparatus accessed by using memory bus
CN108984280A (en) * 2017-06-05 2018-12-11 深圳市中兴微电子技术有限公司 A kind of management method and device, computer readable storage medium of chip external memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279309A (en) * 2013-05-15 2013-09-04 清华大学 DDR control device and method based on FPGA
US20180113826A1 (en) * 2015-06-06 2018-04-26 Huawei Technologies Co., Ltd. Storage apparatus accessed by using memory bus
CN108984280A (en) * 2017-06-05 2018-12-11 深圳市中兴微电子技术有限公司 A kind of management method and device, computer readable storage medium of chip external memory

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴连慧;周建江;夏伟杰;: "基于FPGA的DDR3多端口读写存储管理设计", 单片机与嵌入式系统应用, no. 01, pages 7881 *
王红兵;强景;周珍龙;: "Xilinx MIG IP核的研究及大容量数据缓冲区的实现", 电子产品世界, no. 08, pages 50 - 51 *

Also Published As

Publication number Publication date
CN112131150B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
US8225067B2 (en) Multilevel cell NAND flash memory storage system, and controller and access method thereof
US11347444B2 (en) Memory device for controlling operations according to different access units of memory
US8850119B2 (en) Operating memory with specified cache address
CN109062827B (en) Flash memory control device, flash memory control system, and flash memory control method
US7814264B2 (en) Memory card, semiconductor device, and method of controlling semiconductor memory
US6523755B2 (en) Semiconductor memory device
JP3875139B2 (en) Nonvolatile semiconductor memory device, data write control method thereof, and program
CN108563590A (en) OTP controller based on piece FLASH memory and control method
US8914602B2 (en) Display controller having an embedded non-volatile memory divided into a program code block and a data block and method for updating parameters of the same
US9104401B2 (en) Flash memory apparatus with serial interface and reset method thereof
CN115080471A (en) Nand flash interface controller based on FPGA and read-write method
CN106649137B (en) Nand Flash bad block management method and device and memory
US8151144B2 (en) Memory card, nonvolatile memory, controller, and method for managing writing errors for nonvolatile memories
CN112256203B (en) Writing method, device, equipment, medium and system of FLASH memory
US8151150B2 (en) Data storage device and method for writing test data to a memory
CN112131150A (en) Multi-chip external memory control method and device
US20060095692A1 (en) Programmable control interface device
JP2006031123A (en) Usb memory device and usb memory device control program
US20240168680A1 (en) Memory device including a plurality of planes
US20090043945A1 (en) Non-Volatile Memory System and Method for Reading Data Therefrom
KR100851849B1 (en) Portable Terminal and Data Reading and Wirting Method Thereof
CN115857805B (en) Artificial intelligence computable storage system
US20230326517A1 (en) Semiconductor apparatus and semiconductor system having lun selection cycle, and operating method of semiconductor system
CN100394403C (en) Limited processor storage access method, system and accessible storage unit
US10566062B2 (en) Memory device and method for operating the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant