[go: up one dir, main page]

CN100357870C - Method of proceeding access multikind storage on chip select outer unibus - Google Patents

Method of proceeding access multikind storage on chip select outer unibus Download PDF

Info

Publication number
CN100357870C
CN100357870C CNB2005100323070A CN200510032307A CN100357870C CN 100357870 C CN100357870 C CN 100357870C CN B2005100323070 A CNB2005100323070 A CN B2005100323070A CN 200510032307 A CN200510032307 A CN 200510032307A CN 100357870 C CN100357870 C CN 100357870C
Authority
CN
China
Prior art keywords
memory
signal
read
write
control register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100323070A
Other languages
Chinese (zh)
Other versions
CN1758208A (en
Inventor
汪东
马剑武
陈书明
郭阳
孙书为
方兴
扈啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CNB2005100323070A priority Critical patent/CN100357870C/en
Publication of CN1758208A publication Critical patent/CN1758208A/en
Application granted granted Critical
Publication of CN100357870C publication Critical patent/CN100357870C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

本发明公开了一种对挂接在片外单总线上的多种存储器进行访问的方法,目的是提出一种对挂接在片外单总线上的多种存储器进行访问的方法。技术方案是将访存地址范围划分成M个子空间,每个子空间对应一种存储器;设计一种单总线存储器接口,在接口上设置M条片选信号,每个片选信号连接一种存储器;存储器接口内部集成一个译码单元、一个控制寄存器组、M种存储控制器和一个交叉开关,实现对各个存储器参数的配置、片选信号的译码和总线信号的生成,通过对总线信号的选择实现对单总线上同时挂接的M种存储器进行访问。采用本发明后嵌入式微处理器能够通过单总线对挂接在片外的多种存储器进行访问,降低这类微处理器的功耗和面积,减少引脚个数。

Figure 200510032307

The invention discloses a method for accessing a variety of memories connected to an off-chip single bus, and aims to provide a method for accessing a variety of memories connected to an off-chip single bus. The technical solution is to divide the memory access address range into M subspaces, and each subspace corresponds to a memory; design a single-bus memory interface, set M chip select signals on the interface, and each chip select signal is connected to a memory; The memory interface integrates a decoding unit, a control register group, M types of memory controllers and a crossbar switch to realize the configuration of various memory parameters, the decoding of chip select signals and the generation of bus signals. Through the selection of bus signals Realize the access to M kinds of memories connected to the single bus at the same time. After adopting the invention, the embedded microprocessor can access various memories connected outside the chip through a single bus, thereby reducing the power consumption and area of this type of microprocessor, and reducing the number of pins.

Figure 200510032307

Description

对挂接在片外单总线上的多种存储器进行访问的方法Method for accessing various memories attached to off-chip single bus

技术领域:本发明涉及嵌入式微处理器和SoC(System on Chip,片上系统)中,对挂接在片外单总线上的多种存储器进行访问的方法。Technical field: the present invention relates to embedded microprocessor and SoC (System on Chip, system on a chip), the method for accessing multiple memory devices connected on the single bus outside the chip.

背景技术:在通用CPU中,负责与外部存储器交换数据的存控部件都由主板上的桥接芯片来实现。而在嵌入式微处理器,例如DSP(Digital Signal Processor,数字信号处理器)、ASIC(Appl ication Specific Integrated Circuit,专用集成电路),以及某些SoC中,存控部件常常与CPU核、DMA(Direct Memory Access,直接存储器存取)等部件集成在一块芯片上,通过外部总线直接与存储器交换数据。这种负责访问片外存储器的存控部件也称为存储器接口。将存储器接口与CPU核集成在同一块芯片上的方式能够有效提高数据吞吐带宽,降低系统功耗,减少板上布线对高速信号传输的干扰。但是在嵌入式应用中,系统往往需要同时挂接多种存储器,例如用于高速数据缓冲的SDRAM或SBSRAM,用于存储用户程序的Flash或ROM,用于数据交换的FIFO等。存储器接口对内响应DMA的访存请求,对外访问不同的存储器。这些存储器的读写方式各不相同,每种存储器的地址范围也不相同。常规的实现方法是在芯片内给每种存储器分别设计一个存储控制部件,同时在芯片引脚中为每种存储器设置一套读写总线。但是这种方法会大大增加芯片的功耗、面积和引脚个数,而嵌入式应用往往要求微处理器具有较低的功耗、较小的面积和较少的引脚个数。如何对单总线上同时挂接的多种存储器进行访问是这类微处理器设计中亟待解决的重要问题。这里所说的“单总线”是指包括地址、数据、读/写使能等存储器控制信号在内的唯一一套访存总线。BACKGROUND OF THE INVENTION: In a general-purpose CPU, the memory control components responsible for exchanging data with external memories are implemented by bridge chips on the motherboard. In embedded microprocessors, such as DSP (Digital Signal Processor, digital signal processor), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), and some SoCs, memory control components are often combined with CPU core, DMA (Direct Memory Access, direct memory access) and other components are integrated on a chip, and directly exchange data with the memory through an external bus. This storage control unit responsible for accessing off-chip memory is also called a memory interface. The method of integrating the memory interface and the CPU core on the same chip can effectively improve the data throughput bandwidth, reduce system power consumption, and reduce the interference of on-board wiring on high-speed signal transmission. However, in embedded applications, the system often needs to connect multiple memories at the same time, such as SDRAM or SBSRAM for high-speed data buffering, Flash or ROM for storing user programs, and FIFO for data exchange. The memory interface responds to the memory access request of the DMA internally, and accesses different memories externally. These memories are read and written in different ways, and the address range of each kind of memory is also different. The conventional implementation method is to design a storage control unit for each type of memory in the chip, and set a read-write bus for each type of memory in the chip pins. But this method will greatly increase the power consumption, area and number of pins of the chip, and embedded applications often require microprocessors to have lower power consumption, smaller area and fewer pins. How to access multiple memories connected simultaneously on a single bus is an important problem to be solved urgently in the design of this type of microprocessor. The "single bus" mentioned here refers to the only set of memory access bus including address, data, read/write enable and other memory control signals.

发明内容:Invention content:

本发明要解决的技术问题是:针对嵌入式应用系统中需要挂接和访问多种存储器的需要,提出一种对挂接在片外单总线上的多种存储器进行访问的方法,使嵌入式微处理器能够通过单总线对挂接在片外的多种存储器进行访问,克服传统的采用多总线访问多种存储器方法的不足,降低这类微处理器的功耗和面积,减少引脚个数。The technical problem to be solved by the present invention is to propose a method for accessing various memories connected to an off-chip single bus for the embedded application system that needs to connect and access various memories, so that the embedded micro The processor can access a variety of memories connected outside the chip through a single bus, overcome the shortcomings of the traditional method of using multiple buses to access a variety of memories, reduce the power consumption and area of this type of microprocessor, and reduce the number of pins .

技术方案是将访存地址范围划分成M个子空间,每个子空间对应一种存储器。在嵌入式微处理器中设计一种单总线存储器接口,在接口上设置M条片选信号,每个片选信号连接一种存储器。存储器接口内部集成一个译码单元、一个控制寄存器组、M种存储控制器和一个交叉开关,实现对各个存储器参数的配置、片选信号的译码和总线信号的生成,通过对总线信号的选择实现对单总线上同时挂接的M种存储器进行访问的目标。The technical solution is to divide the memory access address range into M subspaces, and each subspace corresponds to a kind of memory. A single-bus memory interface is designed in an embedded microprocessor, and M chip selection signals are set on the interface, and each chip selection signal is connected to a memory. The memory interface integrates a decoding unit, a control register group, M types of memory controllers and a crossbar switch to realize the configuration of various memory parameters, the decoding of chip select signals and the generation of bus signals. Through the selection of bus signals The goal of accessing M kinds of memories connected simultaneously on the single bus is realized.

具体技术方案是:The specific technical solutions are:

首先对访存地址范围进行划分。如果外部总线同时挂接M种存储器,则把整个访存地址范围划分成M个子空间,每个子空间对应一个存储器。在划分地址子空间的时候,从地址的MSB(Most Significant Bit,最高有效位)开始进行划分。如果各个存储器的容量不同,所划分的各个子空间大小不同,即进行不均匀划分;如果总的地址范围足够大,均匀分成M个子空间后,每个子空间的大小都能够满足相应存储器的容量,则进行均匀划分,即将总的地址范围均匀分成M个子空间,这样便于译码单元进行译码。其中M为大于等于1的整数。Firstly, the access address range is divided. If M types of memories are connected to the external bus at the same time, the entire memory access address range is divided into M subspaces, and each subspace corresponds to a memory. When dividing the address subspace, start dividing from the MSB (Most Significant Bit) of the address. If the capacity of each memory is different, the size of each divided subspace is different, that is, it is divided unevenly; if the total address range is large enough, after being evenly divided into M subspaces, the size of each subspace can meet the capacity of the corresponding memory. The uniform division is performed, that is, the total address range is evenly divided into M subspaces, which is convenient for the decoding unit to perform decoding. Where M is an integer greater than or equal to 1.

单总线存储器接口的设计方法是:它由译码单元、控制寄存器组、M种存储控制器、交叉开关组成。译码单元与DMA、控制寄存器组、存储控制器和交叉开关相连,接收DMA的访存请求信号、地址信号和控制寄存器组的控制参数,对访存请求信息进行译码,产生M个片选信号输出给交叉开关,产生的读/写启动命令信号和读写次数信号输出给存储控制器;控制寄存器组通过CPU的配置总线与CPU核相连,接受CPU核对各种存储器参数的配置,并向译码单元和存储控制器发送控制参数;存储控制器接收DMA访存的数据信号、地址信号、译码单元产生的读/写命令和读/写次数信号、控制寄存器组的控制参数信号,产生读/写相应存储器所需的数据和控制信号(地址、读/写使能、输出使能等),并将这些信号送到交叉开关,存储控制器的个数与存储器种类一致,若存储器种类为M,则存储控制器的个数也为M。交叉开关对内连接M条片选信号和M个存储控制器产生的总线信号,对外通过片外单总线挂接M种存储器。The design method of the single-bus memory interface is: it is composed of a decoding unit, a control register group, M types of memory controllers, and a crossbar switch. The decoding unit is connected with the DMA, the control register group, the storage controller and the crossbar switch, receives the memory access request signal, address signal and control parameters of the control register group of the DMA, decodes the memory access request information, and generates M chip selects The signal is output to the crossbar switch, and the generated read/write start command signal and read/write times signal are output to the storage controller; the control register group is connected to the CPU core through the CPU configuration bus, accepts the CPU to check the configuration of various memory parameters, and sends to the The decoding unit and the storage controller send control parameters; the storage controller receives the data signal for DMA access, the address signal, the read/write command and the read/write times signal generated by the decoding unit, the control parameter signal of the control register group, and generates Read/write the data and control signals (address, read/write enable, output enable, etc.) required by the corresponding memory, and send these signals to the crossbar switch. is M, then the number of storage controllers is also M. The crossbar is internally connected with M chip select signals and bus signals generated by M memory controllers, and externally connected with M types of memories through an off-chip single bus.

译码单元由片选信号译码模块、读/写信号译码模块和读写次数译码模块构成。由于存储器接口上包含M条片选信号,每个片选信号连接一种存储器,因此当片选信号译码模块对DMA访存地址的高位进行译码时,判断该地址所属的子空间,然后激活相应的M个片选信号中的一个,用于选中片外单总线上相应的存储器;读/写信号译码模块根据访存地址的高位和访存请求进行译码,判断所要读写的存储器,发出相应的读/写启动命令信号给对应的存储控制器,启动存储控制器的读/写过程。读写次数译码模块根据访存数据宽度和控制寄存器组送来的存储器宽度参数进行译码,产生读/写次数信号。如果访存的数据宽度大于相应控制寄存器中已配置的存储器宽度,读/写次数信号就会大于1,用于指示相应存储控制器的操作。例如,某次读请求的数据宽度是32位,而对应存储器的宽度只有16位,那么译码单元就会译码产生大小为2的读次数信号,存储控制器就会根据这一信号,从相应存储器2个连续的地址上各读出16位数据,合并成32位的数据,返回给DMA。设访存数据宽度的最大值是M个存储器宽度中最小宽度的S倍,S是2的整数次幂,那么读/写次数信号的宽度应该设为log2S位。The decoding unit is composed of a chip selection signal decoding module, a read/write signal decoding module and a read/write times decoding module. Since the memory interface contains M chip select signals, and each chip select signal is connected to a memory, when the chip select signal decoding module decodes the high bits of the DMA memory access address, it judges the subspace to which the address belongs, and then Activate one of the corresponding M chip select signals to select the corresponding memory on the off-chip single bus; the read/write signal decoding module decodes according to the high bit of the memory access address and the memory access request, and judges the memory to be read and written The memory sends a corresponding read/write start command signal to the corresponding storage controller to start the read/write process of the storage controller. The reading and writing times decoding module performs decoding according to the memory access data width and the memory width parameter sent by the control register group, and generates a read/write times signal. If the data width to be accessed is greater than the configured memory width in the corresponding control register, the read/write times signal will be greater than 1, which is used to indicate the operation of the corresponding memory controller. For example, if the data width of a certain read request is 32 bits, but the width of the corresponding memory is only 16 bits, then the decoding unit will decode and generate a read count signal with a size of 2, and the memory controller will follow this signal from 16-bit data is read out from two consecutive addresses of the corresponding memory, combined into 32-bit data, and returned to the DMA. Assuming that the maximum value of the access data width is S times the minimum width among the M memory widths, and S is an integer power of 2, then the width of the read/write times signal should be set to log 2 S bits.

控制寄存器组包括译码电路和M组控制寄存器,每组控制寄存器内包含若干个寄存器,用于配置一种存储器的控制参数,例如存储器的宽度和类型、异步存储器的建立/触发/保持时间,SDRAM存储器的行/列/体地址数等参数。参数的类型和个数根据实际存储器的需要增减。如果某种存储器所需的控制参数较少,使用一个控制寄存器即可表示所有的参数,那么相应的控制寄存器组内只需设置一个控制寄存器。如果必须使用多个控制寄存器才能表示所有的控制参数,那么相应的控制寄存器组内需要设置多个控制寄存器。每个控制寄存器的位宽一般设置为微处理器的字长,同时对应一个全局逻辑地址。CPU通过配置总线对各个控制寄存器的控制参数进行读/写。在读/写时,译码电路对配置总线上送来的读/写地址、读/写命令进行译码,产生读/写相应控制寄存器的命令信号。控制寄存器接受译码电路的命令信号:如果是写参数命令,则把配置总线上送来的数据写入寄存器的相应字段;如果是读参数命令,则把自己相应字段的数据输出到配置总线上,同时给出数据准备好信号。存储器接口中每种存储控制器采用公开的标准设计方法。译码单元产生的读/写启动命令每次仅仅激活一种存储器的控制器,其余的存储控制器不会响应。被激活的存储控制器产生读/写相应存储器所需的有效数据和控制信号,其余的存储控制器产生的数据和控制信号无效。The control register group includes a decoding circuit and M groups of control registers. Each group of control registers contains several registers, which are used to configure the control parameters of a memory, such as the width and type of the memory, the setup/trigger/hold time of the asynchronous memory, Parameters such as the number of row/column/body addresses of the SDRAM memory. The type and number of parameters increase or decrease according to the needs of the actual memory. If a certain type of memory requires less control parameters and one control register can represent all the parameters, then only one control register needs to be set in the corresponding control register group. If multiple control registers must be used to represent all the control parameters, multiple control registers need to be set in the corresponding control register group. The bit width of each control register is generally set to the word length of the microprocessor, and corresponds to a global logical address. The CPU reads/writes the control parameters of each control register through the configuration bus. When reading/writing, the decoding circuit decodes the reading/writing address and reading/writing command sent from the configuration bus to generate a command signal for reading/writing the corresponding control register. The control register accepts the command signal of the decoding circuit: if it is a write parameter command, write the data sent from the configuration bus into the corresponding field of the register; if it is a read parameter command, output the data in its corresponding field to the configuration bus , while giving a data-ready signal. Each memory controller in the memory interface uses a published standard design methodology. The read/write start command generated by the decoding unit only activates the controller of one kind of memory each time, and the other memory controllers will not respond. The activated memory controller generates valid data and control signals required to read/write the corresponding memory, and the remaining memory controllers generate invalid data and control signals.

交叉开关是一组选择逻辑电路,由M路多选器构成。它根据M个片选信号对各个存储控制器送来的数据和控制信号进行多选一操作。如果第i(1≤i≤M)个片选信号有效,则选择第i个存储控制器(即被激活的存储控制器)产生的数据和控制信号,输出到外部总线上,同时还输出M个片选信号。The crossbar is a group of selection logic circuits, which are composed of M multiple selectors. According to M chip selection signals, it performs multi-select operation on the data and control signals sent by each storage controller. If the i-th (1≤i≤M) chip select signal is valid, select the data and control signals generated by the i-th memory controller (that is, the activated memory controller), output to the external bus, and output M A chip select signal.

利用上述存储器接口对挂接在片外单总线上的多个存储器进行访问的方法是:在开始访存之前,CPU通过配置总线将各种存储器的控制参数写入控制寄存器组。在访存时,译码单元根据控制寄存器组提供的控制参数对访存地址、访存请求和访存数据宽度进行译码,激活M条片选信号中的一条,同时产生有效的读/写启动命令信号和读/写次数信号,输出给存储控制器。由于每次访存只访问其中一种存储器,因此只有相应的一个存储控制器被译码单元的读/写启动命令激活,其余的存储控制器不作响应。被激活的存储控制器根据访存数据、地址和控制参数,产生符合相应存储器时序要求的数据和控制信号,输出给交叉开关。交叉开关根据M条片选信号,选择相应存储控制器产生的数据和控制信号,输出到外部总线上。被有效片选信号选中的存储器响应外部总线上的信号,完成访存操作。其他未被片选信号选中的存储器不响应外部总线信号。这样就实现了对单总线上同时挂接的多种存储器进行访问的目标。The method for using the above-mentioned memory interface to access multiple memories connected to the off-chip single bus is: before starting memory access, the CPU writes the control parameters of various memories into the control register group through the configuration bus. During memory access, the decoding unit decodes the memory access address, memory access request and memory access data width according to the control parameters provided by the control register group, activates one of the M chip select signals, and simultaneously generates effective read/write The start command signal and the read/write times signal are output to the storage controller. Since each memory access only accesses one of the memories, only one corresponding memory controller is activated by the read/write start command of the decoding unit, and the rest of the memory controllers do not respond. The activated memory controller generates data and control signals that meet the timing requirements of the corresponding memory according to the memory access data, address and control parameters, and outputs them to the crossbar. The crossbar selects the data and control signals generated by the corresponding memory controller according to the M chip selection signals, and outputs them to the external bus. The memory selected by the effective chip select signal responds to the signal on the external bus to complete the memory access operation. Other memories not selected by the chip select signal do not respond to external bus signals. In this way, the goal of accessing multiple memories connected simultaneously on the single bus is realized.

如果需要增加/减少存储器的种类,只要增加/减少相应的控制寄存器、片选信号、存储控制器和开关选择逻辑即可。If it is necessary to increase/decrease the type of memory, it is only necessary to increase/decrease the corresponding control register, chip select signal, memory controller and switch selection logic.

采用本发明能产生如下有益的技术效果:Adopting the present invention can produce following beneficial technical effect:

1.所有的存储器复用一套外部总线,减少原来多总线方式下的芯片引脚个数,降低了芯片功耗和面积;1. All memories reuse a set of external buses, reducing the number of chip pins in the original multi-bus mode, reducing chip power consumption and area;

2.根据不同的应用对存储器种类的需要,本发明具有良好的可扩展性和可裁减性:2. According to the needs of different applications for memory types, the present invention has good scalability and tailorability:

3.本发明采用标准的模块接口,具有较好的模块复用性。3. The present invention adopts a standard module interface and has good module reusability.

附图说明:Description of drawings:

图1是一个通用的嵌入式微处理器应用系统逻辑结构图。Figure 1 is a general logic structure diagram of embedded microprocessor application system.

图2是本发明单总线存储器接口的逻辑结构图。FIG. 2 is a logical structure diagram of the single-bus memory interface of the present invention.

图3是本发明译码单元的逻辑结构图。Fig. 3 is a logical structure diagram of the decoding unit of the present invention.

图4是本发明控制寄存器组的组成结构图。Fig. 4 is a structural diagram of the control register group of the present invention.

图5是本发明的存储器接口同时挂接一片32位宽的SDRAM和一片16位的Flash的互连实例。Fig. 5 is the interconnection instance that the memory interface of the present invention is connected with a slice of 32-bit wide SDRAM and a slice of 16-bit Flash at the same time.

具体实施方式:Detailed ways:

图1是一个通用的嵌入式微处理器应用系统。微处理器内部集成了本发明的一种存储器接口。在这个例子中,存储器接口外部总线上同时挂接了SDRAM、SBSRAM、FIFO、Flash共4种不同的存储器。Figure 1 is a general embedded microprocessor application system. A memory interface of the present invention is integrated inside the microprocessor. In this example, four different memories including SDRAM, SBSRAM, FIFO and Flash are connected to the external bus of the memory interface at the same time.

图2是挂接常用的SDRAM、SBSRAM、FIFO、Flash四种存储器的单总线存储器接口的逻辑结构图。该单总线存储器接口由译码单元、控制寄存器组、4个存储控制器、交叉开关组成。译码单元接收DMA的访存请求信号,控制寄存器组连接CPU的配置总线,交叉开关通过片外单总线连接四种存储器。在开始访存之前,CPU通过配置总线将四种存储器的控制参数写入控制寄存器组。在访存时,译码单元根据控制寄存器组提供的控制参数对访存地址、访存请求和访存数据宽度进行译码,激活4条片选信号中的一条,同时产生有效的读/写启动命令信号和读/写次数指示信号,输出给存储控制器。由于每次访存只访问其中一种存储器,因此只有相应的一个存储控制器被译码单元的读/写启动命令激活,其余的存储控制器不作响应。被激活的存储控制器根据访存数据、地址和控制参数,产生符合相应存储器时序要求的数据和控制信号,输出给交叉开关。交叉开关是四选一逻辑,它根据4条片选信号,选择其中一个存储控制器产生的数据和控制信号,输出到外部总线上。被有效片选信号选中的存储器响应外部总线上的信号,完成访存操作。Figure 2 is a logical structure diagram of a single-bus memory interface connected to commonly used SDRAM, SBSRAM, FIFO, and Flash memories. The single-bus memory interface is composed of a decoding unit, a control register group, 4 memory controllers and a crossbar switch. The decoding unit receives the memory access request signal of the DMA, the control register group is connected to the configuration bus of the CPU, and the crossbar is connected to four kinds of memories through the off-chip single bus. Before starting to access the memory, the CPU writes the control parameters of the four kinds of memory into the control register group through the configuration bus. During memory access, the decoding unit decodes the memory access address, memory access request and memory access data width according to the control parameters provided by the control register group, activates one of the four chip select signals, and simultaneously generates effective read/write The start command signal and the read/write times indication signal are output to the storage controller. Since each memory access only accesses one of the memories, only one corresponding memory controller is activated by the read/write start command of the decoding unit, and the rest of the memory controllers do not respond. The activated memory controller generates data and control signals that meet the timing requirements of the corresponding memory according to the memory access data, address and control parameters, and outputs them to the crossbar. The crossbar is a four-select-one logic, which selects the data and control signals generated by one of the memory controllers according to the four chip select signals, and outputs them to the external bus. The memory selected by the effective chip select signal responds to the signal on the external bus to complete the memory access operation.

图3给出了本发明译码单元的组成结构。该图还是以常用的SDRAM、SBSRAM、FIFO、Flash四种存储器为例。假设访存地址长度为n位,并且在划分为4个子空间后,根据第n位和第n-1位地址就可以区分4个子空间,“片选信号译码”模块可以用一个2-4译码器来实现,译码输出4个存储的片选信号。“读写信号译码”模块根据第n位和第n-1位地址以及读/写请求信号,经过译码,产生4个存储器的读/写启动命令信号。“读写次数译码”模块根据访存数据宽度信号和4个控制寄存器送来的存储器宽度参数进行译码,产生读/写次数信号,用于指示存储控制器的读写过程。假设访存数据宽度的最大值是4个存储器宽度中最小宽度的S倍(S一般是2的整数次幂),那么读/写次数信号的宽度应该设为log2S位。例如访存数据宽度的最大值为64位,而外接的存储器最小宽度是8位宽,那么S等于8,读/写次数信号的宽度应该设为3位。Fig. 3 shows the composition structure of the decoding unit of the present invention. This figure still takes four commonly used memories of SDRAM, SBSRAM, FIFO, and Flash as examples. Assuming that the memory access address length is n bits, and after being divided into 4 subspaces, the 4 subspaces can be distinguished according to the nth bit and the n-1th bit address, the "chip select signal decoding" module can use a 2-4 Decoder to realize, decode and output 4 stored chip select signals. The "read and write signal decoding" module generates 4 memory read/write start command signals after decoding according to the nth and n-1th address and the read/write request signal. The "reading and writing times decoding" module decodes according to the memory access data width signal and the memory width parameters sent by the 4 control registers, and generates the reading/writing times signal, which is used to indicate the reading and writing process of the storage controller. Assuming that the maximum value of the access data width is S times the minimum width of the 4 memory widths (S is generally an integer power of 2), then the width of the read/write times signal should be set to log 2 S bits. For example, the maximum width of the access data is 64 bits, and the minimum width of the external memory is 8 bits, then S is equal to 8, and the width of the read/write times signal should be set to 3 bits.

图4给出了本发明控制寄存器组的逻辑结构图。仍以常用的SDRAM、SBSRAM、FIFO、Flash四种存储器为例,控制寄存器组由译码电路和四组控制寄存器构成。图中的例子包含四组控制寄存器,并给出了各组控制寄存器的的详细字段结构,分别用于配置SDRAM、SBSRAM、FIFO和Flash的控制参数。其中R1是配置SDRAM控制参数的控制寄存器组,其中包含2个32位的寄存器,分别用于配置猝发方式、CAS响应节拍、刷新使能、刷新周期等控制参数。R2是SBSRAM的控制寄存器组,其中只包含1个32位的寄存器。R3是FIFO的控制寄存器组,R4是Flash的控制寄存器组,分别都只有一个32位的控制寄存器。将控制寄存器划分成多个字段,每个字段用于设置一个参数,字段的长度根据参数的复杂情况而定。如果该参数有n种情况,那么该字段所需的位数B应满足

Figure C20051003230700081
如果某种存储器的控制参数较多,使用一个控制寄存器无法完全表示,那么可以用多个控制寄存器配置一种存储器的参数。图4中用来配置SDRAM参数的R1组就使用了2个控制寄存器。每个控制寄存器都具有一个全局地址,CPU通过配置总线即可对各个控制寄存器的控制参数进行读/写。在读/写时,译码电路对配置总线上送来的读/写地址、读/写命令进行译码,产生读/写相应控制寄存器的命令信号。控制寄存器接受译码电路的命令信号:如果是写参数命令,则把配置总线上送来的数据写入寄存器的相应字段;如果是读参数命令,则把自己相应字段的数据输出到配置总线上,同时给出数据准备好信号。FIG. 4 shows a logical structure diagram of the control register group of the present invention. Still taking the four commonly used memories of SDRAM, SBSRAM, FIFO, and Flash as examples, the control register group is composed of a decoding circuit and four groups of control registers. The example in the figure contains four groups of control registers, and gives the detailed field structure of each group of control registers, which are used to configure the control parameters of SDRAM, SBSRAM, FIFO and Flash respectively. Among them, R1 is a control register group for configuring SDRAM control parameters, which contains two 32-bit registers, which are used to configure control parameters such as burst mode, CAS response beat, refresh enable, and refresh cycle. R2 is the control register group of SBSRAM, which only contains a 32-bit register. R3 is the control register group of FIFO, R4 is the control register group of Flash, each has only one 32-bit control register. Divide the control register into multiple fields, each field is used to set a parameter, and the length of the field depends on the complexity of the parameters. If there are n cases of this parameter, then the number of bits B required for this field should satisfy
Figure C20051003230700081
If there are many control parameters of a certain type of memory, which cannot be fully represented by one control register, then multiple control registers can be used to configure the parameters of a type of memory. The R1 group used to configure SDRAM parameters in Figure 4 uses two control registers. Each control register has a global address, and the CPU can read/write the control parameters of each control register by configuring the bus. When reading/writing, the decoding circuit decodes the reading/writing address and reading/writing command sent from the configuration bus to generate a command signal for reading/writing the corresponding control register. The control register accepts the command signal of the decoding circuit: if it is a write parameter command, write the data sent from the configuration bus into the corresponding field of the register; if it is a read parameter command, output the data in its corresponding field to the configuration bus , while giving a data-ready signal.

图5给出了本发明的存储器接口通过外部总线同时挂接一个32位宽的SDRAM和一个16位宽的Flash的示意图。FIG. 5 shows a schematic diagram of a 32-bit wide SDRAM and a 16-bit wide Flash connected simultaneously to the memory interface of the present invention through an external bus.

目前本发明已经在国防科大自行研制的32位高性能浮点DSP“银河飞腾-DSP700”中采用,该DSP在片外单总线上可同时挂接4种不同的存储器。At present, the present invention has been adopted in the 32-bit high-performance floating-point DSP "Galaxy Feiteng-DSP700" independently developed by the University of National Defense Science and Technology. The DSP can be connected to 4 different memories on the off-chip single bus at the same time.

Claims (6)

1. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews is characterized in that the memory access address realm is divided into the M sub spaces, the corresponding a kind of storer in each subspace; A kind of unibus memory interface of design is provided with the M silver and selects signal on interface in embedded microprocessor, and each chip selection signal connects a kind of storer; The inner integrated decoding unit of memory interface, control register group, M kind memory controller and a cross bar switch, decoding unit links to each other with DMA, receive the controlled variable of memory access request signal, address signal and the control register group of DMA, the memory access solicited message is deciphered, produce M chip selection signal and export to cross bar switch, the read/write start up command signals of generation and read-write number of times signal are exported to memory controller; The control register group connects by configuration bus and the CPU nuclear phase of CPU, accepts the configuration that CPU checks various memory parameter, and sends controlled variable to decoding unit and memory controller; The controlled variable signal of read/write command that data-signal, address signal, the decoding unit of memory controller reception DMA memory access produces and read/write number of times signal, control register group, produce required data and the control signal of read/write respective memory, and these signals are delivered to cross bar switch, the number of memory controller is consistent with the storer kind, if the storer kind is M, then the number of memory controller also is M; Cross bar switch internally connects the M silver and selects signal and M the bus signals that memory controller produces, and externally articulates M kind storer by the outer unibus of sheet; Realize the configuration of each memory parameter, the decoding of chip selection signal and the generation of bus signals by memory interface, realize the target that the M kind storer that articulates simultaneously on the unibus is conducted interviews by selection bus signals; Wherein M is the integer more than or equal to 1.
2. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews as claimed in claim 1, it is characterized in that the method that the memory access address realm is divided being: if external bus articulates M kind storer simultaneously, then whole memory access address realm is divided into the M sub spaces, the corresponding storer in each subspace, begin to divide from the highest significant position MSB of address, if the capacity difference of each storer, each sub spaces of being divided varies in size, and promptly carries out inhomogeneous division; If total address realm is enough big, evenly be divided into the M sub spaces after, the size of each subspace can both satisfy the capacity of respective memory, then evenly divides, and is about to total address realm and evenly is divided into the M sub spaces.
3. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews as claimed in claim 1 is characterized in that described decoding unit is made of chip selection signal decoding module, read/write signal decoding module and read-write number of times decoding module; When the chip selection signal decoding module is deciphered the high position of DMA memory access address, judge the subspace that this address is affiliated, activate in the corresponding M chip selection signal then, be used to choose corresponding memory on the outer unibus of sheet; The read/write signal decoding module is deciphered according to a high position and the memory access request of memory access address, judges the storer that will read and write, sends corresponding read/write start up command signals and gives corresponding memory controller, starts the read/write processes of memory controller; The memory width parameter that read-write number of times decoding module is sent here according to memory access data width and control register group is deciphered, and produces read/write number of times signal; If the data width of memory access is greater than the memory width that has disposed in the corresponding control register, read/write number of times signal will be used to indicate the operation of respective stored controller greater than 1; If the maximal value of memory access data width is S times of minimum widith in M the memory width, S is 2 integral number power, and the width of read/write number of times signal should be made as log so 2The S position.
4. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews as claimed in claim 1, it is characterized in that described control register group comprises decoding scheme and M group control register, comprise several registers in every group of control register, be used to dispose a kind of controlled variable of storer, the type of parameter and number are according to the needs increase and decrease of actual storage; The bit wide of each control register is traditionally arranged to be the word length of microprocessor, simultaneously corresponding global logic address; CPU carries out read/write by configuration bus to the controlled variable of each control register; When read/write, decoding scheme is deciphered read/write address, the read/write command sent here on the configuration bus, produces the command signal of the corresponding control register of read/write; Control register is accepted the command signal of decoding scheme: if the write parameters order, then the data of sending here on the configuration bus are write the respective field of register; If read parameter command, then the data of own respective field are outputed on the configuration bus, provide ready for data signal simultaneously.
5. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews as claimed in claim 1, it is characterized in that described cross bar switch is a group selection logical circuit, constitute by M road multi-selection device, data and control signal that it is sent here each memory controller according to M chip selection signal are carried out multiselect one operation, if i chip selection signal is effective, data and control signal that the memory controller of then selecting i memory controller promptly to be activated produces, output on the external bus, also export M chip selection signal simultaneously, wherein 1≤i≤M.
6. the method that the multiple storer that is articulated on the outer unibus of sheet is conducted interviews as claimed in claim 1, it is characterized in that utilizing described memory interface to the method that a plurality of storeies that are articulated on the outer unibus of sheet conduct interviews to be: before the beginning memory access, CPU writes the control register group by configuration bus with the controlled variable of various storeies; When memory access, decoding unit is deciphered memory access address, memory access request and memory access data width according to the controlled variable that the control register group provides, activation M silver selects in the signal, produces effective read/write start up command signals and read/write number of times signal simultaneously, exports to memory controller; Because wherein a kind of storer is only visited in each memory access, therefore have only the read/write startup command of a corresponding decoded unit of memory controller to activate, remaining memory controller does not respond; The memory controller that is activated produces the data and the control signal that meet the requirement of respective memory sequential according to memory access data, address and controlled variable, exports to cross bar switch; Cross bar switch selects signal according to the M silver, and data and the control signal of selecting the respective stored controller to produce output on the external bus; Signal on the memory response external bus that the effective chip selection signal of quilt is chosen is finished accessing operation; Other storeies of not chosen by chip selection signal are the response external bus signals not.
CNB2005100323070A 2005-10-28 2005-10-28 Method of proceeding access multikind storage on chip select outer unibus Expired - Fee Related CN100357870C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100323070A CN100357870C (en) 2005-10-28 2005-10-28 Method of proceeding access multikind storage on chip select outer unibus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100323070A CN100357870C (en) 2005-10-28 2005-10-28 Method of proceeding access multikind storage on chip select outer unibus

Publications (2)

Publication Number Publication Date
CN1758208A CN1758208A (en) 2006-04-12
CN100357870C true CN100357870C (en) 2007-12-26

Family

ID=36703607

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100323070A Expired - Fee Related CN100357870C (en) 2005-10-28 2005-10-28 Method of proceeding access multikind storage on chip select outer unibus

Country Status (1)

Country Link
CN (1) CN100357870C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4497184B2 (en) * 2007-09-13 2010-07-07 ソニー株式会社 Integrated device, layout method thereof, and program
CN102087874B (en) * 2009-12-07 2013-02-27 晨星软件研发(深圳)有限公司 Universal memory input and output generation device and method
US10628373B2 (en) * 2015-12-01 2020-04-21 Marvell International Ltd. Systems and methods for transmitting an access request via a flexible register access bus
CN105701026A (en) * 2016-01-04 2016-06-22 上海斐讯数据通信技术有限公司 Data collector and method for collecting data by utilizing system redundant resources
CN109842409B (en) * 2017-11-27 2023-01-13 中国航空工业集团公司西安航空计算技术研究所 Control circuit supporting PROM and processor to configure eFPGA on line
CN111045955B (en) * 2019-12-16 2023-09-22 瓴盛科技有限公司 Storage device with dynamic configuration architecture, operation method thereof and electronic equipment
CN114328309B (en) * 2021-12-03 2024-10-29 南京风兴科技有限公司 Memory management circuit and memory sharing method
CN119201839A (en) * 2024-11-26 2024-12-27 英特尔(中国)研究中心有限公司 Processor system on chip and method used therein

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438638B1 (en) * 2000-07-06 2002-08-20 Onspec Electronic, Inc. Flashtoaster for reading several types of flash-memory cards with or without a PC
CN1475013A (en) * 2000-09-18 2004-02-11 英特尔公司 Buffer of multi-channel memory interface
US6832281B2 (en) * 2000-07-06 2004-12-14 Onspec Electronic Inc. Flashtoaster for reading several types of flash memory cards with or without a PC

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438638B1 (en) * 2000-07-06 2002-08-20 Onspec Electronic, Inc. Flashtoaster for reading several types of flash-memory cards with or without a PC
US6832281B2 (en) * 2000-07-06 2004-12-14 Onspec Electronic Inc. Flashtoaster for reading several types of flash memory cards with or without a PC
CN1475013A (en) * 2000-09-18 2004-02-11 英特尔公司 Buffer of multi-channel memory interface

Also Published As

Publication number Publication date
CN1758208A (en) 2006-04-12

Similar Documents

Publication Publication Date Title
CN109154918B (en) Self-refresh state machine MOP array
US7149824B2 (en) Dynamically setting burst length of memory device by applying signal to at least one external pin during a read or write transaction
CN102812518B (en) Access method of storage and device
US6895474B2 (en) Synchronous DRAM with selectable internal prefetch size
US20040054864A1 (en) Memory controller
KR20190022428A (en) Command arbitration for high-speed memory interfaces
US20140325105A1 (en) Memory system components for split channel architecture
US8392671B2 (en) Memory controller, system, and method for accessing semiconductor memory
KR20040030049A (en) Memory device having different burst order addressing for read and write operations
CN100357870C (en) Method of proceeding access multikind storage on chip select outer unibus
US20040064599A1 (en) Configurable memory controller for advanced high performance bus system
CN111241007B (en) Data reading and writing method and device and dynamic random access memory
CN111240582B (en) Data reading and writing method, reading and writing device and dynamic random access memory
JP7662702B2 (en) Method, device and system for including alternative memory access operations through a memory interface - Patents.com
US6567320B2 (en) Data write circuit
JP5226161B2 (en) Semiconductor memory device and information processing system
JP5270605B2 (en) Microcontroller
CN214253209U (en) A SDRAM Controller User Interface Module IP Core
US11983411B2 (en) Methods, devices and systems for including alternate memory access operations over memory interface
US11971832B2 (en) Methods, devices and systems for high speed transactions with nonvolatile memory on a double data rate memory bus
JPS6383844A (en) Microprocessor system
TWI701553B (en) Read method applied to nand flash
US20090100220A1 (en) Memory system, control method thereof and computer system
JP2023090690A (en) Circuit and method for reading ECC from memory
JP3563340B2 (en) Memory controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Assignee: Hunan Aerospace Electromechanical Equipment and Special Material Institute

Assignor: National University of Defense Technology of People's Liberation Army of China

Contract fulfillment period: 2009.12.10 to 2015.12.10

Contract record no.: 2009430000272

Denomination of invention: Method of proceeding access multikind storage on chip select outer unibus

Granted publication date: 20071226

License type: Exclusive license

Record date: 20091230

LIC Patent licence contract for exploitation submitted for record

Free format text: EXCLUSIVE LICENSE; TIME LIMIT OF IMPLEMENTING CONTACT: 2009.12.10 TO 2015.12.10; CHANGE OF CONTRACT

Name of requester: HUNAN AEROSPACE ELECTRICAL AND MECHANICAL EQUIPMEN

Effective date: 20091230

EC01 Cancellation of recordation of patent licensing contract

Assignee: Hunan Aerospace Electromechanical Equipment and Special Material Institute

Assignor: National University of Defense Technology of People's Liberation Army of China

Contract record no.: 2009430000272

Date of cancellation: 20120117

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071226

Termination date: 20191028