WO2018157569A1 - Memory control method and device - Google Patents

Memory control method and device Download PDF

Info

Publication number
WO2018157569A1
WO2018157569A1 PCT/CN2017/099101 CN2017099101W WO2018157569A1 WO 2018157569 A1 WO2018157569 A1 WO 2018157569A1 CN 2017099101 W CN2017099101 W CN 2017099101W WO 2018157569 A1 WO2018157569 A1 WO 2018157569A1
Authority
WO
WIPO (PCT)
Prior art keywords
chip select
sdram
select signal
chip
signal
Prior art date
Application number
PCT/CN2017/099101
Other languages
French (fr)
Chinese (zh)
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 WO2018157569A1 publication Critical patent/WO2018157569A1/en

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
    • 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

Definitions

  • the present application relates to the field of storage technologies, and in particular, to a method and an apparatus for controlling a memory.
  • SDRAM Synchronous Dynamic Random Access Memory
  • the System On Chip (SOC) chip in the processor realizes access to the SDRAM by transmitting an access instruction conforming to the Joint Electron Device Engineering Council (JEDEC) protocol.
  • JEDEC Joint Electron Device Engineering Council
  • Whether the SDRAM performs the access execution after receiving the access instruction is mainly indicated by a Chip Select (CS) signal for enabling the SDRAM.
  • CS Chip Select
  • the chip select signal received by the SDRAM is valid, the SDRAM is enabled, and the SDRAM performs the received access command; when the chip select signal received by the SDRAM is invalid, the SDRAM does not execute the received access command.
  • a chip select signal can be used to enable SDRAM belonging to the same memory region (ie RANK). SDRAMs belonging to the same RANK can simultaneously execute access instructions and physically share address lines and control lines.
  • all SDRAMs are usually integrated on one side of the board when wiring on a Printed Circuit Board (also referred to as a single board).
  • the signal is selected to enable all of the SDRAM, i.e., the chip select signal is used to indicate whether the SDRAM is executing the received access command. Since the SDRAMs belonging to the same RANK physically share the address lines and the control lines, when the SDRAMs belonging to the same RANK are arranged on the same side of the board, the wiring difficulty is increased, and crosstalk or noise between the signals is also Causes a drop in signal quality.
  • the existing memory control method has the problems of high wiring difficulty and poor signal quality.
  • the present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
  • the present application provides a method for controlling a memory, the method comprising: generating an access instruction for two SDRAMs mirrored on both sides of a board according to an instruction requirement; generating two chip selections according to the access instruction a signal; causing at least one of the two chip select signals to be valid according to the mode parameter; outputting the access command and the first chip select signal to the first SDRAM of the two SDRAMs, and outputting the access command and the second chip select signal To the second SDRAM of the two SDRAMs.
  • the wiring manner is easier to implement when wiring the first SDRAM and the second SDRAM. This is because: by The first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board, and the first SDRAM and the second SDRAM can share the address signal link, and each SDRAM is separately routed on the single board in the prior art. Compared with the method, the wiring area and the number of wiring layers are reduced, thereby reducing the wiring difficulty. At the same time, since the number of wirings on the single board, the wiring area, and the number of wiring layers are reduced during wiring, the memory control method provided by the first aspect can reduce crosstalk and noise between signals due to single board wiring, and improve signals. quality.
  • At least one of the two chip select signals is valid according to the mode parameter, and the access command and the first chip select signal are output to the first SDRAM, the access command and The second chip select signal is output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately.
  • the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, so that the second SDRAM can be separately Executing the access instruction; when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter, thereby The first SDRAM and the second SDRAM are enabled to execute the access instruction at the same time.
  • the access instruction can be a Mode Register Set (MRS) instruction or a data read and write instruction.
  • MRS Mode Register Set
  • the mode parameter is used to indicate the validity of each of the two chip select signals.
  • the mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid.
  • the method may be implemented as follows: when the mode parameter is the first preset value (such as 01), the first chip is selected.
  • the signal is valid; when the mode parameter is the second preset value (such as 10), the second chip selection signal is valid; when the mode parameter is the third preset value (such as 00) or the fourth preset value (such as 11) , the first chip selection signal and the second chip selection signal are valid.
  • the mode parameter is the second preset value (such as 10)
  • the mode parameter is the third preset value (such as 00) or the fourth preset value (such as 11)
  • the first chip selection signal and the second chip selection signal are valid.
  • the board is further provided with at least one via, the first address signal link is communicatively coupled to the second address signal link on the second side of the board through the at least one via, and the second chip select signal passes through at least one
  • the via is in communication with the third chip select signal link on the second side of the board, and the first address signal link and the second address signal link together address the address signal pin of the SOC chip and the address signal of the second SDRAM
  • the pin communication connection, the second chip select signal link and the third chip select signal link together connect the second chip select signal pin of the SOC chip and the chip select signal pin of the second SDRAM.
  • the SOC chip includes: a processor, a dynamic memory controller, and a driver.
  • the processor is configured to generate an access instruction for the first SDRAM and the second SDRAM according to the instruction requirement;
  • the dynamic storage controller is configured to generate two chip select signals according to the access instruction, and select at least one of the two chip select signals according to the mode parameter The signal is valid;
  • the driver is configured to output the first chip select signal of the access command and the two chip select signals to the first SDRAM, and output the second chip select signal of the access command and the two chip select signals to the second SDRAM .
  • the first chip select signal is used to enable the first SDRAM
  • the second chip select signal is used to enable the second SDRAM
  • the mode parameter is used to indicate the validity of each chip select signal of the two chip select signals.
  • the SOC chip and the first SDRAM are fixed on the first side of the board, the second SDRAM is fixed on the second side of the board, and the address signal pin of the first SDRAM
  • the address signal pin of the SOC chip is communicatively connected through the first address signal link, the chip select signal pin of the first SDRAM, and the first chip select signal pin of the SOC chip are communicatively connected through the first chip select signal link;
  • the address signal pin of the two SDRAM and the address signal pin of the SOC chip are communicatively connected through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM, and the second chip select signal of the SOC chip.
  • the dynamic memory controller in the SOC chip validates at least one of the two chip select signals according to the mode parameter, and the driver in the SOC chip outputs the access command and the first chip select signal to the first SDRAM, The access command and the second chip select signal are output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately.
  • Accessing the instruction or, when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the second SDRAM available
  • the access instruction is executed separately; or, when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both indicated by the indication of the mode parameter. Effective so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
  • the access instruction can be an MRS instruction or a data read and write instruction.
  • the SOC chip can output the MRS instruction and the first slice to the first SDRAM Selecting a signal to control the first SDRAM to execute the MRS instruction, and controlling the second SDRAM to execute the MRS instruction by outputting the MRS instruction and the second chip selection signal to the second SDRAM; when the access instruction is a data read/write instruction, the SOC chip can pass The first SDRAM outputs a data read/write instruction and a first chip select signal to control the first SDRAM to execute the data read/write instruction, and controls the second SDRAM to perform the data read by outputting the data read/write instruction and the second chip select signal to the second SDRAM.
  • Write instructions when the access instruction is an MRS instruction, the SOC chip can output the MRS instruction and the first slice to the first SDRAM Selecting a signal to control the first SDRAM to execute the MRS instruction, and controlling the second SDRAM to execute the MRS instruction by outputting the MRS instruction and the second chip selection signal to the second SDRAM.
  • the mode parameter is used to indicate the validity of each of the two chip select signals.
  • the mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid.
  • the method may be implemented as follows: 01), the dynamic memory controller makes the first chip select signal valid; when the mode parameter is the second preset value (such as 10), the dynamic memory controller makes the second chip select signal valid; when the mode parameter is the third pre- When a value (such as 00) or a fourth preset value (such as 11) is set, the dynamic memory controller makes the first chip select signal and the second chip select signal valid.
  • the mode parameter is the second preset value (such as 10)
  • the dynamic memory controller makes the second chip select signal valid
  • the mode parameter is the third pre-
  • a value such as 00
  • a fourth preset value such as 11
  • the mode parameter may be set when the SOC chip is initialized, for example, the mode parameter is set to a sequence containing 2 bits at the time of initialization, that is, the value of the mode parameter may be 01, 10, 00, and 11.
  • the processor issues the configuration value of the mode parameter to the dynamic storage controller.
  • the processor re-issues the updated configuration value to the dynamic storage controller.
  • the processor configures the mode parameter to 01 according to the instruction requirement and delivers it to the dynamic storage controller; when the memory of the second aspect is controlled When the device controls the second SDRAM to execute the MRS instruction, the processor configures the mode parameter to 10 according to the instruction requirement and delivers the mode parameter to the dynamic storage controller.
  • the number of bits included in the mode parameter is not limited to two, as long as the mode parameter can cover the validity of the two chip select signals.
  • FIG. 1 is a schematic structural diagram of a SOC chip provided by the present application.
  • FIG. 2 is a schematic diagram of an arrangement of a first plurality of SDRAMs on a board provided by the present application
  • FIG. 3 is a schematic diagram of a second plurality of SDRAMs arranged on a single board according to the present application
  • FIG. 4 is a schematic structural diagram of a memory control device provided by the present application.
  • FIG. 5 is a schematic diagram of a third plurality of SDRAMs arranged on a single board according to the present application.
  • FIG. 6 is a schematic flow chart of a method for controlling a memory provided by the present application.
  • FIG. 7 is a schematic flowchart diagram of another method for controlling a memory provided by the present application.
  • the present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
  • the present application relates to a SOC chip accessing an SDRAM by transmitting an access instruction, and the SOC chip instructing the SDRAM whether to execute an access instruction received by itself by transmitting a chip select signal.
  • the chip select signal is used to enable the SDRAM. When the chip select signal received by the SDRAM is valid, the SDRAM receiving the chip select signal is enabled, and the SDRAM executes the access command received by itself, and receives the SDRAM. When the chip select signal is invalid, the SDRAM does not execute the access command received by itself.
  • the SOC chip may include a processor, a dynamic memory controller (DMC), and a driver.
  • the processor, the dynamic memory controller and the driver are interconnected by a bus, and the SOC chip realizes communication connection with a plurality of external SDRAMs through the driver, so that the SOC chip controls the plurality of SDRAMs by transmitting the access command and the chip select signal.
  • the processor is configured to generate an access instruction (such as a data read/write instruction, an MRS, etc.) according to the instruction requirement
  • the dynamic storage controller is configured to generate a chip selection signal according to the access instruction, and then send the access instruction and the chip selection signal to the SDRAM through the driver.
  • the chip select signal received by the SDRAM is valid, the SDRAM performs corresponding read and write operations and register configuration operations according to the received access command; when the chip select signal is invalid, the SDRAM does not execute the received access command.
  • a chip select signal can be used to enable multiple SDRAMs belonging to the same RANK.
  • the chip select signal is valid, the plurality of SDRAMs belonging to the same RANK execute the received access command; when the chip select signal is invalid, the plurality of SDRAMs belonging to the same RANK do not execute the received access command.
  • the plurality of SDRAMs belonging to the same RANK can simultaneously execute the access instruction sent by the SOC chip, and the plurality of SDRAMs share the address line and the control line.
  • a plurality of SDRAMs belonging to the same RANK are generally arranged on a single board: a plurality of SDRAMs are integrated on one side of the single board, and the SOC chip sends the same chip select signal to the plurality of SDRAMs, that is, by sending The chip select signal enables multiple SDRAMs.
  • Such a wiring manner can be as shown in FIG. 2.
  • a chip select signal is used to enable two SDRAMs.
  • the number of SDRAMs that can be used for one chip select signal is not limited to two.
  • A11 denotes an address signal pin for transmitting address information in the SDRAM
  • a communication link for connecting an address signal pin of the SOC chip and the SDRAM. Referring to the address signal link, the communication link connecting the SOC chip and the chip select signal pin of the SDRAM is called a chip select signal link.
  • the two SDRAMs and their connection relationship with the SOC chip can be as shown in FIG. 3.
  • the SDRAM of FIG. 3 fixed to the same side of the board as the SOC chip is referred to as a first SDRAM
  • the other SDRAM is referred to as a second SDRAM.
  • the wiring mode shown in FIG. 3 does not affect the execution result of the data read/write command. This is because: when the SOC chip sends a write command to write some data to the two SDRAMs, the address signal pin A11 of the SOC chip and the address signal pin A11 of the first SDRAM and the address signal of the second SDRAM are used. The pin A13 is connected, so that the SOC chip instructs the first SDRAM to write the data to the address A through the address signal pin A11, instructing the second SDRAM to write the data to the address B.
  • the present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
  • FIG. 4 is a schematic structural diagram of a control device for a memory provided by the present application.
  • the first address signal link is communicatively coupled to the second address signal link on the second side of the board 401 through the at least one via, and the second chip select signal is passed through the at least one via and the single A third chip select signal link on the second side of the board 401 is communicatively coupled.
  • the first address signal link and the second address signal link together form an address signal pin of the SOC chip 402 and an address signal pin of the second SDRAM 404.
  • Communication connection, second chip selection signal link and third chip selection signal Connecting the communication chip select signal pin 402 of the second sheet-SOC chip select signal pin and a second passage SDRAM404 together.
  • At least one chip select signal of the chip select signal is active; wherein a first chip select signal of the two chip select signals is used to enable the first SDRAM 403, and a second chip select signal of the two chip select signals is used for enabling a second SDRAM 404, the mode parameter is used to indicate the validity of each of the chip select signals; the driver 402c is configured to output the access command and the first chip select signal to the first SDRAM 403, and the access command and the second The chip select signal is output to the second SDRAM 404.
  • the SOC chip 402 and the first SDRAM 403 are fixed on the first side of the single board 401, and the second SDRAM 404 is fixed on the second side of the single board 401.
  • the address signal pin and the chip select signal pin need to be respectively connected with the address signal pin of the SOC chip 402 and the first chip select signal pin: the address signal pin and the SOC of the first SDRAM 403
  • the address signal pins of the chip 402 are communicatively coupled through the first address signal link, and the chip select signal pins of the first SDRAM 403 and the first chip select signal pins of the SOC chip 402 are communicatively coupled through the first chip select signal link;
  • the address signal pin and the chip select signal pin need to be respectively connected to the address signal pin and the second chip select signal pin of the SOC chip 402: the address signal pin of the second SDRAM 404 and the SOC chip.
  • the address signal pin of 402 passes through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM 404, and the second chip select signal of the SOC chip 402 pass the second chip select signal.
  • the link is in communication with the third chip select signal link.
  • the first SDRAM and the second SDRAM share the first address signal of the first side of the single board 401 a link, and when both the first chip select signal and the second chip select signal are valid, the access instruction and the first chip select signal are output to the first SDRAM through the SOC chip, and the access command and the second chip select are outputted to the second SDRAM
  • the signal realizes that the first SDRAM and the second SDRAM simultaneously execute the access instruction, that is, to simultaneously control the first SDRAM and the second SDRAM to execute the access instruction, and therefore, the first SDRAM and the second SDRAM belong to the same RANK.
  • a mode parameter is used to indicate the validity of each of the two chip select signals.
  • the mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid.
  • the dynamic storage controller 402b in the SOC chip 402 is enabled to enable at least one of the two chip select signals according to the mode parameter
  • the dynamic memory controller 402b can be implemented by: when the mode parameter is the first preset value.
  • the dynamic memory controller 402b makes the first chip select signal valid; when the mode parameter is the second preset value (such as 10), the dynamic memory controller 402b makes the second chip select signal valid; when the mode parameter
  • the dynamic memory controller 402b asserts the first chip select signal and the second chip select signal when it is a third preset value (such as 00) or a fourth preset value (such as 11).
  • a third preset value such as 00
  • a fourth preset value such as 11
  • the processor configures the mode parameter to 01 according to the instruction requirement and delivers it to the dynamic storage controller; when the memory of the second aspect is controlled When the device controls the second SDRAM to execute the MRS instruction, the processor configures the mode parameter to 10 according to the instruction requirement and delivers the mode parameter to the dynamic storage controller.
  • the SOC chip 402 outputs an access instruction and a first chip select signal to the first SDRAM 403, and outputs an access command and a second chip select signal to the second SDRAM 404, that is, in the device 400, through the SOC chip 402.
  • the output first chip select signal and second chip select signal respectively control the first SDRMA 403 and the second SDRAM 404 to execute an access command.
  • the access instruction may be an MRS instruction or a data read/write instruction.
  • the SOC chip 402 can control the first SDRAM 403 to execute the MRS command by outputting the MRS command and the first chip select signal to the first SDRAM 403, and output the MRS command and the second chip select signal to the second SDRAM 404.
  • the second SDRAM 404 is controlled to execute the MRS instruction; when the access instruction is the data read/write instruction, the SOC chip 402 can control the first SDRAM 403 to execute the data read and write instruction by outputting the data read/write instruction and the first chip select signal to the first SDRAM 403.
  • the second SDRAM 404 is controlled to execute a data read/write command by outputting a data read/write command and a second chip select signal to the second SDRAM 404.
  • the dynamic memory controller 402b in the SOC chip 402 validates at least one of the two chip select signals according to the mode parameter, and then the driver 403c in the SOC chip 402 outputs the access command and the first chip select signal. After the first SDRAM 403 is output and the access command and the second chip select signal are output to the second SDRAM 404, the execution of the access instruction by the first SDRAM and the second SDRAM can be classified into the following three cases:
  • the first chip select signal is valid, and the second chip select signal is invalid.
  • the first chip selection signal and the second chip selection signal are valid.
  • both the first SDRAM and the second SDRAM can execute access commands received by themselves, such as data read and write instructions.
  • the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter. In this way, the first SDRAM and the second SDRAM can simultaneously execute access instructions that are not strictly required for the line order, such as data read/write instructions.
  • the SOC chip can indicate that the first chip select signal is valid by the mode parameter, and the second chip selects The signal is invalid, thereby completing the configuration of the mode register of the first SDRAM by transmitting the configuration value of the mode register to the first SDRAM through the first address signal link; and then indicating that the second chip selection signal is valid by the mode parameter, thereby passing the first address signal
  • the link and the second address signal link are configured to the second SDRAM transfer mode register to complete the configuration of the mode register of the second SDRAM.
  • the address signal pins of the SOC chip 402 and the address sequence of the address signal pins of the first SDRAM are in one-to-one correspondence, and the address signal tube of the SOC chip
  • the line order of the pin and the address signal pins of the second SDRAM are not necessarily one-to-one correspondence.
  • the address signal pin A11 of the SOC chip corresponds to the address signal pin A11 of the first SDRAM and the address signal pin A13 of the second SDRAM. That is, the configuration value of the mode register transmitted by the SOC chip through the address signal pin A11 is transmitted to the address signal pin A11 of the first SDRAM and the address signal pin A13 of the second SDRAM.
  • the SOC chip knows the correspondence between the address signal pin of the second SDRAM and the address signal pin of the second SDRAM.
  • the configuration value of the mode register is transferred to the corresponding address signal pin in the second SDRAM through the correct address signal pin.
  • the number of the first SDRAMs in the present application may be multiple.
  • the number of the second SDRAMs mirrored to the second side of the single board is also plural. That is, the plurality of first SDRAMs and the plurality of second SDRAMs are in one-to-one correspondence.
  • a mirror image is fixed on the second side of the single board.
  • the second SDRAM corresponds to it.
  • the routing manner of the single board can be as shown in FIG. 5.
  • Figure 5 shows the internal structure of the SOC chip and the operations performed by the various components and Figure 4
  • the SOC chip 402 is the same, so the internal structure of the SOC chip is not shown in FIG.
  • the SOC chip can access the instruction and the first The chip select signals are respectively output to the plurality of first SDRAMs, and the access instructions and the second chip select signals are respectively output to the plurality of second SDRAMs. Then, when the access instruction is executed, the plurality of first SDRMAs determine whether the access instruction needs to be executed according to the first chip select signal, that is, the operations of the plurality of first SDRAMs to execute the access instruction are synchronized.
  • the plurality of first SDRAMs execute the MRS instruction; for example, when the access instruction is the MRS instruction and the first chip selection signal is invalid, the plurality of None of the SDRAMs execute the MRS instruction.
  • the plurality of second SDRAMs determine whether the access instruction needs to be executed according to the second chip select signal, the operations of the plurality of second SDRAMs to execute the access instruction are also synchronized, and details are not described herein again.
  • the second SDRAM is fixed on the second side of the board, the address signal pin of the first SDRAM and the address signal pin of the SOC chip.
  • the first chip signal link communication pin, the chip select signal pin of the first SDRAM, and the first chip select signal pin of the SOC chip are communicatively connected through the first chip select signal link; the address signal pin of the second SDRAM and The address signal pin of the SOC chip is communicably connected through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM, and the second chip select signal pin of the SOC chip pass the second chip select signal
  • the link is in communication with the third chip select signal link.
  • the first SDRAM and the second SDRAM can share the first address signal link.
  • the first address signal link and the second address signal link are only connected by at least one via communication on the board, and the second chip select signal link and the third chip select signal link are also passed through at least one of the boards.
  • a via communication connection thus reduces the routing area and number of wiring layers in the device 400 in comparison to the single board routing scheme provided in the prior art shown in FIG. 2, thereby reducing wiring difficulty.
  • the apparatus 400 provided by the present application can reduce crosstalk and noise between signals due to single board wiring, and improve signal quality.
  • the dynamic memory controller in the SOC chip validates at least one of the two chip select signals according to the mode parameter, and the driver in the SOC chip outputs the access command and the first chip select signal to the first SDRAM, The access command and the second chip select signal are output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately.
  • Accessing the instruction or, when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the second SDRAM available
  • the access instruction is executed separately; or, when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both indicated by the indication of the mode parameter. Effective so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
  • the SOC chip may perform the MRS instruction separately by the first SDRAM fixed on the first side of the board according to the mode parameter indication, and complete the configuration of the mode register;
  • the second SDRAM of the second side separately executes the MRS instruction to complete the configuration of the mode register.
  • the SOC chip can indicate that the first chip selection signal and the second chip selection signal are valid by the mode parameter indication. To ensure the visit Ask the correct execution of the instruction.
  • an additional pin may be added to the SOC chip as a pin for outputting the chip select signal. This is because the SOC chip itself supports only one chip select signal output. However, in the apparatus 400 provided by the present application, the SOC chip 402 needs to output two chip select signals of the first chip select signal and the second chip select signal. An additional pin can be added to the SOC chip as a pin for outputting a chip select signal, so that the SOC chip can output two chip select signals.
  • the SOC chip in the device 400 supports multiple chip select signal outputs, it is not necessary to additionally add a pin in the pin of the SOC chip to output a chip select signal, but the SOC chip itself can be used to output multiple chip select signals. Pin to output two chip select signals.
  • the present application further provides a control method of a memory, and an execution body of the control method of the memory can be regarded as a SOC chip in the control device of the memory shown in FIG. 4.
  • the method includes the following steps:
  • S601 Generate an access instruction for two SDRAMs according to the instruction requirement.
  • the two SDRAMs are mirrored and fixed on both sides of the board.
  • S602 Generate two chip select signals according to the access instruction.
  • first chip select signal of the two chip select signals is used to enable the first SDRAM of the two SDRAMs
  • second chip select signal of the two chip select signals is used to enable the second of the two SDRAMs SDRAM.
  • S603 Enable at least one of the two chip select signals to be valid according to the mode parameter.
  • the mode parameter is used to indicate the validity of each chip select signal of the two chip select signals.
  • S604 Output the access instruction and the first chip selection signal to the first SDRAM, and output the access instruction and the second chip selection signal to the second SDRAM.
  • the access instruction may be an MRS instruction, and the access instruction may also be a data read/write instruction.
  • At least one of the two chip select signals is valid according to the mode parameter, which may be implemented by: when the mode parameter is the first preset value, making the first chip select signal valid; When the mode parameter is the second preset value, the second chip selection signal is enabled; when the mode parameter is the third preset value or the fourth preset value, the first chip selection signal and the second chip selection signal are enabled.
  • FIG. 6 can be viewed as a method performed by SOC chip 402 in device 400, and thus implementations not detailed and described in FIG. 6 can be referred to the related description in device 400.
  • the wiring manner is easier to implement when wiring the first SDRAM and the second SDRAM. This is because, since the first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board, the first SDRAM and the second SDRAM can share the address signal link, which is different from the prior art on the board. Compared with the way in which the SDRAM is wired, the wiring area and the number of wiring layers are reduced, thereby reducing the wiring difficulty. At the same time, since the number of wirings on the board, the wiring area, and the number of wiring layers are reduced during wiring, the memory control method provided by the present application can reduce crosstalk and noise between signals caused by single board wiring, and improve signal quality. .
  • the access command and the first chip select signal are output to the first SDRAM in S604, the access command and the second chip select are performed.
  • the signal is output to the second SDRAM.
  • the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, thereby making the first SDRAM
  • the access instruction may be executed separately, or when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the first
  • the second SDRAM can separately execute the access instruction; when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line order, the first chip selection signal and the second chip selection signal can be made by the indication of the mode parameter. All are valid, so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
  • the method includes the following steps:
  • Step 1 The SOC chip is powered on.
  • Step 2 Initialize the dynamic storage controller.
  • the initialization dynamic storage controller includes a configuration working mode, a configuration timing parameter, and the like.
  • Step 3 Initialize the physical layer interface.
  • Initializing the physical layer interface mainly refers to the initialization and calibration of the Phase Locked Loop (PLL), and the initialization and calibration of the Delay Locked Loop (DLL), thereby generating the operating clock of the system and completing the physical layer interface. Its own calibration.
  • PLL Phase Locked Loop
  • DLL Delay Locked Loop
  • Step 4 Configure the registers in the dynamic memory controller to reset the two SDRAMs.
  • the registers of the dynamic memory controller for resetting the two SDRAMs are configured to implement resetting of the two SDRAMs: that is, both SDRAMs are in the IDLE state and the IDLE state is maintained for at least 200 us according to the JEDEC protocol requirements, and then the reset is cancelled.
  • Step 5 Configure the dynamic storage controller and two SDRAMs to exit the automatic refresh state.
  • the dynamic memory controller and the two SDRAMs are configured to exit the automatic refresh state by pulling up the CEK signal.
  • Step 6 Configure the mode register of the first SDRAM by the indication of the mode parameter.
  • the mode parameter may be 01, and the mode parameter indicates that the first chip select signal is valid, and then the SOC chip may send the MRS command to the first SDRAM through the dynamic memory controller, and the first SDRAM receives the MRS command.
  • the configuration of the mode register can be done by executing the MRS instruction.
  • Step 7 Configure the mode register of the second SDRAM by the indication of the mode parameter.
  • the mode parameter may be 10, and the mode parameter indicates that the second chip select signal is valid, and then the SOC chip may send the MRS command to the second SDRAM through the dynamic memory controller, and the second SDRAM after receiving the MRS command
  • the configuration of the mode register can be done by executing the MRS instruction.
  • Step 8 The chip select signals for enabling both SDRAMs are valid by the indication of the mode parameters.
  • the mode parameter may be 00 or 11, and the mode parameter indicates that both the first chip select signal and the second chip select signal are valid. That is to say, after configuring the mode registers of the first SDRAM and the second SDRAM in steps 6 and 7 respectively, the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter, thereby making the two The SDRAM can simultaneously execute data read and write instructions after the configuration of the mode register is completed.
  • Step 9 Start data training on the physical layer interface.
  • Step 10 Start the system business.
  • step ten the two SDRAMs can simultaneously execute the data read and write instructions.
  • the dynamic storage controller can still be implemented by configuring corresponding mode parameters.
  • the memory control method and apparatus provided by the present application can reduce wiring difficulty and improve signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

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

Abstract

A memory control method and device, for use in reducing wiring difficulty and improving signal quality when controlling SDRAMs belonging to one RANK to execute an access instruction. The method comprises: generating an access instruction for two SDRAMs according to instruction requirements (S601), the two SDRAMs being fixed to two sides of a single board in a mirrored manner; generating two chip select signals according to the access instruction (S602), a first chip select signal in the two chip select signals being used for enabling a first SDRAM in the two SDRAMs, and a second chip select signal in the two chip select signals being used for enabling a second SDRAM in the two SDRAMs; making at least one chip select signal in the two chip select signals valid according to mode parameters (S603), the mode parameters being used for indicating the validity of each chip select signal in the two chip select signals; and outputting the access instruction and the first chip select signal to the first SDRAM, and outputting the access instruction and the second chip select signal to the second SDRAM (S604).

Description

一种存储器的控制方法及装置Memory control method and device
本申请要求于2017年02月28日提交中国专利局、申请号为201710114798.6、申请名称为“一种存储器的控制方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. JP-A No. No. No. No. No. No. No. No. No. No. No. No. No. in.
技术领域Technical field
本申请涉及存储技术领域,尤其涉及一种存储器的控制方法及装置。The present application relates to the field of storage technologies, and in particular, to a method and an apparatus for controlling a memory.
背景技术Background technique
在存储技术领域中,同步动态随机存储器(Synchronous Dynamic Random Access Memory,SDRAM)凭借其高速率、高集成度和低成本的优势成为众多处理器芯片的首选。In the field of storage technology, Synchronous Dynamic Random Access Memory (SDRAM) has become the first choice of many processor chips due to its high speed, high integration and low cost.
当处理器对接SDRAM时,处理器中的片上系统(System On Chip,SOC)芯片通过发送符合电子元件工业联合会(Joint Electron Device Engineering Council,JEDEC)协议的访问指令实现对SDRAM的访问。SDRAM在接收到访问指令后是否执行该访问执行,主要通过用于使能SDRAM的片选(Chip Select,CS)信号来指示。当SDRAM接收到的片选信号有效时,即对SDRAM进行使能,SDRAM执行接收到的访问指令;当SDRAM接收到的片选信号无效时,SDRAM不执行接收到的访问指令。通常,一个片选信号可用于使能属于同一内存区域(即RANK)的SDRAM。属于同一RANK的SDRAM可同时执行访问指令,且在物理上共用地址线和控制线。When the processor docks the SDRAM, the System On Chip (SOC) chip in the processor realizes access to the SDRAM by transmitting an access instruction conforming to the Joint Electron Device Engineering Council (JEDEC) protocol. Whether the SDRAM performs the access execution after receiving the access instruction is mainly indicated by a Chip Select (CS) signal for enabling the SDRAM. When the chip select signal received by the SDRAM is valid, the SDRAM is enabled, and the SDRAM performs the received access command; when the chip select signal received by the SDRAM is invalid, the SDRAM does not execute the received access command. Typically, a chip select signal can be used to enable SDRAM belonging to the same memory region (ie RANK). SDRAMs belonging to the same RANK can simultaneously execute access instructions and physically share address lines and control lines.
现有技术中,在使能属于同一RANK的多个SDRAM时,通常在印刷电路板(Printed Circuit Board,又称为单板)上布线时将全部SDRAM集成在单板的一侧,用一个片选信号来使能全部SDRAM,即用该片选信号来指示SDRAM是否执行接收到的访问指令。由于属于同一RANK的SDRAM在物理上共用地址线和控制线,因此,当把属于同一RANK的SDRAM排布在单板同一侧时,会提高布线难度,而且信号之间的串扰或噪声等也会造成信号质量的下降。In the prior art, when multiple SDRAMs belonging to the same RANK are enabled, all SDRAMs are usually integrated on one side of the board when wiring on a Printed Circuit Board (also referred to as a single board). The signal is selected to enable all of the SDRAM, i.e., the chip select signal is used to indicate whether the SDRAM is executing the received access command. Since the SDRAMs belonging to the same RANK physically share the address lines and the control lines, when the SDRAMs belonging to the same RANK are arranged on the same side of the board, the wiring difficulty is increased, and crosstalk or noise between the signals is also Causes a drop in signal quality.
综上,现有的存储器控制方式存在布线难度大、信号质量差的问题。In summary, the existing memory control method has the problems of high wiring difficulty and poor signal quality.
发明内容Summary of the invention
本申请提供一种存储器的控制方法及装置,用以在控制属于同一RANK的多个SDRAM执行访问指令时降低布线难度、提高信号质量。The present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
第一方面,本申请提供一种存储器的控制方法,该方法包括如下步骤:根据指令需求生成对两个被镜像固定于单板的两侧的SDRAM的访问指令;根据访问指令生成两个片选信号;根据模式参数使两个片选信号中的至少一个片选信号有效;将访问指令和第一片选信号输出至两个SDRAM中的第一SDRAM,将访问指令和第二片选信号输出至两个SDRAM中的第二SDRAM。In a first aspect, the present application provides a method for controlling a memory, the method comprising: generating an access instruction for two SDRAMs mirrored on both sides of a board according to an instruction requirement; generating two chip selections according to the access instruction a signal; causing at least one of the two chip select signals to be valid according to the mode parameter; outputting the access command and the first chip select signal to the first SDRAM of the two SDRAMs, and outputting the access command and the second chip select signal To the second SDRAM of the two SDRAMs.
其中,两个片选信号中的第一片选信号用于使能第一SDRAM,第二片选信号用于使能第二SDRAM,模式参数用于指示两个片选信号中每个片选信号的有效性。The first chip select signal of the two chip select signals is used to enable the first SDRAM, the second chip select signal is used to enable the second SDRAM, and the mode parameter is used to indicate each of the two chip select signals. The validity of the signal.
在第一方面提供的方法中,由于第一SDRAM和第二SDRAM被镜像固定于单板的两侧,因而在对第一SDRAM和第二SDRAM布线时,布线方式更易于实现。这是因为:由 于第一SDRAM和第二SDRAM被镜像固定于单板的两侧,那么第一SDRAM和第二SDRAM可共用地址信号链路,与现有技术中在单板上分别对每个SDRAM进行布线的方式相比,减小了布线面积和布线层数,从而降低了布线难度。同时,由于在布线时减少了单板上布线数量、布线面积和布线层数,因此采用第一方面提供的存储器的控制方法可以减少由于单板布线带来的信号间的串扰和噪声,提高信号质量。In the method provided by the first aspect, since the first SDRAM and the second SDRAM are mirror-fixed on both sides of the single board, the wiring manner is easier to implement when wiring the first SDRAM and the second SDRAM. This is because: by The first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board, and the first SDRAM and the second SDRAM can share the address signal link, and each SDRAM is separately routed on the single board in the prior art. Compared with the method, the wiring area and the number of wiring layers are reduced, thereby reducing the wiring difficulty. At the same time, since the number of wirings on the single board, the wiring area, and the number of wiring layers are reduced during wiring, the memory control method provided by the first aspect can reduce crosstalk and noise between signals due to single board wiring, and improve signals. quality.
此外,由于在第一方面提供的方法中,根据模式参数使两个片选信号中的至少一个片选信号有效,并将访问指令和第一片选信号输出至第一SDRAM,将访问指令和第二片选信号输出至第二SDRAM。因此,在需要第一SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号有效、第二片选信号无效,从而使得第一SDRAM可单独执行该访问指令,或者在需要第二SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号无效、第二片选信号有效,从而使得第二SDRAM可单独执行该访问指令;在需要第一SDRAM和第二SDRAM同时执行对线序没有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号和第二片选信号均有效,从而使得该第一SDRAM和第二SDRAM可同时执行该访问指令。Furthermore, in the method provided by the first aspect, at least one of the two chip select signals is valid according to the mode parameter, and the access command and the first chip select signal are output to the first SDRAM, the access command and The second chip select signal is output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately. Accessing the instruction, or when the second SDRAM is required to execute the access instruction having strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, so that the second SDRAM can be separately Executing the access instruction; when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter, thereby The first SDRAM and the second SDRAM are enabled to execute the access instruction at the same time.
在一种可能的设计中,访问指令可以为模式寄存器配置(Mode Register Set,MRS)指令,也可以为数据读写指令。In one possible design, the access instruction can be a Mode Register Set (MRS) instruction or a data read and write instruction.
当访问指令为MRS指令时,可通过向第一SDRAM输出MRS指令和第一片选信号来控制第一SDRAM执行MRS指令,并通过向第二SDRAM输出MRS指令和第二片选信号来控制第二SDRAM执行MRS指令;当访问指令为数据读写指令时,可通过向第一SDRAM输出数据读写指令和第一片选信号来控制第一SDRAM执行数据读写指令,并通过向第二SDRAM输出数据读写指令和第二片选信号来控制第二SDRAM执行数据读写指令。When the access instruction is an MRS instruction, the first SDRAM can be controlled to execute the MRS instruction by outputting the MRS instruction and the first chip selection signal to the first SDRAM, and the MRS instruction and the second chip selection signal are outputted to the second SDRAM. The second SDRAM executes the MRS instruction; when the access instruction is the data read/write instruction, the first SDRAM can be controlled to execute the data read/write instruction by outputting the data read/write instruction and the first chip select signal to the first SDRAM, and pass to the second SDRAM. The output data read/write instruction and the second chip select signal are used to control the second SDRAM to execute the data read/write instruction.
在第一方面提供的方法中,模式参数用于指示两个片选信号中的每个片选信号的有效性。该模式参数可以为包含2比特的序列。比如,当模式参数为01时,表示第一片选信号有效;当模式参数为10时,表示第二片选信号有效;当模式参数为00或11时,表示第一片选信号和第二片选信号均有效。也就是说,根据模式参数使两个片选信号中的至少一个片选信号有效时,具体可通过如下方式实现:当模式参数为第一预设值(比如01)时,使第一片选信号有效;当模式参数为第二预设值(比如10)时,使第二片选信号有效;当模式参数为第三预设值(比如00)或第四预设值(比如11)时,使第一片选信号和第二片选信号有效。因此,通过包含2比特的模式参数的指示就可涵盖两个片选信号的有效性的所用情况,从而实现通过模式参数指示两个片选信号中的每个片选信号的有效性。In the method provided by the first aspect, the mode parameter is used to indicate the validity of each of the two chip select signals. The mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid. In other words, when at least one of the two chip select signals is valid according to the mode parameter, the method may be implemented as follows: when the mode parameter is the first preset value (such as 01), the first chip is selected. The signal is valid; when the mode parameter is the second preset value (such as 10), the second chip selection signal is valid; when the mode parameter is the third preset value (such as 00) or the fourth preset value (such as 11) , the first chip selection signal and the second chip selection signal are valid. Thus, by using an indication of a 2-bit mode parameter, the use of the validity of the two chip select signals can be covered, thereby enabling the validity of each chip select signal of the two chip select signals to be indicated by the mode parameter.
需要说明的是,模式参数包含的比特数不限于2个,只要该模式参数可涵盖两个片选信号的有效性的所用情况即可。It should be noted that the number of bits included in the mode parameter is not limited to two, as long as the mode parameter can cover the validity of the two chip select signals.
第二方面,本申请提供一种存储器的控制装置,该装置包括单板、SOC芯片、第一SDRAM和第二SDRAM。In a second aspect, the present application provides a memory control device including a single board, a SOC chip, a first SDRAM, and a second SDRAM.
其中,第一SDRAM和第二SDRAM被镜像固定于单板的两侧,SOC芯片与第一SDRAM被固定于单板的第一侧,第二SDRAM被固定于单板的第二侧。单板的第一侧上设有第一地址信号链路、第一片选信号链路和第二片选信号链路。第一地址信号链路用于连接第一SDRAM的地址信号管脚和SOC芯片的地址信号管脚,第一片选信号管脚用 于连接第一SDRAM的片选信号管脚和SOC芯片的第一片选信号管脚。The first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board, the SOC chip and the first SDRAM are fixed on the first side of the board, and the second SDRAM is fixed on the second side of the board. A first address signal link, a first chip select signal link, and a second chip select signal link are disposed on the first side of the board. The first address signal link is used for connecting the address signal pin of the first SDRAM and the address signal pin of the SOC chip, and the first chip selection signal pin is used. The chip select signal pin of the first SDRAM and the first chip select signal pin of the SOC chip are connected.
单板上还设有至少一个过孔,第一地址信号链路通过至少一个过孔与单板的第二侧上的第二地址信号链路通信连接,第二片选信号链路通过至少一个过孔与单板的第二侧上的第三片选信号链路通信连接,第一地址信号链路和第二地址信号链路一起将SOC芯片的地址信号管脚和第二SDRAM的地址信号管脚通信连接,第二片选信号链路和第三片选信号链路一起将SOC芯片的第二片选信号管脚和第二SDRAM的片选信号管脚通信连接。The board is further provided with at least one via, the first address signal link is communicatively coupled to the second address signal link on the second side of the board through the at least one via, and the second chip select signal passes through at least one The via is in communication with the third chip select signal link on the second side of the board, and the first address signal link and the second address signal link together address the address signal pin of the SOC chip and the address signal of the second SDRAM The pin communication connection, the second chip select signal link and the third chip select signal link together connect the second chip select signal pin of the SOC chip and the chip select signal pin of the second SDRAM.
SOC芯片包括:处理器、动态存储控制器和驱动器。处理器用于根据指令需求生成对第一SDRAM和第二SDRAM的访问指令;动态存储控制器用于根据访问指令生成两个片选信号,并根据模式参数使两个片选信号中的至少一个片选信号有效;驱动器,用于将访问指令和两个片选信号中的第一片选信号输出至第一SDRAM,将访问指令和两个片选信号中的第二片选信号输出至第二SDRAM。其中,第一片选信号用于使能第一SDRAM,第二片选信号用于使能第二SDRAM,模式参数用于指示两个片选信号中每个片选信号的有效性。The SOC chip includes: a processor, a dynamic memory controller, and a driver. The processor is configured to generate an access instruction for the first SDRAM and the second SDRAM according to the instruction requirement; the dynamic storage controller is configured to generate two chip select signals according to the access instruction, and select at least one of the two chip select signals according to the mode parameter The signal is valid; the driver is configured to output the first chip select signal of the access command and the two chip select signals to the first SDRAM, and output the second chip select signal of the access command and the two chip select signals to the second SDRAM . The first chip select signal is used to enable the first SDRAM, the second chip select signal is used to enable the second SDRAM, and the mode parameter is used to indicate the validity of each chip select signal of the two chip select signals.
在第二方面提供的存储器的控制装置中,由于SOC芯片与第一SDRAM被固定于单板的第一侧,第二SDRAM被固定于单板的第二侧,第一SDRAM的地址信号管脚和SOC芯片的地址信号管脚通过第一地址信号链路通信连接、第一SDRAM的片选信号管脚和SOC芯片的第一片选信号管脚通过第一片选信号链路通信连接;第二SDRAM的地址信号管脚和SOC芯片的地址信号管脚通过第一地址信号链路和第二地址信号链路通信连接、第二SDRAM的片选信号管脚和SOC芯片的第二片选信号管脚通过第二片选信号链路和第三片选信号链路通信连接。因而在对第一SDRAM和第二SDRAM布线时,第一SDRAM和第二SDRAM可共用第一地址信号链路。此外,第一地址信号链路和第二地址信号链路仅通过单板上的至少一个过孔通信连接,第二片选信号链路和第三片选信号链路也通过单板上的至少一个过孔通信连接,因而与现有技术中中的单板布线方案相比,第二方面提供的存储器的控制装置中减小了布线面积和布线层数,从而降低了布线难度。同时,由于在布线时减少了单板上布线数量、布线面积和布线层数,因此采用第二方面提供的存储器的控制装置可以减少由于单板布线带来的信号间的串扰和噪声,提高信号质量。In the memory control device provided by the second aspect, since the SOC chip and the first SDRAM are fixed on the first side of the board, the second SDRAM is fixed on the second side of the board, and the address signal pin of the first SDRAM And the address signal pin of the SOC chip is communicatively connected through the first address signal link, the chip select signal pin of the first SDRAM, and the first chip select signal pin of the SOC chip are communicatively connected through the first chip select signal link; The address signal pin of the two SDRAM and the address signal pin of the SOC chip are communicatively connected through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM, and the second chip select signal of the SOC chip. The pin is communicatively coupled through the second chip select signal link and the third chip select signal link. Thus, when wiring the first SDRAM and the second SDRAM, the first SDRAM and the second SDRAM can share the first address signal link. In addition, the first address signal link and the second address signal link are only connected by at least one via communication on the board, and the second chip select signal link and the third chip select signal link are also passed through at least one of the boards. A via communication connection, thus reducing the wiring area and the number of wiring layers in the control device of the memory provided by the second aspect, thereby reducing the wiring difficulty, compared with the single-board wiring scheme in the prior art. At the same time, since the number of wirings on the single board, the wiring area, and the number of wiring layers are reduced during wiring, the memory control device provided by the second aspect can reduce crosstalk and noise between signals due to single board wiring, and improve signals. quality.
此外,由于SOC芯片中的动态存储控制器根据模式参数使两个片选信号中的至少一个片选信号有效,且SOC芯片中的驱动器将访问指令和第一片选信号输出至第一SDRAM,将访问指令和第二片选信号输出至第二SDRAM。因此,在需要第一SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号有效、第二片选信号无效,从而使得第一SDRAM可单独执行该访问指令;或者,在需要第二SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号无效、第二片选信号有效,从而使得第二SDRAM可单独执行该访问指令;或者,在需要第一SDRAM和第二SDRAM同时执行对线序没有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号和第二片选信号均有效,从而使得第一SDRAM和第二SDRAM可同时执行该访问指令。In addition, since the dynamic memory controller in the SOC chip validates at least one of the two chip select signals according to the mode parameter, and the driver in the SOC chip outputs the access command and the first chip select signal to the first SDRAM, The access command and the second chip select signal are output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately. Accessing the instruction; or, when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the second SDRAM available The access instruction is executed separately; or, when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both indicated by the indication of the mode parameter. Effective so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
在一种可能的设计中,访问指令可以为MRS指令,也可以为数据读写指令。In one possible design, the access instruction can be an MRS instruction or a data read and write instruction.
当访问指令为MRS指令时,SOC芯片可通过向第一SDRAM输出MRS指令和第一片 选信号来控制第一SDRAM执行MRS指令,并通过向第二SDRAM输出MRS指令和第二片选信号来控制第二SDRAM执行MRS指令;当访问指令为数据读写指令时,SOC芯片可通过向第一SDRAM输出数据读写指令和第一片选信号来控制第一SDRAM执行数据读写指令,并通过向第二SDRAM输出数据读写指令和第二片选信号来控制第二SDRAM执行数据读写指令。When the access instruction is an MRS instruction, the SOC chip can output the MRS instruction and the first slice to the first SDRAM Selecting a signal to control the first SDRAM to execute the MRS instruction, and controlling the second SDRAM to execute the MRS instruction by outputting the MRS instruction and the second chip selection signal to the second SDRAM; when the access instruction is a data read/write instruction, the SOC chip can pass The first SDRAM outputs a data read/write instruction and a first chip select signal to control the first SDRAM to execute the data read/write instruction, and controls the second SDRAM to perform the data read by outputting the data read/write instruction and the second chip select signal to the second SDRAM. Write instructions.
在第二方面提供的存储器的控制装置中,模式参数用于指示两个片选信号中的每个片选信号的有效性。模式参数可以为包含2比特的序列。比如,当模式参数为01时,表示第一片选信号有效;当模式参数为10时,表示第二片选信号有效;当模式参数为00或11时,表示第一片选信号和第二片选信号均有效。也就是说,SOC芯片中的动态存储控制器在根据模式参数使两个片选信号中的至少一个片选信号有效时,具体可通过如下方式实现:当模式参数为第一预设值(比如01)时,动态存储控制器使第一片选信号有效;当模式参数为第二预设值(比如10)时,动态存储控制器使第二片选信号有效;当模式参数为第三预设值(比如00)或第四预设值(比如11)时,动态存储控制器使第一片选信号和第二片选信号有效。因此,通过包含2比特的模式参数的指示就可涵盖两个片选信号的有效性的所用情况,从而实现通过模式参数指示两个片选信号中的每个片选信号的有效性。In the memory control device provided in the second aspect, the mode parameter is used to indicate the validity of each of the two chip select signals. The mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid. In other words, when the dynamic memory controller in the SOC chip is enabled to enable at least one of the two chip select signals according to the mode parameter, the method may be implemented as follows: 01), the dynamic memory controller makes the first chip select signal valid; when the mode parameter is the second preset value (such as 10), the dynamic memory controller makes the second chip select signal valid; when the mode parameter is the third pre- When a value (such as 00) or a fourth preset value (such as 11) is set, the dynamic memory controller makes the first chip select signal and the second chip select signal valid. Thus, by using an indication of a 2-bit mode parameter, the use of the validity of the two chip select signals can be covered, thereby enabling the validity of each chip select signal of the two chip select signals to be indicated by the mode parameter.
其中,模式参数可在SOC芯片进行初始化时设置,比如在初始化时将模式参数设置为包含2比特的序列,即模式参数的数值可以为01、10、00和11。当第二方面提供的存储器的控制装置控制第一SDRAM和第二SDRAM执行访问指令时,处理器将模式参数的配置值下发至动态存储控制器。当根据指令需求需要更改模式参数的配置时,处理器重新向动态存储控制器下发更新后的配置值即可。比如,当第二方面提供的存储器的控制装置控制第一SDRAM执行MRS指令时,处理器根据指令需求将模式参数配置为01并下发至动态存储控制器;当第二方面提供的存储器的控制装置控制第二SDRAM执行MRS指令时,处理器根据指令需求将模式参数配置为10并下发至动态存储控制器。The mode parameter may be set when the SOC chip is initialized, for example, the mode parameter is set to a sequence containing 2 bits at the time of initialization, that is, the value of the mode parameter may be 01, 10, 00, and 11. When the control device of the memory provided by the second aspect controls the first SDRAM and the second SDRAM to execute the access instruction, the processor issues the configuration value of the mode parameter to the dynamic storage controller. When the configuration of the mode parameter needs to be changed according to the instruction requirement, the processor re-issues the updated configuration value to the dynamic storage controller. For example, when the control device of the memory provided by the second aspect controls the first SDRAM to execute the MRS instruction, the processor configures the mode parameter to 01 according to the instruction requirement and delivers it to the dynamic storage controller; when the memory of the second aspect is controlled When the device controls the second SDRAM to execute the MRS instruction, the processor configures the mode parameter to 10 according to the instruction requirement and delivers the mode parameter to the dynamic storage controller.
需要说明的是,模式参数包含的比特数不限于2个,只要该模式参数可涵盖两个片选信号的有效性的所用情况即可。It should be noted that the number of bits included in the mode parameter is not limited to two, as long as the mode parameter can cover the validity of the two chip select signals.
附图说明DRAWINGS
图1为本申请提供的一种SOC芯片的结构示意图;1 is a schematic structural diagram of a SOC chip provided by the present application;
图2为本申请提供的第一种多个SDRAM在单板上的布置方式的示意图;2 is a schematic diagram of an arrangement of a first plurality of SDRAMs on a board provided by the present application;
图3为本申请提供的第二种多个SDRAM在单板上的布置方式的示意图;3 is a schematic diagram of a second plurality of SDRAMs arranged on a single board according to the present application;
图4为本申请提供的一种存储器的控制装置的结构示意图;4 is a schematic structural diagram of a memory control device provided by the present application;
图5为本申请提供的第三种多个SDRAM在单板上的布置方式的示意图;FIG. 5 is a schematic diagram of a third plurality of SDRAMs arranged on a single board according to the present application; FIG.
图6为本申请提供的一种存储器的控制方法的流程示意图;6 is a schematic flow chart of a method for controlling a memory provided by the present application;
图7为本申请提供的另一种存储器的控制方法的流程示意图。FIG. 7 is a schematic flowchart diagram of another method for controlling a memory provided by the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述。 In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings.
本申请提供一种存储器的控制方法及装置,用以在控制属于同一RANK的多个SDRAM执行访问指令时降低布线难度、提高信号质量。The present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
本申请涉及SOC芯片通过发送访问指令访问SDRAM,以及SOC芯片通过发送片选信号来指示SDRAM是否需要执行自身接收到的访问指令。其中,片选信号用于使能SDRAM,当SDRAM接收到的片选信号有效时,即对接收到该片选信号的SDRAM进行使能,该SDRAM则执行自身接收到的访问指令,当SDRAM接收到的片选信号无效时,SDRAM不执行自身接收到的访问指令。The present application relates to a SOC chip accessing an SDRAM by transmitting an access instruction, and the SOC chip instructing the SDRAM whether to execute an access instruction received by itself by transmitting a chip select signal. The chip select signal is used to enable the SDRAM. When the chip select signal received by the SDRAM is valid, the SDRAM receiving the chip select signal is enabled, and the SDRAM executes the access command received by itself, and receives the SDRAM. When the chip select signal is invalid, the SDRAM does not execute the access command received by itself.
如图1所示,SOC芯片可包含处理器、动态存储控制器(Dynamic Memory Controller,DMC)和驱动器。处理器、动态存储控制器和驱动器通过总线互连,SOC芯片通过驱动器实现与外部的多个SDRAM通信连接,从而实现SOC芯片通过发送访问指令和片选信号来控制多个SDRAM。处理器用于根据指令需求生成访问指令(比如数据读写指令、MRS等),动态存储控制器用于根据访问指令生成片选信号,然后通过驱动器将访问指令和片选信号发送给SDRAM。当SDRAM接收到的片选信号有效时,SDRAM根据接收到的访问指令执行相应的读写操作和寄存器配置操作等;当片选信号无效时,SDRAM不执行接收到的访问指令。As shown in FIG. 1, the SOC chip may include a processor, a dynamic memory controller (DMC), and a driver. The processor, the dynamic memory controller and the driver are interconnected by a bus, and the SOC chip realizes communication connection with a plurality of external SDRAMs through the driver, so that the SOC chip controls the plurality of SDRAMs by transmitting the access command and the chip select signal. The processor is configured to generate an access instruction (such as a data read/write instruction, an MRS, etc.) according to the instruction requirement, and the dynamic storage controller is configured to generate a chip selection signal according to the access instruction, and then send the access instruction and the chip selection signal to the SDRAM through the driver. When the chip select signal received by the SDRAM is valid, the SDRAM performs corresponding read and write operations and register configuration operations according to the received access command; when the chip select signal is invalid, the SDRAM does not execute the received access command.
本申请实施例中,SDRAM包括但不限于DDR SDRAM(Double Data Rate Synchronous Dynamic Random Access Memory,双倍数据率同步动态随机存储器)、DDR2 SDRAM(Double Data Rate Two Synchronous Dynamic Random Access Memory,第二代双倍数据率同步动态随机存储器)、DDR3 SDRAM(Double Data Rate Three Synchronous Dynamic Random Access Memory,第三代双倍数据率同步动态随机存储器)、DDR4 SDRAM(Double Data Rate Four Synchronous Dynamic Random Access Memory,第四代双倍数据率同步动态随机存储器)。In the embodiment of the present application, the SDRAM includes, but is not limited to, a DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory) and a DDR2 SDRAM (Double Data Rate Two Synchronous Dynamic Random Access Memory). Double Data Rate Synchronous Dynamic Random Access Memory, DDR3 SDRAM (Double Data Rate Three Synchronous Dynamic Random Access Memory), DDR4 SDRAM (Double Data Rate Four Synchronous Dynamic Random Access Memory, Fourth Generation double data rate synchronous dynamic random access memory).
SOC芯片在通过向SDRAM发送片选信号来使能SDRAM时,一个片选信号可用于使能属于同一RANK的多个SDRAM。当该片选信号有效时,属于同一RANK的多个SDRAM均执行接收到的访问指令;当该片选信号无效时,属于同一RANK的多个SDRAM均不执行接收到的访问指令。其中,属于同一RANK的多个SDRAM可同时执行SOC芯片发送的访问指令,且多个SDRAM共用地址线和控制线。When the SOC chip enables the SDRAM by transmitting a chip select signal to the SDRAM, a chip select signal can be used to enable multiple SDRAMs belonging to the same RANK. When the chip select signal is valid, the plurality of SDRAMs belonging to the same RANK execute the received access command; when the chip select signal is invalid, the plurality of SDRAMs belonging to the same RANK do not execute the received access command. The plurality of SDRAMs belonging to the same RANK can simultaneously execute the access instruction sent by the SOC chip, and the plurality of SDRAMs share the address line and the control line.
现有技术中,属于同一RANK的多个SDRAM在单板上的布线方式通常是:多个SDRAM均集成在单板的一侧,SOC芯片向多个SDRAM发送同一个片选信号,即通过发送该片选信号来使能多个SDRAM。这种布线方式可如图2所示,图2中以一个片选信号用于使能两个SDRAM为例,实际中,一个片选信号可用于使能的SDRAM的个数不限于两个。此外,图2中的CS表示用于传输片选信号的片选信号管脚,A11表示SDRAM中用于传输地址信息的地址信号管脚,连接SOC芯片和SDRAM的地址信号管脚的通信链路称为地址信号链路,连接SOC芯片和SDRAM的片选信号管脚的通信链路称为片选信号链路。In the prior art, a plurality of SDRAMs belonging to the same RANK are generally arranged on a single board: a plurality of SDRAMs are integrated on one side of the single board, and the SOC chip sends the same chip select signal to the plurality of SDRAMs, that is, by sending The chip select signal enables multiple SDRAMs. Such a wiring manner can be as shown in FIG. 2. In FIG. 2, a chip select signal is used to enable two SDRAMs. In practice, the number of SDRAMs that can be used for one chip select signal is not limited to two. Further, CS in FIG. 2 denotes a chip select signal pin for transmitting a chip select signal, A11 denotes an address signal pin for transmitting address information in the SDRAM, and a communication link for connecting an address signal pin of the SOC chip and the SDRAM. Referring to the address signal link, the communication link connecting the SOC chip and the chip select signal pin of the SDRAM is called a chip select signal link.
由图2可以看出,当SOC芯片输出的一个片选信号用于使能属于同一RANK的两个SDRAM时,通常采用的布线方式不仅布线难度较大,而且同一个管脚输出的一个信号通过某个通信链路(片选信号链路或地址信号链路)传输至两个SDRAM时需要将该信号分为两路分别传输至两个SDRAM,这会导致两个SDRAM的布线差异较大,降低该信号的信号质量,带来信号完整性(Signal Integrity,SI)的问题。 It can be seen from FIG. 2 that when a chip select signal output by the SOC chip is used to enable two SDRAMs belonging to the same RANK, the commonly used wiring method is not only difficult to route, but also a signal output by the same pin is passed. When a communication link (chip select signal link or address signal link) is transmitted to two SDRAMs, the signal needs to be split into two channels and transmitted to two SDRAMs respectively, which causes a large difference in wiring between the two SDRAMs. Reducing the signal quality of this signal leads to problems with Signal Integrity (SI).
为了克服布线难度大的问题,如果简单地将图2中的两个SDRAM分别镜像固定于单板的两侧(即一个SDRAM固定于单板的一侧,另一个SDRAM固定于该单板的另一侧),虽然两个SDRAM与SOC芯片的地址信号链路可通过单板上的过孔实现通信连接,从而实现两个SDRAM共用地址信号链路时不必将该地址信号链路中的信号分两路传输至两个SDRAM,降低了布线难度,提高了信号质量。但是,这种布线方式会带来一些其他问题,具体阐述如下:In order to overcome the problem of large wiring difficulty, if the two SDRAMs in FIG. 2 are simply mirrored and fixed on both sides of the single board (ie, one SDRAM is fixed on one side of the single board, and the other SDRAM is fixed on the other side of the single board). One side), although the address signal links of the two SDRAMs and the SOC chip can be communicated through the vias on the board, so that the signals in the address signal link do not have to be divided when the two SDRAM shared address signal links are realized. Two channels are transmitted to two SDRAMs, which reduces wiring difficulty and improves signal quality. However, this kind of wiring will bring some other problems, which are elaborated as follows:
将图2中的两个SDRAM镜像固定于单板的两侧后,两个SDRAM及其与SOC芯片的连接关系可如图3所示。为了描述简便,下文中将图3中与SOC芯片固定在单板同一侧的SDRAM称为第一SDRAM,将另一个SDRAM称为第二SDRAM。After the two SDRAM images in FIG. 2 are fixed on both sides of the single board, the two SDRAMs and their connection relationship with the SOC chip can be as shown in FIG. 3. For simplicity of description, the SDRAM of FIG. 3 fixed to the same side of the board as the SOC chip is referred to as a first SDRAM, and the other SDRAM is referred to as a second SDRAM.
由图3可以看出,采用图3所示的布线方式,第一SDRAM的地址信号管脚和第二SDRAM的地址信号管脚并不都是一一对应的。比如,第一SDRAM的地址信号管脚A11对应第二SDRAM的地址信号管脚A13,第一SDRAM的地址信号管脚A13对应第二SDRAM的地址信号管脚A11。当SOC芯片向SDRAM输出访问指令时,两个SDRAM均会收到这一访问指令,但是由于两个SDRAM的地址信号管脚不是一一对应的,那么对于两个SDRAM来说,接收到同一访问指令的地址信号管脚有可能是不同的。As can be seen from FIG. 3, in the wiring manner shown in FIG. 3, the address signal pins of the first SDRAM and the address signal pins of the second SDRAM are not all in one-to-one correspondence. For example, the address signal pin A11 of the first SDRAM corresponds to the address signal pin A13 of the second SDRAM, and the address signal pin A13 of the first SDRAM corresponds to the address signal pin A11 of the second SDRAM. When the SOC chip outputs an access instruction to the SDRAM, both SDRAMs will receive the access instruction, but since the address signals of the two SDRAMs are not one-to-one correspondence, the same access is received for the two SDRAMs. The address signal pins of the instruction may be different.
当SOC芯片输出的访问指令为数据读写指令时,图3所示的布线方式不会影响该数据读写指令的执行结果。这是因为:假设当SOC芯片向两个SDRAM发送写入某个数据的写入指令时,由于SOC芯片的地址信号管脚A11与第一SDRAM的地址信号管脚A11、第二SDRAM的地址信号管脚A13连接,因而SOC芯片会通过地址信号管脚A11指示第一SDRAM将该数据写入地址A,指示第二SDRAM将该数据写入地址B。相应地,SOC芯片向两个SDRAM发送读取该数据的读取指令时,第一SDRAM的读取操作会映射到地址A,第二SDRAM的读取操作会映射到地址B。也就是说,采用图3所示的连接方式时,虽然在写入操作时会将同一数据写入不同的地址,但是在读取该数据时,读取指令会映射到相应的正确地址,因此也能成功读取到想要读取的数据。When the access command output by the SOC chip is a data read/write command, the wiring mode shown in FIG. 3 does not affect the execution result of the data read/write command. This is because: when the SOC chip sends a write command to write some data to the two SDRAMs, the address signal pin A11 of the SOC chip and the address signal pin A11 of the first SDRAM and the address signal of the second SDRAM are used. The pin A13 is connected, so that the SOC chip instructs the first SDRAM to write the data to the address A through the address signal pin A11, instructing the second SDRAM to write the data to the address B. Correspondingly, when the SOC chip sends a read command to read the data to the two SDRAMs, the read operation of the first SDRAM is mapped to the address A, and the read operation of the second SDRAM is mapped to the address B. That is to say, when the connection mode shown in FIG. 3 is adopted, although the same data is written to different addresses during the write operation, when the data is read, the read command is mapped to the corresponding correct address, It also successfully reads the data you want to read.
当SOC芯片输出的访问指令为对线序有严格要求的访问指令时,比如MRS指令,图3所示的布线方式会影响该访问指令的执行,这是因为:对于对线序有严格要求的访问指令来说,SDRAM的每个地址信号管脚具有其特定功能,比如,当SOC芯片输出MRS指令时,SDRAM需通过特定的地址信号管脚(比如地址信号管脚A11)接收SOC芯片发送的模式寄存器的配置值。当SOC芯片通过地址信号管脚A11传输模式寄存器的某个配置值时,该配置值会传输至第一SDRAM的地址信号管脚A11和第二SDRAM的地址信号管脚A13,对于第一SDRAM来说,它可以通过正确的地址信号管脚接收到该配置值,但是对于第二SDRAM来说,其接收到该配置值的地址信号管脚是错误的,从而造成第二SDRAM通过错误的地址信号管脚接收到该配置值,即造成模式寄存器的配置错误。When the access instruction output by the SOC chip is an access instruction that has strict requirements on the line order, such as the MRS instruction, the wiring mode shown in FIG. 3 affects the execution of the access instruction because: for the line order is strictly required In terms of access instructions, each address signal pin of the SDRAM has its specific function. For example, when the SOC chip outputs an MRS command, the SDRAM needs to receive the SOC chip through a specific address signal pin (such as the address signal pin A11). The configuration value of the mode register. When the SOC chip transmits a certain configuration value of the mode register through the address signal pin A11, the configuration value is transmitted to the address signal pin A11 of the first SDRAM and the address signal pin A13 of the second SDRAM, for the first SDRAM. Said that it can receive the configuration value through the correct address signal pin, but for the second SDRAM, the address signal pin that receives the configuration value is wrong, causing the second SDRAM to pass the wrong address signal. The pin receives the configuration value, causing a configuration error in the mode register.
综上,在控制属于同一RANK的多个SDRAM执行访问指令时,若如图3所示简单地将SDRAM镜像地置于单板两侧,虽然可以降低布线难度、提高信号质量,但是会影响某些对线序有严格要求的访问指令的正确执行。因此,在存储技术领域,仍亟需一种存储器的控制方法及装置,用以在控制属于同一RANK的多个SDRAM执行访问指令时,降低布线难度、提高信号质量。In summary, when multiple access control commands belonging to the same RANK are executed, if the SDRAM image is simply placed on both sides of the board as shown in FIG. 3, the wiring difficulty and signal quality can be reduced, but the impact is affected. These are the correct execution of access instructions that have strict requirements on the line order. Therefore, in the field of storage technology, there is still a need for a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
本申请提供一种存储器的控制方法及装置,用以在控制属于同一RANK的多个SDRAM执行访问指令时降低布线难度、提高信号质量。 The present application provides a memory control method and apparatus for reducing wiring difficulty and improving signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
本申请中所涉及的多个,是指两个或两个以上。The plurality referred to in the present application means two or more.
另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In addition, it should be understood that in the description of the present application, the terms "first", "second" and the like are used only to distinguish the purpose of description, and are not to be understood as indicating or implying relative importance, nor as an indication. Or suggest the order.
下面结合附图对本申请提供的存储器的控制方案进行具体说明。The control scheme of the memory provided by the present application will be specifically described below with reference to the accompanying drawings.
参见图4,为本申请提供的存储器的控制装置的结构示意图。4 is a schematic structural diagram of a control device for a memory provided by the present application.
图4所示的存储器的控制装置400(以下简称“装置400”)包括单板401、SOC芯片402、第一SDRAM403和第二SDRAM404。The memory control device 400 (hereinafter referred to as "device 400") shown in FIG. 4 includes a single board 401, a SOC chip 402, a first SDRAM 403, and a second SDRAM 404.
其中,第一SDRAM403和第二SDRAM404被镜像固定于单板401的两侧,SOC芯片402与第一SDRAM403被固定于单板401的第一侧,第二SDRAM404被固定于单板401的第二侧,单板401的第一侧上设有第一地址信号链路、第一片选信号链路和第二片选信号链路,第一地址信号链路用于连接第一SDRAM403的地址信号管脚和SOC芯片402的地址信号管脚,第一片选信号管脚用于连接第一SDRAM403的片选信号管脚和SOC芯片402的第一片选信号管脚,单板401上还设有至少一个过孔,第一地址信号链路通过至少一个过孔与单板401的第二侧上的第二地址信号链路通信连接,第二片选信号链路通过至少一个过孔与单板401的第二侧上的第三片选信号链路通信连接,第一地址信号链路和第二地址信号链路一起将SOC芯片402的地址信号管脚和第二SDRAM404的地址信号管脚通信连接,第二片选信号链路和第三片选信号链路一起将SOC芯片402的第二片选信号管脚和第二SDRAM404的片选信号管脚通信连接。The first SDRAM 403 and the second SDRAM 404 are mirrored and fixed on both sides of the single board 401, the SOC chip 402 and the first SDRAM 403 are fixed on the first side of the single board 401, and the second SDRAM 404 is fixed on the second side of the single board 401. On the first side of the board 401, a first address signal link, a first chip select signal link, and a second chip select signal link are disposed. The first address signal link is used to connect the address signal of the first SDRAM 403. The pin and the address signal pin of the SOC chip 402, the first chip select signal pin is used to connect the chip select signal pin of the first SDRAM 403 and the first chip select signal pin of the SOC chip 402, and the board 401 is further provided. There is at least one via, the first address signal link is communicatively coupled to the second address signal link on the second side of the board 401 through the at least one via, and the second chip select signal is passed through the at least one via and the single A third chip select signal link on the second side of the board 401 is communicatively coupled. The first address signal link and the second address signal link together form an address signal pin of the SOC chip 402 and an address signal pin of the second SDRAM 404. Communication connection, second chip selection signal link and third chip selection signal Connecting the communication chip select signal pin 402 of the second sheet-SOC chip select signal pin and a second passage SDRAM404 together.
SOC芯片402包括处理器402a、动态存储控制器402b以及驱动器402c。SOC芯片402中,处理器402a用于根据指令需求生成对第一SDRAM403和第二SDRAM404的访问指令;动态存储控制器402b用于根据访问指令生成两个片选信号,并根据模式参数使两个片选信号中的至少一个片选信号有效;其中,两个片选信号中的第一片选信号用于使能第一SDRAM403,两个片选信号中的第二片选信号用于使能第二SDRAM404,模式参数用于指示两个片选信号中每个片选信号的有效性;驱动器402c用于将访问指令和第一片选信号输出至第一SDRAM403,以及将访问指令和第二片选信号输出至第二SDRAM404。The SOC chip 402 includes a processor 402a, a dynamic memory controller 402b, and a driver 402c. In the SOC chip 402, the processor 402a is configured to generate an access instruction to the first SDRAM 403 and the second SDRAM 404 according to the instruction requirement; the dynamic storage controller 402b is configured to generate two chip select signals according to the access instruction, and make two according to the mode parameter. At least one chip select signal of the chip select signal is active; wherein a first chip select signal of the two chip select signals is used to enable the first SDRAM 403, and a second chip select signal of the two chip select signals is used for enabling a second SDRAM 404, the mode parameter is used to indicate the validity of each of the chip select signals; the driver 402c is configured to output the access command and the first chip select signal to the first SDRAM 403, and the access command and the second The chip select signal is output to the second SDRAM 404.
需要说明的是,本申请中所述的第一地址信号链路中可包含多条地址线。比如,当第一地址信号链路中包含N条地址线时,第一地址信号链路通过单板401上的至少一个过孔与单板401的第二侧上的第二地址信号链路通信连接,其中,第二地址信号链路也包含N条地址线。It should be noted that multiple address lines may be included in the first address signal link described in this application. For example, when the first address signal link includes N address lines, the first address signal link communicates with the second address signal link on the second side of the board 401 through at least one via on the board 401. Connection, wherein the second address signal link also includes N address lines.
在本申请实施例中,SOC芯片402与第一SDRAM403被固定于单板401的第一侧,第二SDRAM404被固定于单板401的第二侧。对于第一SDRAM403来说,其地址信号管脚和片选信号管脚需要分别与SOC芯片402的地址信号管脚和第一片选信号管脚通信连接:第一SDRAM403的地址信号管脚和SOC芯片402的地址信号管脚通过第一地址信号链路通信连接,第一SDRAM403的片选信号管脚和SOC芯片402的第一片选信号管脚通过第一片选信号链路通信连接;对于第二SDRAM404来说,其地址信号管脚和片选信号管脚需要分别与SOC芯片402的地址信号管脚和第二片选信号管脚通信连接:第二SDRAM404的地址信号管脚和SOC芯片402的地址信号管脚通过第一地址信号链路和第二地址信号链路通信连接、第二SDRAM404的片选信号管脚和SOC芯片402的第二片选信号管脚通过第二片选信号链路和第三片选信号链路通信连接。In the embodiment of the present application, the SOC chip 402 and the first SDRAM 403 are fixed on the first side of the single board 401, and the second SDRAM 404 is fixed on the second side of the single board 401. For the first SDRAM 403, the address signal pin and the chip select signal pin need to be respectively connected with the address signal pin of the SOC chip 402 and the first chip select signal pin: the address signal pin and the SOC of the first SDRAM 403 The address signal pins of the chip 402 are communicatively coupled through the first address signal link, and the chip select signal pins of the first SDRAM 403 and the first chip select signal pins of the SOC chip 402 are communicatively coupled through the first chip select signal link; For the second SDRAM 404, the address signal pin and the chip select signal pin need to be respectively connected to the address signal pin and the second chip select signal pin of the SOC chip 402: the address signal pin of the second SDRAM 404 and the SOC chip. The address signal pin of 402 passes through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM 404, and the second chip select signal of the SOC chip 402 pass the second chip select signal. The link is in communication with the third chip select signal link.
在装置400中,第一SDRAM和第二SDRAM共用单板401的第一侧的第一地址信号 链路,且当第一片选信号和第二片选信号均有效时,可通过SOC芯片向第一SDRAM输出访问指令和第一片选信号、向第二SDRAM输出访问指令和第二片选信号实现第一SDRAM和第二SDRAM同时执行访问指令,即实现同时控制第一SDRAM和第二SDRAM执行访问指令,因此,第一SDRAM和第二SDRAM属于同一RANK。In the device 400, the first SDRAM and the second SDRAM share the first address signal of the first side of the single board 401 a link, and when both the first chip select signal and the second chip select signal are valid, the access instruction and the first chip select signal are output to the first SDRAM through the SOC chip, and the access command and the second chip select are outputted to the second SDRAM The signal realizes that the first SDRAM and the second SDRAM simultaneously execute the access instruction, that is, to simultaneously control the first SDRAM and the second SDRAM to execute the access instruction, and therefore, the first SDRAM and the second SDRAM belong to the same RANK.
在装置400中,模式参数用于指示两个片选信号中的每个片选信号的有效性。模式参数可以为包含2比特的序列。比如,当模式参数为01时,表示第一片选信号有效;当模式参数为10时,表示第二片选信号有效;当模式参数为00或11时,表示第一片选信号和第二片选信号均有效。也就是说,SOC芯片402中的动态存储控制器402b在根据模式参数使两个片选信号中的至少一个片选信号有效时,具体可通过如下方式实现:当模式参数为第一预设值(比如01)时,动态存储控制器402b使第一片选信号有效;当模式参数为第二预设值(比如10)时,动态存储控制器402b使第二片选信号有效;当模式参数为第三预设值(比如00)或第四预设值(比如11)时,动态存储控制器402b使第一片选信号和第二片选信号有效。因此,通过包含2比特的模式参数的指示就可涵盖两个片选信号的有效性的所用情况,从而实现通过模式参数指示两个片选信号中的每个片选信号的有效性。In apparatus 400, a mode parameter is used to indicate the validity of each of the two chip select signals. The mode parameter can be a sequence containing 2 bits. For example, when the mode parameter is 01, it indicates that the first chip selection signal is valid; when the mode parameter is 10, it indicates that the second chip selection signal is valid; when the mode parameter is 00 or 11, it indicates the first chip selection signal and the second The chip select signals are all valid. In other words, when the dynamic storage controller 402b in the SOC chip 402 is enabled to enable at least one of the two chip select signals according to the mode parameter, the dynamic memory controller 402b can be implemented by: when the mode parameter is the first preset value. (such as 01), the dynamic memory controller 402b makes the first chip select signal valid; when the mode parameter is the second preset value (such as 10), the dynamic memory controller 402b makes the second chip select signal valid; when the mode parameter The dynamic memory controller 402b asserts the first chip select signal and the second chip select signal when it is a third preset value (such as 00) or a fourth preset value (such as 11). Thus, by using an indication of a 2-bit mode parameter, the use of the validity of the two chip select signals can be covered, thereby enabling the validity of each chip select signal of the two chip select signals to be indicated by the mode parameter.
其中,模式参数可在SOC芯片进行初始化时设置,比如在初始化时将模式参数设置为包含2比特的序列,即模式参数的数值可以为01、10、00和11。当第二方面提供的存储器的控制装置控制第一SDRAM和第二SDRAM执行访问指令时,处理器将模式参数的配置值下发至动态存储控制器。当根据指令需求需要更改模式参数的配置时,处理器重新向动态存储控制器下发更新后的配置值即可。比如,当第二方面提供的存储器的控制装置控制第一SDRAM执行MRS指令时,处理器根据指令需求将模式参数配置为01并下发至动态存储控制器;当第二方面提供的存储器的控制装置控制第二SDRAM执行MRS指令时,处理器根据指令需求将模式参数配置为10并下发至动态存储控制器。The mode parameter may be set when the SOC chip is initialized, for example, the mode parameter is set to a sequence containing 2 bits at the time of initialization, that is, the value of the mode parameter may be 01, 10, 00, and 11. When the control device of the memory provided by the second aspect controls the first SDRAM and the second SDRAM to execute the access instruction, the processor issues the configuration value of the mode parameter to the dynamic storage controller. When the configuration of the mode parameter needs to be changed according to the instruction requirement, the processor re-issues the updated configuration value to the dynamic storage controller. For example, when the control device of the memory provided by the second aspect controls the first SDRAM to execute the MRS instruction, the processor configures the mode parameter to 01 according to the instruction requirement and delivers it to the dynamic storage controller; when the memory of the second aspect is controlled When the device controls the second SDRAM to execute the MRS instruction, the processor configures the mode parameter to 10 according to the instruction requirement and delivers the mode parameter to the dynamic storage controller.
需要说明的是,本申请中的模式参数包含的比特数不限于2个,只要该模式参数可涵盖两个片选信号的有效性的所用情况即可。It should be noted that the mode parameter included in the present application is not limited to two, as long as the mode parameter can cover the validity of the two chip select signals.
本申请中,SOC芯片402向第一SDRAM403输出访问指令和第一片选信号,且向第二SDRAM404输出访问指令和第二片选信号,也就是说,在装置400中,可通过SOC芯片402输出的第一片选信号和第二片选信号分别控制第一SDRMA403和第二SDRAM404执行访问指令。其中,访问指令可以为MRS指令,也可以为数据读写指令。In the present application, the SOC chip 402 outputs an access instruction and a first chip select signal to the first SDRAM 403, and outputs an access command and a second chip select signal to the second SDRAM 404, that is, in the device 400, through the SOC chip 402. The output first chip select signal and second chip select signal respectively control the first SDRMA 403 and the second SDRAM 404 to execute an access command. The access instruction may be an MRS instruction or a data read/write instruction.
当访问指令为MRS指令时,SOC芯片402可通过向第一SDRAM403输出MRS指令和第一片选信号来控制第一SDRAM403执行MRS指令,并通过向第二SDRAM404输出MRS指令和第二片选信号来控制第二SDRAM404执行MRS指令;当访问指令为数据读写指令时,SOC芯片402可通过向第一SDRAM403输出数据读写指令和第一片选信号来控制第一SDRAM403执行数据读写指令,并通过向第二SDRAM404输出数据读写指令和第二片选信号来控制第二SDRAM404执行数据读写指令。When the access command is an MRS command, the SOC chip 402 can control the first SDRAM 403 to execute the MRS command by outputting the MRS command and the first chip select signal to the first SDRAM 403, and output the MRS command and the second chip select signal to the second SDRAM 404. The second SDRAM 404 is controlled to execute the MRS instruction; when the access instruction is the data read/write instruction, the SOC chip 402 can control the first SDRAM 403 to execute the data read and write instruction by outputting the data read/write instruction and the first chip select signal to the first SDRAM 403. The second SDRAM 404 is controlled to execute a data read/write command by outputting a data read/write command and a second chip select signal to the second SDRAM 404.
本申请中,SOC芯片402中的动态存储控制器402b根据模式参数使两个片选信号中的至少一个片选信号有效,那么SOC芯片402中的驱动器403c将访问指令和第一片选信号输出至第一SDRAM403,并将访问指令和第二片选信号输出至第二SDRAM404后,第一SDRAM和第二SDRAM对访问指令的执行可分为如下三种情况:In the present application, the dynamic memory controller 402b in the SOC chip 402 validates at least one of the two chip select signals according to the mode parameter, and then the driver 403c in the SOC chip 402 outputs the access command and the first chip select signal. After the first SDRAM 403 is output and the access command and the second chip select signal are output to the second SDRAM 404, the execution of the access instruction by the first SDRAM and the second SDRAM can be classified into the following three cases:
一、第一片选信号有效、第二片选信号无效 First, the first chip select signal is valid, and the second chip select signal is invalid.
当第一片选信号有效、第二片选信号无效时,接收到第一片选信号的第一SDRAM可执行自身接收到的访问指令,比如数据读写指令、MRS指令等,接收到第二片选信号的第二SDRAM不执行自身接收到的访问指令。比如,当需要配置第一SDRAM的模式寄存器时,可通过模式参数的指示,使得用于使能第一SDRAM的第一片选信号有效,使得用于使能第二SDRAM的第二片选信号无效。这样,就可实现单独对第一SDRAM的模式寄存器进行配置。When the first chip select signal is valid and the second chip select signal is invalid, the first SDRAM receiving the first chip select signal can execute an access command received by itself, such as a data read/write command, an MRS command, etc., and receive the second The second SDRAM of the chip select signal does not execute the access command received by itself. For example, when the mode register of the first SDRAM needs to be configured, the first chip select signal for enabling the first SDRAM can be enabled by the indication of the mode parameter, so that the second chip select signal for enabling the second SDRAM is enabled. invalid. In this way, it is possible to separately configure the mode register of the first SDRAM.
二、第一片选信号无效、第二片选信号有效Second, the first chip select signal is invalid, and the second chip select signal is valid.
当第一片选信号无效、第二片选信号有效时,接收到第一片选信号的第一SDRAM不执行自身接收到的访问指令,接收到第二片选信号的第二SDRAM执行自身接收到的访问指令,比如数据读写指令、MRS指令等。比如,当需要配置第二SDRAM的模式寄存器时,可通过模式参数的指示,使得用于使能第二SDRAM的第二片选信号有效,使得用于使能第一SDRAM的第一片选信号无效。这样,就可实现单独对第二SDRAM的模式寄存器进行配置。When the first chip select signal is invalid and the second chip select signal is valid, the first SDRAM receiving the first chip select signal does not execute the access command received by itself, and the second SDRAM receiving the second chip select signal performs self reception. Access commands, such as data read and write instructions, MRS instructions, etc. For example, when the mode register of the second SDRAM needs to be configured, the second chip select signal for enabling the second SDRAM can be enabled by the indication of the mode parameter, so that the first chip select signal for enabling the first SDRAM is enabled. invalid. In this way, it is possible to separately configure the mode register of the second SDRAM.
三、第一片选信号和第二片选信号均有效3. The first chip selection signal and the second chip selection signal are valid.
当第一片选信号和第二片选信号均有效时,第一SDRAM和第二SDRAM均可执行自身接收到的访问指令,比如数据读写指令等。比如,当第一SDRAM和第二SDRAM的模式寄存器均配置完成时,可通过模式参数的指示,使第一片选信号和第二片选信号均有效。这样,第一SDRAM和第二SDRAM就可同时执行数据读写指令等对线序没有严格要求的访问指令。When both the first chip select signal and the second chip select signal are valid, both the first SDRAM and the second SDRAM can execute access commands received by themselves, such as data read and write instructions. For example, when the mode registers of the first SDRAM and the second SDRAM are all configured, the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter. In this way, the first SDRAM and the second SDRAM can simultaneously execute access instructions that are not strictly required for the line order, such as data read/write instructions.
结合第一种情况和第二种情况,当需要对装置400中的第一SDRAM和第二SDRAM进行模式寄存器的配置时,SOC芯片可通过模式参数指示第一片选信号有效、第二片选信号无效,从而通过第一地址信号链路向第一SDRAM传输模式寄存器的配置值,完成第一SDRAM的模式寄存器的配置;再通过模式参数指示第二片选信号有效,从而通过第一地址信号链路和第二地址信号链路向第二SDRAM传输模式寄存器的配置值,完成第二SDRAM的模式寄存器的配置。In combination with the first case and the second case, when the configuration of the mode register is required for the first SDRAM and the second SDRAM in the device 400, the SOC chip can indicate that the first chip select signal is valid by the mode parameter, and the second chip selects The signal is invalid, thereby completing the configuration of the mode register of the first SDRAM by transmitting the configuration value of the mode register to the first SDRAM through the first address signal link; and then indicating that the second chip selection signal is valid by the mode parameter, thereby passing the first address signal The link and the second address signal link are configured to the second SDRAM transfer mode register to complete the configuration of the mode register of the second SDRAM.
由于第一SDRAM和第二SDRAM镜像固定于单板401两侧,因而SOC芯片402的地址信号管脚和第一SDRAM的地址信号管脚的线序是一一对应的,SOC芯片的地址信号管脚和第二SDRAM的地址信号管脚的线序不一定是一一对应的。比如,SOC芯片的地址信号管脚A11对应第一SDRAM的地址信号管脚A11和第二SDRAM的地址信号管脚A13。也就是说,SOC芯片通过地址信号管脚A11传输的模式寄存器的配置值会传输至第一SDRAM的地址信号管脚A11和第二SDRAM的地址信号管脚A13。因此,通过SOC芯片的地址信号管脚向第一SDRAM和第二SDRAM传输模式寄存器的配置值时,SOC芯片获知自身的地址信号管脚和第二SDRAM的地址信号管脚的对应关系,即可通过正确的地址信号管脚将模式寄存器的配置值传输至第二SDRAM中相对应的地址信号管脚。Since the first SDRAM and the second SDRAM image are fixed on both sides of the single board 401, the address signal pins of the SOC chip 402 and the address sequence of the address signal pins of the first SDRAM are in one-to-one correspondence, and the address signal tube of the SOC chip The line order of the pin and the address signal pins of the second SDRAM are not necessarily one-to-one correspondence. For example, the address signal pin A11 of the SOC chip corresponds to the address signal pin A11 of the first SDRAM and the address signal pin A13 of the second SDRAM. That is, the configuration value of the mode register transmitted by the SOC chip through the address signal pin A11 is transmitted to the address signal pin A11 of the first SDRAM and the address signal pin A13 of the second SDRAM. Therefore, when the configuration value of the mode register is transmitted to the first SDRAM and the second SDRAM by the address signal pin of the SOC chip, the SOC chip knows the correspondence between the address signal pin of the second SDRAM and the address signal pin of the second SDRAM. The configuration value of the mode register is transferred to the corresponding address signal pin in the second SDRAM through the correct address signal pin.
需要说明的是,本申请中第一SDRAM的数量可以为多个。当固定于单板的第一侧的第一SDRMA的数量为多个时,镜像固定于单板的第二侧的第二SDRAM的数量也为多个。即,多个第一SDRAM和多个第二SDRAM是一一对应的,对于每个固定于单板的第一侧的第一SDRAM来说,均有一个镜像固定于单板的第二侧的第二SDRAM与之对应。当第一SDRAM和第二SDRAM的数量均为多个时,本申请提供的存储器的控制装置中,单板的布线方式可如图5所示。图5中SOC芯片的内部结构以及各个部件所执行的操作与图4 中的SOC芯片402相同,因此图5中未示出SOC芯片的内部结构。It should be noted that the number of the first SDRAMs in the present application may be multiple. When the number of the first SDMMAs fixed to the first side of the single board is plural, the number of the second SDRAMs mirrored to the second side of the single board is also plural. That is, the plurality of first SDRAMs and the plurality of second SDRAMs are in one-to-one correspondence. For each of the first SDRAMs fixed to the first side of the single board, a mirror image is fixed on the second side of the single board. The second SDRAM corresponds to it. When the number of the first SDRAM and the second SDRAM is multiple, in the control device of the memory provided by the present application, the routing manner of the single board can be as shown in FIG. 5. Figure 5 shows the internal structure of the SOC chip and the operations performed by the various components and Figure 4 The SOC chip 402 is the same, so the internal structure of the SOC chip is not shown in FIG.
对于这种第一SDRMA和第二SDRMA的数量均为多个的情况,若采用本申请提供的存储器的控制装置控制第一SDRAM和第二SDRAM执行访问指令,SOC芯片可将访问指令和第一片选信号分别输出至多个第一SDRAM,并将访问指令和第二片选信号分别输出至多个第二SDRAM。那么,在执行访问指令时,多个第一SDRMA均根据第一片选信号来确定是否需要执行访问指令,即多个第一SDRAM执行访问指令的操作是同步的。比如,当访问指令为MRS指令、且第一片选信号有效时,多个第一SDRAM均执行MRS指令;再比如,当访问指令为MRS指令、且第一片选信号无效时,多个第一SDRAM均不执行该MRS指令。同样地,多个第二SDRAM根据第二片选信号来确定是否需要执行访问指令时,多个第二SDRAM执行访问指令的操作也是同步的,此处不再赘述。For the case where the number of the first SDRMA and the second SDRMA is multiple, if the control device of the memory provided by the present application controls the first SDRAM and the second SDRAM to execute the access instruction, the SOC chip can access the instruction and the first The chip select signals are respectively output to the plurality of first SDRAMs, and the access instructions and the second chip select signals are respectively output to the plurality of second SDRAMs. Then, when the access instruction is executed, the plurality of first SDRMAs determine whether the access instruction needs to be executed according to the first chip select signal, that is, the operations of the plurality of first SDRAMs to execute the access instruction are synchronized. For example, when the access instruction is an MRS instruction and the first chip select signal is valid, the plurality of first SDRAMs execute the MRS instruction; for example, when the access instruction is the MRS instruction and the first chip selection signal is invalid, the plurality of None of the SDRAMs execute the MRS instruction. Similarly, when the plurality of second SDRAMs determine whether the access instruction needs to be executed according to the second chip select signal, the operations of the plurality of second SDRAMs to execute the access instruction are also synchronized, and details are not described herein again.
本申请中,由于SOC芯片与第一SDRAM被固定于单板的第一侧,第二SDRAM被固定于单板的第二侧,第一SDRAM的地址信号管脚和SOC芯片的地址信号管脚通过第一地址信号链路通信连接、第一SDRAM的片选信号管脚和SOC芯片的第一片选信号管脚通过第一片选信号链路通信连接;第二SDRAM的地址信号管脚和SOC芯片的地址信号管脚通过第一地址信号链路和第二地址信号链路通信连接、第二SDRAM的片选信号管脚和SOC芯片的第二片选信号管脚通过第二片选信号链路和第三片选信号链路通信连接。因而在对第一SDRAM和第二SDRAM布线时,第一SDRAM和第二SDRAM可共用第一地址信号链路。此外,第一地址信号链路和第二地址信号链路仅通过单板上的至少一个过孔通信连接,第二片选信号链路和第三片选信号链路也通过单板上的至少一个过孔通信连接,因而与图2所示的现有技术中提供的单板布线方案相比,装置400中的单板布线方案减小了布线面积和布线层数,从而降低了布线难度。同时,由于在布线时减少了单板上布线数量、布线面积和布线层数,因此采用本申请提供的装置400可以减少由于单板布线带来的信号间的串扰和噪声,提高信号质量。In the present application, since the SOC chip and the first SDRAM are fixed on the first side of the board, the second SDRAM is fixed on the second side of the board, the address signal pin of the first SDRAM and the address signal pin of the SOC chip. The first chip signal link communication pin, the chip select signal pin of the first SDRAM, and the first chip select signal pin of the SOC chip are communicatively connected through the first chip select signal link; the address signal pin of the second SDRAM and The address signal pin of the SOC chip is communicably connected through the first address signal link and the second address signal link, the chip select signal pin of the second SDRAM, and the second chip select signal pin of the SOC chip pass the second chip select signal The link is in communication with the third chip select signal link. Thus, when wiring the first SDRAM and the second SDRAM, the first SDRAM and the second SDRAM can share the first address signal link. In addition, the first address signal link and the second address signal link are only connected by at least one via communication on the board, and the second chip select signal link and the third chip select signal link are also passed through at least one of the boards. A via communication connection thus reduces the routing area and number of wiring layers in the device 400 in comparison to the single board routing scheme provided in the prior art shown in FIG. 2, thereby reducing wiring difficulty. At the same time, since the number of wirings on the single board, the wiring area, and the number of wiring layers are reduced during wiring, the apparatus 400 provided by the present application can reduce crosstalk and noise between signals due to single board wiring, and improve signal quality.
此外,由于SOC芯片中的动态存储控制器根据模式参数使两个片选信号中的至少一个片选信号有效,且SOC芯片中的驱动器将访问指令和第一片选信号输出至第一SDRAM,将访问指令和第二片选信号输出至第二SDRAM。因此,在需要第一SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号有效、第二片选信号无效,从而使得第一SDRAM可单独执行该访问指令;或者,在需要第二SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号无效、第二片选信号有效,从而使得第二SDRAM可单独执行该访问指令;或者,在需要第一SDRAM和第二SDRAM同时执行对线序没有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号和第二片选信号均有效,从而使得第一SDRAM和第二SDRAM可同时执行该访问指令。In addition, since the dynamic memory controller in the SOC chip validates at least one of the two chip select signals according to the mode parameter, and the driver in the SOC chip outputs the access command and the first chip select signal to the first SDRAM, The access command and the second chip select signal are output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, so that the first SDRAM can perform the single SDRAM separately. Accessing the instruction; or, when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the second SDRAM available The access instruction is executed separately; or, when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, the first chip selection signal and the second chip selection signal are both indicated by the indication of the mode parameter. Effective so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
例如,在需要执行MRS指令时,SOC芯片可根据模式参数指示,使得被固定于单板的第一侧的第一SDRAM单独执行MRS指令,完成模式寄存器的配置;再使得被固定于单板的第二侧的第二SDRAM单独执行MRS指令,完成模式寄存器的配置。这样就不会产生第一SDRAM和第二SDRAM同时执行MRS指令时,第二SDRAM通过错误的地址信号管脚接收模式寄存器的配置值而导致的模式寄存器配置错误的现象。在需要第一SDRAM和第二SDRAM同时执行对线序没有严格要求的访问指令时,比如数据读写指令,SOC芯片可通过模式参数指示,使得第一片选信号和第二片选信号均有效,从而保证该访 问指令的正确执行。For example, when the MRS instruction needs to be executed, the SOC chip may perform the MRS instruction separately by the first SDRAM fixed on the first side of the board according to the mode parameter indication, and complete the configuration of the mode register; The second SDRAM of the second side separately executes the MRS instruction to complete the configuration of the mode register. Thus, when the first SDRAM and the second SDRAM are simultaneously executed, the second SDRAM receives the configuration value of the mode register through the wrong address signal pin, and the mode register is incorrectly configured. When the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line sequence, such as a data read/write instruction, the SOC chip can indicate that the first chip selection signal and the second chip selection signal are valid by the mode parameter indication. To ensure the visit Ask the correct execution of the instruction.
需要说明的是,本申请实施例中国对SOC芯片的规格和型号不做限制。It should be noted that, in the embodiment of the present application, the specifications and models of the SOC chip are not limited in China.
当装置400中的SOC芯片仅支持一个片选信号输出时,可在SOC芯片中额外增加一个管脚作为输出片选信号的管脚。这是因为,SOC芯片本身仅支持一个片选信号输出,但本申请所提供的装置400中,SOC芯片402中需输出第一片选信号和第二片选信号两个片选信号,此时,可在SOC芯片中额外增加一个管脚作为输出片选信号的管脚,从而实现SOC芯片可输出两个片选信号。When the SOC chip in the device 400 supports only one chip select signal output, an additional pin may be added to the SOC chip as a pin for outputting the chip select signal. This is because the SOC chip itself supports only one chip select signal output. However, in the apparatus 400 provided by the present application, the SOC chip 402 needs to output two chip select signals of the first chip select signal and the second chip select signal. An additional pin can be added to the SOC chip as a pin for outputting a chip select signal, so that the SOC chip can output two chip select signals.
当装置400中的SOC芯片支持多个片选信号输出时,无需在SOC芯片的管脚中额外增加管脚以输出片选信号,而是可利用SOC芯片自身用于输出片选信号的多个管脚来输出两个片选信号。When the SOC chip in the device 400 supports multiple chip select signal outputs, it is not necessary to additionally add a pin in the pin of the SOC chip to output a chip select signal, but the SOC chip itself can be used to output multiple chip select signals. Pin to output two chip select signals.
基于以上实施例,本申请还提供一种存储器的控制方法,该存储器的控制方法的执行主体可视为图4所示的存储器的控制装置中的SOC芯片。如图6所示,该方法包含如下步骤:Based on the above embodiment, the present application further provides a control method of a memory, and an execution body of the control method of the memory can be regarded as a SOC chip in the control device of the memory shown in FIG. 4. As shown in FIG. 6, the method includes the following steps:
S601:根据指令需求生成对两个SDRAM的访问指令。S601: Generate an access instruction for two SDRAMs according to the instruction requirement.
其中,两个SDRAM被镜像固定于单板的两侧。The two SDRAMs are mirrored and fixed on both sides of the board.
S602:根据访问指令生成两个片选信号。S602: Generate two chip select signals according to the access instruction.
其中,两个片选信号中的第一片选信号用于使能两个SDRAM中的第一SDRAM,两个片选信号中的第二片选信号用于使能两个SDRAM中的第二SDRAM。Wherein the first chip select signal of the two chip select signals is used to enable the first SDRAM of the two SDRAMs, and the second chip select signal of the two chip select signals is used to enable the second of the two SDRAMs SDRAM.
S603:根据模式参数使两个片选信号中的至少一个片选信号有效。S603: Enable at least one of the two chip select signals to be valid according to the mode parameter.
其中,模式参数用于指示两个片选信号中每个片选信号的有效性。The mode parameter is used to indicate the validity of each chip select signal of the two chip select signals.
S604:将访问指令和第一片选信号输出至第一SDRAM,将访问指令和第二片选信号输出至第二SDRAM。S604: Output the access instruction and the first chip selection signal to the first SDRAM, and output the access instruction and the second chip selection signal to the second SDRAM.
可选地,访问指令可以为MRS指令,访问指令也可以为数据读写指令。Optionally, the access instruction may be an MRS instruction, and the access instruction may also be a data read/write instruction.
可选地,S603中根据模式参数使两个片选信号中的至少一个片选信号有效,具体可通过以下方式实现:当模式参数为第一预设值时,使第一片选信号有效;当模式参数为第二预设值时,使第二片选信号有效;当模式参数为第三预设值或第四预设值时,使第一片选信号和第二片选信号有效。Optionally, in S603, at least one of the two chip select signals is valid according to the mode parameter, which may be implemented by: when the mode parameter is the first preset value, making the first chip select signal valid; When the mode parameter is the second preset value, the second chip selection signal is enabled; when the mode parameter is the third preset value or the fourth preset value, the first chip selection signal and the second chip selection signal are enabled.
图6所示方法可视为装置400中的SOC芯片402所执行的方法,因此图6中未详细解释和描述的实现方式可参照装置400中的相关描述。The method illustrated in FIG. 6 can be viewed as a method performed by SOC chip 402 in device 400, and thus implementations not detailed and described in FIG. 6 can be referred to the related description in device 400.
在图6所示方法中,由于第一SDRAM和第二SDRAM被镜像固定于单板的两侧,因而在对第一SDRAM和第二SDRAM布线时,布线方式更易于实现。这是因为:由于第一SDRAM和第二SDRAM被镜像固定于单板的两侧,那么第一SDRAM和第二SDRAM可共用地址信号链路,与现有技术中在单板上分别对每个SDRAM进行布线的方式相比,减小了布线面积和布线层数,从而降低了布线难度。同时,由于在布线时减少了单板上布线数量、布线面积和布线层数,因此采用本申请提供的存储器的控制方法可以减少由于单板布线带来的信号间的串扰和噪声,提高信号质量。In the method shown in FIG. 6, since the first SDRAM and the second SDRAM are mirror-fixed on both sides of the single board, the wiring manner is easier to implement when wiring the first SDRAM and the second SDRAM. This is because, since the first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board, the first SDRAM and the second SDRAM can share the address signal link, which is different from the prior art on the board. Compared with the way in which the SDRAM is wired, the wiring area and the number of wiring layers are reduced, thereby reducing the wiring difficulty. At the same time, since the number of wirings on the board, the wiring area, and the number of wiring layers are reduced during wiring, the memory control method provided by the present application can reduce crosstalk and noise between signals caused by single board wiring, and improve signal quality. .
此外,由于S603中根据模式参数使两个片选信号中的至少一个片选信号有效,且在S604中将访问指令和第一片选信号输出至第一SDRAM,将访问指令和第二片选信号输出至第二SDRAM。因此,在需要第一SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号有效、第二片选信号无效,从而使得第一SDRAM 可单独执行该访问指令,或者在需要第二SDRAM执行对线序有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号无效、第二片选信号有效,从而使得第二SDRAM可单独执行该访问指令;在需要第一SDRAM和第二SDRAM同时执行对线序没有严格要求的访问指令时,可通过模式参数的指示,使得第一片选信号和第二片选信号均有效,从而使得该第一SDRAM和第二SDRAM可同时执行该访问指令。In addition, since at least one of the two chip select signals is valid according to the mode parameter in S603, and the access command and the first chip select signal are output to the first SDRAM in S604, the access command and the second chip select are performed. The signal is output to the second SDRAM. Therefore, when the first SDRAM is required to execute an access instruction that has strict requirements on the line order, the first chip select signal is valid and the second chip select signal is invalid by the indication of the mode parameter, thereby making the first SDRAM The access instruction may be executed separately, or when the second SDRAM is required to execute an access instruction that has strict requirements on the line sequence, the first chip selection signal is invalid and the second chip selection signal is valid by the indication of the mode parameter, thereby making the first The second SDRAM can separately execute the access instruction; when the first SDRAM and the second SDRAM are required to simultaneously execute an access instruction that is not strictly required for the line order, the first chip selection signal and the second chip selection signal can be made by the indication of the mode parameter. All are valid, so that the first SDRAM and the second SDRAM can simultaneously execute the access instruction.
下面,以访问指令为MRS指令为例,详述如何采用本申请所提供的存储器的控制方法来控制两个SDRAM执行访问指令,具体执行步骤如图7所示。其中,图7所示方法可视为图6所示方法的一个示例。In the following, taking the access command as an MRS command as an example, how to use the memory control method provided by the present application to control two SDRAMs to execute an access command is described in detail. The specific execution steps are as shown in FIG. 7. Among them, the method shown in FIG. 7 can be regarded as an example of the method shown in FIG. 6.
如图7所示,该方法包含以下步骤:As shown in Figure 7, the method includes the following steps:
步骤一:SOC芯片上电。Step 1: The SOC chip is powered on.
步骤二:初始化动态存储控制器。Step 2: Initialize the dynamic storage controller.
其中,初始化动态存储控制器包含配置工作模式、配置时序参数等。The initialization dynamic storage controller includes a configuration working mode, a configuration timing parameter, and the like.
步骤三:初始化物理层接口。Step 3: Initialize the physical layer interface.
初始化物理层接口主要是指锁相环(Phase Locked Loop,PLL)的初始化和校准,以及延迟锁相环(Delay Locked Loop,DLL)的初始化和校准,从而产生系统的工作时钟以及完成物理层接口自身的校准。Initializing the physical layer interface mainly refers to the initialization and calibration of the Phase Locked Loop (PLL), and the initialization and calibration of the Delay Locked Loop (DLL), thereby generating the operating clock of the system and completing the physical layer interface. Its own calibration.
步骤四:配置动态存储控制器中用于复位两个SDRAM的寄存器。Step 4: Configure the registers in the dynamic memory controller to reset the two SDRAMs.
配置动态存储控制器中用于复位两个SDRAM的寄存器,从而实现两个SDRAM的复位:即,使两个SDRAM均处于IDLE状态并根据JEDEC协议要求,保持IDLE状态至少200us,随后撤销复位。The registers of the dynamic memory controller for resetting the two SDRAMs are configured to implement resetting of the two SDRAMs: that is, both SDRAMs are in the IDLE state and the IDLE state is maintained for at least 200 us according to the JEDEC protocol requirements, and then the reset is cancelled.
步骤五:配置动态存储控制器和两个SDRAM退出自动刷新状态。Step 5: Configure the dynamic storage controller and two SDRAMs to exit the automatic refresh state.
根据JEDEC协议要求,在执行完步骤四至少500us后,通过拉高CEK信号,配置动态存储控制器和两个SDRAM退出自动刷新状态。According to the requirements of the JEDEC protocol, after performing step four for at least 500us, the dynamic memory controller and the two SDRAMs are configured to exit the automatic refresh state by pulling up the CEK signal.
步骤六:通过模式参数的指示,配置第一SDRAM的模式寄存器。Step 6: Configure the mode register of the first SDRAM by the indication of the mode parameter.
在执行步骤六时,模式参数可以为01,此时模式参数指示第一片选信号有效,然后SOC芯片可通过动态存储控制器向第一SDRAM发送MRS指令,第一SDRAM在接收到MRS指令后可通过执行MRS指令完成模式寄存器的配置。When step 6 is performed, the mode parameter may be 01, and the mode parameter indicates that the first chip select signal is valid, and then the SOC chip may send the MRS command to the first SDRAM through the dynamic memory controller, and the first SDRAM receives the MRS command. The configuration of the mode register can be done by executing the MRS instruction.
步骤七:通过模式参数的指示,配置第二SDRAM的模式寄存器。Step 7: Configure the mode register of the second SDRAM by the indication of the mode parameter.
在执行步骤六时,模式参数可以为10,此时模式参数指示第二片选信号有效,然后SOC芯片可通过动态存储控制器向第二SDRAM发送MRS指令,第二SDRAM在接收到MRS指令后可通过执行MRS指令完成模式寄存器的配置。When step 6 is performed, the mode parameter may be 10, and the mode parameter indicates that the second chip select signal is valid, and then the SOC chip may send the MRS command to the second SDRAM through the dynamic memory controller, and the second SDRAM after receiving the MRS command The configuration of the mode register can be done by executing the MRS instruction.
步骤八:通过模式参数的指示,使得用于使能两个SDRAM的片选信号均有效。Step 8: The chip select signals for enabling both SDRAMs are valid by the indication of the mode parameters.
在执行步骤八时,模式参数可以为00或11,此时模式参数指示第一片选信号和第二片选信号均有效。也就是说,步骤六和步骤七中分别对第一SDRAM和第二SDRAM的模式寄存器进行配置后,可通过模式参数的指示使得第一片选信号和第二片选信号均有效,从而使得两个SDRAM在完成模式寄存器的配置后能同时执行数据读写指令。When step 8 is performed, the mode parameter may be 00 or 11, and the mode parameter indicates that both the first chip select signal and the second chip select signal are valid. That is to say, after configuring the mode registers of the first SDRAM and the second SDRAM in steps 6 and 7 respectively, the first chip selection signal and the second chip selection signal are both valid by the indication of the mode parameter, thereby making the two The SDRAM can simultaneously execute data read and write instructions after the configuration of the mode register is completed.
步骤九:启动物理层接口的数据训练。Step 9: Start data training on the physical layer interface.
启动物理层接口的数据训练,从而找到合适的数据采样窗口。Start data training on the physical layer interface to find the appropriate data sampling window.
步骤十:开始启动系统业务。Step 10: Start the system business.
执行完步骤十后,两个SDRAM就可同时正常执行数据读写指令。 After the execution of step ten, the two SDRAMs can simultaneously execute the data read and write instructions.
需要说明的是,在执行步骤十后,若需要对两个SDRAM中的某一个SDRAM进行单独操作,动态存储控制器仍可通过配置相应的模式参数来实现。It should be noted that, after performing step 10, if it is necessary to perform a separate operation on one of the two SDRAMs, the dynamic storage controller can still be implemented by configuring corresponding mode parameters.
综上,采用本申请提供的存储器的控制方法及装置,可在控制属于同一RANK的多个SDRAM执行访问指令时降低布线难度、提高信号质量。In summary, the memory control method and apparatus provided by the present application can reduce wiring difficulty and improve signal quality when controlling access commands of a plurality of SDRAMs belonging to the same RANK.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。 It will be apparent to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit and scope of the application. Thus, it is intended that the present invention cover the modifications and variations of the present invention.

Claims (6)

  1. 一种存储器的控制方法,其特征在于,包括:A method for controlling a memory, comprising:
    根据指令需求生成对两个同步动态随机存储器SDRAM的访问指令,所述两个SDRAM被镜像固定于单板的两侧;Generating access instructions to two synchronous dynamic random access memory SDRAMs according to the instruction requirements, the two SDRAMs being mirrored and fixed on both sides of the board;
    根据所述访问指令生成两个片选信号,所述两个片选信号中的第一片选信号用于使能所述两个SDRAM中的第一SDRAM,所述两个片选信号中的第二片选信号用于使能所述两个SDRAM中的第二SDRAM;Generating two chip select signals according to the access instruction, wherein a first chip select signal of the two chip select signals is used to enable a first SDRAM of the two SDRAMs, where the two chip select signals a second chip select signal for enabling a second SDRAM of the two SDRAMs;
    根据模式参数使所述两个片选信号中的至少一个片选信号有效,所述模式参数用于指示所述两个片选信号中每个片选信号的有效性;And causing at least one chip select signal of the two chip select signals to be valid according to a mode parameter, where the mode parameter is used to indicate validity of each chip select signal of the two chip select signals;
    将所述访问指令和所述第一片选信号输出至所述第一SDRAM,将所述访问指令和所述第二片选信号输出至所述第二SDRAM。Outputting the access instruction and the first chip select signal to the first SDRAM, and outputting the access instruction and the second chip select signal to the second SDRAM.
  2. 如权利要求1所述的方法,其特征在于,所述访问指令为模式寄存器配置MRS指令,或者所述访问指令为数据读写指令。The method of claim 1 wherein said access instruction configures an MRS instruction for a mode register or said access instruction is a data read and write instruction.
  3. 如权利要求1或2所述的方法,其特征在于,根据模式参数使所述两个片选信号中的至少一个片选信号有效,包括:The method according to claim 1 or 2, wherein the at least one of the two chip select signals is valid according to the mode parameter, including:
    当所述模式参数为第一预设值时,使所述第一片选信号有效;When the mode parameter is the first preset value, the first chip selection signal is valid;
    当所述模式参数为第二预设值时,使所述第二片选信号有效;When the mode parameter is the second preset value, enabling the second chip select signal to be valid;
    当所述模式参数为第三预设值或第四预设值时,使所述第一片选信号和所述第二片选信号有效。When the mode parameter is a third preset value or a fourth preset value, the first chip select signal and the second chip select signal are enabled.
  4. 一种存储器的控制装置,其特征在于,包括单板、片上系统SOC芯片、第一SDRAM和第二SDRAM,所述第一SDRAM和所述第二SDRAM被镜像固定于所述单板的两侧,所述SOC芯片与所述第一SDRAM被固定于所述单板的第一侧,所述第二SDRAM被固定于所述单板的第二侧,所述单板的第一侧上设有第一地址信号链路、第一片选信号链路和第二片选信号链路,所述第一地址信号链路用于连接所述第一SDRAM的地址信号管脚和所述SOC芯片的地址信号管脚,所述第一片选信号管脚用于连接所述第一SDRAM的片选信号管脚和所述SOC芯片的第一片选信号管脚,所述单板上还设有至少一个过孔,所述第一地址信号链路通过所述至少一个过孔与所述单板的第二侧上的第二地址信号链路通信连接,所述第二片选信号链路通过所述至少一个过孔与所述单板的第二侧上的第三片选信号链路通信连接,所述第一地址信号链路和第二地址信号链路一起将所述SOC芯片的地址信号管脚和所述第二SDRAM的地址信号管脚通信连接,所述第二片选信号链路和所述第三片选信号链路一起将所述SOC芯片的第二片选信号管脚和所述第二SDRAM的片选信号管脚通信连接;A control device for a memory, comprising: a single board, an on-chip system SOC chip, a first SDRAM and a second SDRAM, wherein the first SDRAM and the second SDRAM are mirrored and fixed on both sides of the board The SOC chip and the first SDRAM are fixed on the first side of the board, and the second SDRAM is fixed on the second side of the board, and the first side of the board is a first address signal link, a first chip select signal link, and a second chip select signal link, wherein the first address signal link is used to connect an address signal pin of the first SDRAM and the SOC chip The address signal signal pin, the first chip select signal pin is used to connect the chip select signal pin of the first SDRAM and the first chip select signal pin of the SOC chip, and the board is further configured Having at least one via, the first address signal link being communicatively coupled to a second address signal link on a second side of the board through the at least one via, the second chip select signal link Communicating with the third chip select signal link on the second side of the board through the at least one via, The first address signal link and the second address signal link together connect an address signal pin of the SOC chip and an address signal pin of the second SDRAM, the second chip select signal link and The third chip select signal link communicatively connects the second chip select signal pin of the SOC chip and the chip select signal pin of the second SDRAM;
    所述SOC芯片包括:The SOC chip includes:
    处理器,用于根据指令需求生成对所述第一SDRAM和所述第二SDRAM的访问指令;a processor, configured to generate an access instruction to the first SDRAM and the second SDRAM according to an instruction requirement;
    动态存储控制器,用于根据所述访问指令生成两个片选信号,根据模式参数使所述两个片选信号中的至少一个片选信号有效;其中,所述两个片选信号中的第一片选信号用于使能所述第一SDRAM,所述两个片选信号中的第二片选信号用于使能所述第二SDRAM,所述模式参数用于指示所述两个片选信号中每个片选信号的有效性;a dynamic storage controller, configured to generate two chip select signals according to the access instruction, and enable at least one chip select signal of the two chip select signals according to a mode parameter; wherein, among the two chip select signals a first chip select signal for enabling the first SDRAM, a second chip select signal of the two chip select signals for enabling the second SDRAM, the mode parameter is used to indicate the two The validity of each chip select signal in the chip select signal;
    驱动器,用于将所述访问指令和所述第一片选信号输出至所述第一SDRAM,将所述 访问指令和所述第二片选信号输出至所述第二SDRAM。a driver for outputting the access instruction and the first chip select signal to the first SDRAM, The access instruction and the second chip select signal are output to the second SDRAM.
  5. 如权利要求4所述的装置,其特征在于,所述访问指令为MRS指令,或者所述访问指令为数据读写指令。The apparatus according to claim 4, wherein said access instruction is an MRS instruction, or said access instruction is a data read/write instruction.
  6. 如权利要求4或5所述的装置,其特征在于,所述动态存储控制器在根据模式参数使所述两个片选信号中的至少一个片选信号有效时,包括:The device according to claim 4 or 5, wherein the dynamic storage controller, when validating at least one of the two chip select signals according to the mode parameter, comprises:
    当所述模式参数为第一预设值时,所述动态存储控制器使所述第一片选信号有效;When the mode parameter is the first preset value, the dynamic storage controller makes the first chip select signal valid;
    当所述模式参数为第二预设值时,所述动态存储控制器使所述第二片选信号有效;When the mode parameter is the second preset value, the dynamic storage controller makes the second chip select signal valid;
    当所述模式参数为第三预设值或第四预设值时,所述动态存储控制器使所述第一片选信号和所述第二片选信号有效。 When the mode parameter is a third preset value or a fourth preset value, the dynamic storage controller makes the first chip select signal and the second chip select signal valid.
PCT/CN2017/099101 2017-02-28 2017-08-25 Memory control method and device WO2018157569A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710114798.6 2017-02-28
CN201710114798.6A CN108509359A (en) 2017-02-28 2017-02-28 A kind of control method and device of memory

Publications (1)

Publication Number Publication Date
WO2018157569A1 true WO2018157569A1 (en) 2018-09-07

Family

ID=63369717

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099101 WO2018157569A1 (en) 2017-02-28 2017-08-25 Memory control method and device

Country Status (2)

Country Link
CN (1) CN108509359A (en)
WO (1) WO2018157569A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023087139A1 (en) * 2021-11-16 2023-05-25 Renesas Electronics America Inc. Register clock driver with chip select loopback

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118523A (en) * 2006-08-01 2008-02-06 飞思卡尔半导体公司 Memory accessing control device and method thereof, and memory accessing controller and method thereof
US20100232197A1 (en) * 2009-03-10 2010-09-16 Samsung Electronics Co., Ltd Data storage device
CN102077180A (en) * 2008-07-03 2011-05-25 巴比禄股份有限公司 Memory module and auxiliary module for memory
CN104461956A (en) * 2013-09-18 2015-03-25 华为技术有限公司 Method, device and system for accessing synchronous dynamic random access memories (SDRAMs)
CN105095122A (en) * 2014-04-17 2015-11-25 华为技术有限公司 Method for controlling memory chip, chip controller, and memory controller

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080025594A (en) * 2006-09-18 2008-03-21 삼성전자주식회사 Portable computer
US7477522B2 (en) * 2006-10-23 2009-01-13 International Business Machines Corporation High density high reliability memory module with a fault tolerant address and command bus
CN102201256A (en) * 2010-03-21 2011-09-28 昆达电脑科技(昆山)有限公司 Symmetric synchronous dynamic random access memory (SDRAM) expanded structure
CN104254889A (en) * 2012-05-01 2014-12-31 惠普发展公司,有限责任合伙企业 Packaged memory dies that share a chip select line
TW201530726A (en) * 2014-01-29 2015-08-01 Eorex Corp Memory chip and memory storage device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118523A (en) * 2006-08-01 2008-02-06 飞思卡尔半导体公司 Memory accessing control device and method thereof, and memory accessing controller and method thereof
CN102077180A (en) * 2008-07-03 2011-05-25 巴比禄股份有限公司 Memory module and auxiliary module for memory
US20100232197A1 (en) * 2009-03-10 2010-09-16 Samsung Electronics Co., Ltd Data storage device
CN104461956A (en) * 2013-09-18 2015-03-25 华为技术有限公司 Method, device and system for accessing synchronous dynamic random access memories (SDRAMs)
CN105095122A (en) * 2014-04-17 2015-11-25 华为技术有限公司 Method for controlling memory chip, chip controller, and memory controller

Also Published As

Publication number Publication date
CN108509359A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
US11513955B2 (en) Memory module with local synchronization and method of operation
EP3447770B1 (en) High capacity memory system using standard controller component
JP4891925B2 (en) Memory buffer for merging local data from memory modules
JP5191555B2 (en) Integrated circuit with bimodal data strobe
JP6434161B2 (en) Calibration of control device received from source synchronous interface
US8069274B2 (en) System and method for serial data communications between host and communications devices, and communications device employed in the system and method
JP2005071354A (en) Data signal reception latch control using clock aligned to strobe signal
US9257200B2 (en) Bit error testing and training in double data rate (DDR) memory system
US20090190417A1 (en) Semiconductor integrated circuit device and method of testing same
KR20120115358A (en) Multi-site testing of computer memory devices and serial io ports
TWI581271B (en) Memory device and method for implementing an error detection protocol
US11252223B2 (en) Adaptive communication interface
JP2009527829A (en) Common analog interface for multiple processor cores
KR20080076851A (en) Per byte lane dynamic on-die termination
US8724483B2 (en) Loopback configuration for bi-directional interfaces
US20230178121A1 (en) High-bandwidth memory module architecture
WO2018157569A1 (en) Memory control method and device
US20120110400A1 (en) Method and Apparatus for Performing Memory Interface Calibration
US20160103615A1 (en) Apparatuses and methods including selectively providing a single or separate chip select signals
WO2015158264A1 (en) Method for controlling memory chip, chip controller, and memory controller
US10203875B1 (en) Methods and systems for implementing high bandwidth memory command address bus training
TWI811230B (en) Semiconductor system and method for testing semiconductor system
TWI488184B (en) Serial flash controller, serial flash memory, and method thereof
TWI457944B (en) Apparatus, method and system for communicating with semiconductor devices of a serial interconnection
US20230385222A1 (en) High-speed low-latency interconnect interface (hlii) for silicon interposer interconnection

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: 17898481

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17898481

Country of ref document: EP

Kind code of ref document: A1