WO2007079660A1 - Processor chip and memory controlling system and method thereof - Google Patents

Processor chip and memory controlling system and method thereof Download PDF

Info

Publication number
WO2007079660A1
WO2007079660A1 PCT/CN2006/003725 CN2006003725W WO2007079660A1 WO 2007079660 A1 WO2007079660 A1 WO 2007079660A1 CN 2006003725 W CN2006003725 W CN 2006003725W WO 2007079660 A1 WO2007079660 A1 WO 2007079660A1
Authority
WO
WIPO (PCT)
Prior art keywords
bus
hard disk
udma
controller
control unit
Prior art date
Application number
PCT/CN2006/003725
Other languages
French (fr)
Chinese (zh)
Inventor
Jun Hu
Zhanbing Huang
Jieming Huang
Xiaomin Wu
Original Assignee
Huawei Technologies Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2007079660A1 publication Critical patent/WO2007079660A1/en

Links

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/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices

Definitions

  • the present invention relates to a data storage technology, and in particular, to a processor chip and a storage control system and method.
  • Hard disks are an indispensable peripheral for most CPU systems, and the design of their controllers is a key technology in CPU system design.
  • the integrated drive electronics (IDE) interface type hard disk referred to as IDE hard disk for short, is the most widely used because of its mature production technology and lowest cost.
  • the interface of the IDE hard disk is integrated into the central processor CPU chip. At least 28 chip control pins are needed.
  • SRAM Static Random Access Memory
  • Flash Flash Flash Flash
  • Read Only Memory Read Only Memory
  • Called ROM Read Only Memory
  • the multiplexing of the IDE hard disk and other memory data lines and address lines is a good way for the CPU chip to reduce the pins and reduce the package.
  • FIG. 1 a prior art solution is shown in Figure 1: All external memory is controlled in unison through a common, configurable static RAM (SRAM) controller on the system bus.
  • SRAM static RAM
  • the SRAM controller is designed with timing registers that can be configured to configure the correct access timing for different memory types by configuring the timing registers. Therefore, external memory including IDE hard disk, Flash memory, Compact Flash (CF) memory and ROM/SRAM memory does not need to separately package control pins in the chip, but is allocated according to a certain access timing. Data is exchanged between the data line and the address line to reduce the number of control pins.
  • SRAM static RAM
  • the timing of the SRAM control is relative to the single, which is the general SRAM timing.
  • the IDE hard disk only the programmable input/output can be applied to match the SRAM timing.
  • Input/Output referred to as PIO
  • the way of data exchange between the hard disk and the CPU mainly includes PIO mode and direct memory access.
  • DMA Direct Memory Access
  • UDMA Ultra Direct Memory Access
  • the ⁇ mode is a data exchange mode for reading and writing data by executing an I/O port instruction by the CPU, and is the earliest hard disk data transmission mode, and is divided into PIO mode 0, PIO mode 1, and PIO mode 2.
  • the DMA mode is a data exchange mode for directly accessing data from a memory without going through a CPU: the CPU issues an instruction to the DMA controller, and causes the DMA controller to process the number of transfers. After the data transfer is completed, the DMA controller again Information is fed back to the CPU.
  • DMA mode is divided into single-byte DMA and multi-byte DMA, and the maximum transmission rate that can be achieved is only 16.6 megabytes. /second.
  • the DMA mode of operation used by the hard disk has now largely eliminated single-byte DMA and multi-byte DMA, while using the new UDMA mode.
  • the UDMA mode is based on the 16-bit multi-byte DMA mode. It is an enhanced version of the DMA mode. Based on the advantages of the DMA mode, a 16-bit Cyclic Redundancy Check (Cyclic Redundancy Check) is added. Called CRC), which improves the accuracy and security of the data transmission process. Moreover, the data transfer speed has been greatly improved, and its current maximum bandwidth has reached 133 megabytes/second.
  • Cyclic Redundancy Check Cyclic Redundancy Check
  • the hard disk Since the data exchange speed of the hard disk determines the access speed of the electronic device, the hard disk can only support
  • the W ⁇ mode undoubtedly limits the data storage speed of electronic devices.
  • multimedia applications such as high-definition television signals
  • the UDMA mode is not supported and obviously cannot meet the needs of high-bandwidth applications.
  • the SRAM cannot implement dynamic alternate access to the controlled memory. If it is necessary to switch to a different memory, the timing register needs to be reconfigured. For example, if the multimedia chip is plugged in at the same time A Flash and an IDE hard disk, the multimedia chip can not achieve alternate access of the Flash and multimedia IDE hard disk, it is necessary to reconfigure the timing register to switch by CPU intervention.
  • the disadvantages of the prior art are as follows: 1) Since the SRAM cannot implement dynamic alternate access of the control memory, if it is necessary to switch to a different control memory, the timing register needs to be reconfigured by the processor, resulting in a high CPU occupancy rate. , the data transmission rate is low; 2) Although the UDMA mode can greatly improve the data transmission rate and adapt to the high bandwidth requirement, however, as the bandwidth of multimedia applications such as high-definition television signals is gradually increased, if the electronic device does not support the UDMA mode, it is obviously impossible. Adapt to high bandwidth applications.
  • the technical problem to be solved by the embodiments of the present invention is to provide a processor chip and a processor chip-based storage control system and method, which solve the problems of high CPU occupancy and low data transmission rate in the prior art.
  • an embodiment of the present invention provides a processor chip, including: at least two controllers respectively connected to a processor system bus for receiving a processor system bus signal and controlling reading of an external memory of the processor Write
  • bus selector which is respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
  • One of the controllers is a hard disk controller for receiving a processor system bus signal and controlling reading and writing of an external hard disk of the processor.
  • an embodiment of the present invention further provides a storage control system, including:
  • At least two memories for storing data one of the memories being a hard disk;
  • the processor chip includes:
  • At least two controllers are respectively connected to the processor system bus for receiving the processor system bus signals and controlling the reading and writing of the external memory of the processor;
  • bus selector which is respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
  • One of the controllers is a hard disk controller for receiving processor system bus signals and controlling the processor Reading and writing of the hard disk of the department.
  • an embodiment of the present invention further provides a storage control method, where the method includes the following steps:
  • the bus selector receives the bus request signal of the controller, confirms that the shared bus is released, sends a bus enable signal to the controller, and the shared bus communicates with the controller and the memory controlled by the controller;
  • the connected controller is a hard disk controller, determine a current data exchange mode, and select a control unit corresponding to the data exchange mode, and then the control unit controls the hard disk to perform data reading and writing;
  • the controller When the connected controller is a non-hard disk controller, the controller directly controls the corresponding memory to read and write data.
  • the embodiment of the present invention implements the support of the UDMA access mode of the IDE hard disk while supporting the PIO mode by setting the hard disk controller in the system; or realizing the hard disk of the CPU system by setting the bus selector in the system. Dynamic sharing of the controller's data address with other memory controllers; or by encapsulating the controller including the hard disk controller and the bus selector in the processor chip, and only exchanging data with the external memory of the chip through the interface of the bus The chip package pin is reduced, thereby reducing the package volume; and in the memory control method provided by the present invention, the bus release signal received during the clock cycle is set to be invalid by the controller, ensuring that the predetermined clock cycle is within a predetermined clock cycle. Can pass data completely. Therefore, the problem in the prior art that the CPU occupation rate is high, the data transmission rate is low, and the high bandwidth application cannot be adapted is solved.
  • FIG. 1 is a schematic diagram of a technical solution of a multimedia processor in the prior art
  • FIG. 2 is a block diagram of a storage control system according to an embodiment of the present invention.
  • Figure 3 is a system block diagram of the hard disk controller of Figure 2;
  • FIG. 4 is a system block diagram of Embodiment 2 of a storage control system according to an embodiment of the present invention
  • FIG. 5 is a general flowchart of a storage control method according to an embodiment of the present invention
  • FIG. 6 is a flowchart of a working process of a hard disk controller in a storage control method according to an embodiment of the present invention
  • FIG. 8 is a flowchart of a write operation of a hard disk controller in a storage control method according to an embodiment of the present invention
  • the present invention provides a processor chip, see part A in FIG. 2, which includes at least two controllers respectively connected to the processor system bus, one of the controllers is a hard disk controller, and further includes a bus selector. And respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the outside of the chip through the interface.
  • the controller is configured to receive a processor bus signal, and control the reading and writing of the external memory.
  • the processor is a CPU and includes two controllers: the first controller is an IDE hard controller 21, and the second controller is an SRAM controller 22.
  • the IDE hard disk controller 21 and the SRAM controller 22 receive commands from the CPU system bus to control the reading and writing of the hard disk and other memories, respectively.
  • an embodiment of the present invention further provides a storage control system including a processor chip, a shared bus, and at least two memories.
  • the shared bus connects the processor chip and the paralleled memory.
  • the processor chip is a CPU chip
  • the shared bus is a data and address sharing main line.
  • the memory is SRAM/ROM memory 32, flash memory 33 and IDE hard disk respectively.
  • the main functions of each part of the storage control system are:
  • the CPU chip includes an IDE hard disk controller 21, and the second controller is an SRAM controller 22 and a bus selector 1.
  • the IDE hard disk controller 21 receives commands from the CPU system bus to control the storage of the IDE hard disk 31, and the SRAM controller 22 receives commands from the CPU system bus, and follows the timing controllers of the SRAM controller in the SRAM/ROM memory 32 and the flash 33. Perform storage control.
  • the bus selector 1 is connected to the IDE hard disk controller 21 and the SRAM controller 22 via a controller bus, respectively, to control the routing of the IDE hard disk controller 21 and the SRAM controller 22; the bus selector 1 is connected to the data and address sharing bus through the interface. Further, it is connected to the IDE hard disk 31, the SRAM/ROM memory 32, and the flash memory 33.
  • the bus selector determines the right to use the interface by the controller, and the controller uses the right to determine the data and address sharing bus, connects the IDE hard disk controller 21 with the IDE hard disk 31, or connects the SRAM controller 22 and the SRAM/ROM memory 32 and Flash memory 33.
  • the hard disk controller is not limited to the IDE hard disk controller 21 in this embodiment.
  • a small computer system interface (SCSI) type hard disk controller is also suitable for the present invention.
  • the second controller may be a flash controller, a compressed flash controller, or a ROM controller.
  • FIG. 3 is a system block diagram of an embodiment of an IDE hard disk controller according to Embodiment 1 of the present invention, which includes a PIO control unit 211 connected to a CPU system bus for receiving a CPU system bus signal, and performing commands in a PIO mode.
  • UDMA control unit 212 connected to the CPU system bus, for receiving CPU system bus signals, performing data transmission control in UDMA mode, realizing operation of hard disk UDMA mode; logic unit 213 And respectively connected to the PIO control unit 211 and the UDMA control unit 212 for distinguishing the hard disk PIO mode and the hard disk UDMA mode, and strobing the corresponding PIO control unit or UDMA control unit, which can be transmitted by the strobe PIO control unit or the UDMA control unit The manner of the line is performed; the interface unit 214 is respectively connected to the PIO control unit 211, the UDMA control unit 212 and the bus selector 1 for acquiring and releasing the control right of the shared bus; further comprising a timing unit 215, respectively, and the PIO control The unit 211 is connected to the UDMA control unit 212 for providing a hard disk PIO. Type and timing parameters to achieve the hard disk UDMA mode, implement support for different core clock settings.
  • the PIO control unit 211 and the UDMA control unit 212 are both connected to the CPU system bus to acquire system commands and data. However, specifically, the PIO control unit 211 controls the transmission of commands and data, but the UDMA control unit 212 only controls the transmission of data. That is, the transmission of the system command must first be performed by the PIO control unit 211.
  • multiplexing support for the PIO mode and the UDMA mode can be realized.
  • the processor chip is not limited to the above two controllers, and may include a plurality of controllers, and the routing of the shared bus is unified by the bus selector.
  • FIG. 4 it is a second embodiment of a processor chip according to an embodiment of the present invention.
  • Adding a flash controller based on FIG. 2 specifically includes: a bus selector 1, an IDE hard disk controller 21, an SRAM controller 22, and a flash controller 23, wherein the flash controller 23 is responsible for the read/write control of the flash.
  • the bus selector 1 is responsible for routing of the DE hard disk controller 21, the SRAM controller 22, and the flash controller 23.
  • the function and function of each device in this embodiment please refer to the above, and details are not described herein again.
  • a compressed flash controller or a ROM controller may also be included.
  • a compressed flash controller or a ROM controller may also be included.
  • an embodiment of the present invention further provides a storage control method, and a flowchart thereof is shown in FIG. 5, where the method includes the following steps:
  • Step 101 The bus selector receives a bus request signal of the controller; that is, the controller needs to control the reading and writing of the memory, and sends a bus request signal to the bus selector, and the bus selector receives the bus request signal;
  • Step 102 The bus selector determines whether the shared bus is occupied, if the shared bus is occupied, step 103 is performed, otherwise step 104 is performed;
  • Step 103 The bus selector sends a bus release signal to the controller occupying the shared bus, and the occupied controller is required to release the shared bus.
  • the controller receiving the bus release instruction sets the bus release instruction to be invalid if it is still within a predetermined time period, for example, data is performed in UDMA mode.
  • the preset time is one CPU clock cycle to satisfy the UDMA's ability to completely perform data transmission of at least one CPU clock.
  • This step can also include the following steps:
  • Step 1031 If the controller occupying the shared bus is still within a predetermined time period, the bus release signal is set to be invalid;
  • Step 1032 The controller occupying the shared bus enters a pause after a time period, and releases the shared bus.
  • Step 1033 The bus selector detects whether the shared bus is released. If yes, step 104 is performed, otherwise step 1033 is re-executed until it is confirmed that the shared bus is released.
  • Step 104 After the bus controller occupies the shared bus, the bus selector sends a bus enable signal to the requesting controller;
  • Step 105 Connect the controller and the memory controlled by the shared bus through the shared bus; the controller is divided into a hard disk controller and a non-hard disk controller, when the connected controller is a hard disk controller, step 106 is performed, otherwise step 107 is performed;
  • Step 106 The hard disk controller determines the current data exchange working mode. If it is the UDMA mode, select the corresponding internal unit to control the read and write access of the hard disk by using the UDMA mode. If it is the PIO mode, select the corresponding internal unit to control the hard disk with the PIO mode. Read and write access, and end the read and write access process;
  • Step 107 The non-hard disk controller controls the read and write access of the memory and ends the process.
  • FIG. 6 is a flowchart of a read/write control process performed by a hard disk controller when a hard disk controller is allowed to use a shared bus in the storage control method according to an embodiment of the present invention, including the following steps:
  • Step 201 The hard disk controller acquires a shared bus.
  • Step 202 the hard disk controller logic unit identifies the working mode of the hard disk storage, in the PIO mode, step 203 is performed, and if it is the UDMA mode, step 204 is performed;
  • Step 203 the logic unit strobes the line of the PIO control unit, performs PIO read and write access control, and performs step 209;
  • Step 204 The logic unit strobes the line of the PIO control unit, and sends a UDMA transmission instruction to the hard disk storage by using a PIO mode;
  • Step 205 strobing the line of the UDMA control unit; that is, the hard disk memory transmitting and receiving the feedback instruction indicates that the UDMA mode can be applied, and after receiving the feedback command from the hard disk memory, the logic unit strobes the line of the UDMA control unit;
  • Step 206 the UDMA control unit determines the UDMA mode type, if it is a write access, step 207 is performed, otherwise step 208 is performed;
  • Step 207 Perform write access control in a UDMA mode.
  • Step 208 Perform read access control in a UDMA mode.
  • Step 209 the read/write data exchange is completed, and the process ends.
  • the following embodiment details the process of read and write access control in UDMA mode.
  • FIG. 7 is a complete diagram of write access control in the UDMA mode according to an embodiment of the present invention.
  • the flow chart includes the following steps:
  • Step 401 the bus selector receives the bus request signal sent by the hard disk controller; Step 402, the bus selector determines whether the data and address sharing bus is occupied, and if so, after performing step 403, step 404 is performed; otherwise, step 404 is performed;
  • Step 403 The bus selector sends a bus release signal to a controller that occupies the data and address sharing bus.
  • Step 404 After the bus selector detects that the data and the address sharing bus are dry or idle, return a bus enable signal to the hard disk controller.
  • Step 405 The bus selector connects the hard disk controller to the data and address sharing bus through the interface;
  • Step 406 The hard disk controller logic unit identifies that the working mode of the hard disk storage is a UDMA mode, and sends a UDMA transmission instruction by using a PIO controller.
  • Step 407 When the hard disk memory recognizes the command and prepares the UDMA data transmission, a hard disk interrupt signal is generated. After receiving the interrupt signal, the processor queries the status register of the hard disk to confirm that the hard disk controller can perform UDMA data transmission. The processor switches the logic unit to a logic value corresponding to the UDMA mode, and selects the operation mode configuration register as a write operation;
  • Step 408 the logic unit strobes the UDMA control unit
  • Step 409 The operation mode configuration register sends an operation instruction to the UDMA control unit, and the UDMA control unit recognizes the operation instruction as a write operation instruction;
  • Step 410 the UDMA control unit determines whether the UDMA write initialization has been performed, if yes, step 415 is performed, otherwise step 411 is performed;
  • Step 411 performing UDMA write initialization
  • Step 412 the UDMA control unit detects whether a bus release signal is received, if the step 413 is performed, otherwise step 415 is performed;
  • Step 413 the UDMA control unit enters a write pause state, and releases the shared bus.
  • Step 414 issue a bus request instruction, and re-execute step 401;
  • Step 415 the UDMA control unit performs write and transfer data of one CPU clock
  • Step 416 Determine whether the write transmission ends. If yes, go to step 417. Otherwise, go to step 412.
  • Step 417 Send the cyclic redundancy code check and end. That is to say, in the UDMA write control state machine, the determination condition of entering the host pause state increases the valid condition of the bus release signal, and once the condition is met, the host pause state is entered, and the associated clock and data are suspended. . When the UDMA access ends, the data address bus is actively acquired. At this time, the host pause state to the data transfer state is exited, and the data is continuously sent to the IDE hard disk until the UDMA write transfer is completed and the check CRC is sent.
  • a complete flow diagram of read access control in UDMA mode includes the following steps:
  • Step 501 The bus selector receives a bus request signal sent by the hard disk controller.
  • Step 502 the bus selector determines whether the data and address sharing bus is occupied, if yes, step 503 is followed by step 504, otherwise step 504 is performed;
  • Step 503 The bus selector sends a bus release signal to a controller that occupies the data and address sharing bus.
  • Step 504 After the bus selector detects that the data and the address sharing bus are released or idle, returning a bus enable signal to the hard disk controller;
  • Step 505 The bus selector connects the hard disk controller to the data and address sharing bus.
  • Step 506 The hard disk controller logic unit identifies that the working mode of the hard disk memory is a UDMA mode, and sends a DMA transfer instruction through the PIO controller.
  • Step 507 When the hard disk memory recognizes the command and prepares the UDMA data transmission, the hard disk interrupt signal is generated. After receiving the interrupt signal, the processor queries the status register of the hard disk to confirm that the hard disk controller can perform UDMA data transmission. The processor switches the logic unit to a logic value corresponding to the UDMA mode, and selects the operation mode configuration register as a read operation;
  • Step 508 the logic unit strobes the UDMA control unit
  • Step 509 The operation mode configuration register sends an operation instruction to the UDMA control unit, and the UDMA control unit recognizes the operation instruction as a read operation instruction;
  • Step 510 the control unit determines whether the UDMA read initialization has been performed, and if so, step 517 is performed, otherwise step 511 is performed;
  • Step 511 performing UDMA read initialization
  • Step 512 the control unit detects whether a bus front-end signal is received, and if so, step 513 is performed, otherwise step 517 is performed; Step 513, the UDMA control unit sets the DMA ready signal to be invalid;
  • Step 514 continue to receive 0-2 data according to the setting; if the rate mode is increased, more data can be received.
  • Step 515 the UDMA control unit enters a read pause state, releasing the shared bus
  • Step 516 issue a bus request instruction, and re-execute step 501;
  • Step 517 UDMA performs read and transfer data of one CPU clock
  • Step 518 Determine whether the read transmission ends, and if yes, perform step 519, otherwise perform steps
  • Step 519 sending a cyclic redundancy code check, and ending.
  • the judgment condition of entering the host pause state increases the condition that the bus release signal is valid, and once the condition is judged, the main side on the IDE bus is established.
  • the DMA ready signal is disabled. After continuing to receive 0-2 16-bit data from the IDE hard disk, it enters the host's pause state until the SRMA access ends and reacquires the data address bus. After re-entering the transfer state, the IDE bus is used. The upper main DMA ready signal is asserted and the IDE hard drive continues to send data to the IDE hard disk controller.
  • the IDE hard disk controller supporting the data address sharing in the embodiment of the present invention not only supports the original PIO mode, but also supports the more efficient UDMA mode, and realizes the data address line of the IDE hard disk controller and other memories. Dynamic coexistence. That is to say, the embodiment of the present invention enables the IDE hard disk controller to simultaneously implement the transmission of the PIO mode and the U MA mode in the case of multiplexing the data lines and the address lines with other storage controllers, thereby solving the CPU in the prior art. High occupancy, low data transfer rates, and the problem of not being able to accommodate high bandwidth applications. The invention reduces the number of package pins on the basis of realizing multiple data exchange mode multiplexing, thereby reducing the chip package volume.

Landscapes

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

Abstract

A processor chip is disclosed. The processor chip comprises at least two controllers connected to the system bus of the processor respectively and a bus selector connected to the said controllers. The controllers receive the signal from the system bus of the processor and control the read/write processing for the external memory of the processor. The bus selector comprises a interface for exchanging the data with the external memory of the processor. One of the said controllers is a hard disk controller. The hard disk controller receives the signal from the system bus of the processor and controls the read/write processing between the processor and the external hard disk. It is further disclosed a memory controlling system implemented based on the said processor chip and a method thereof. The invention reduces the amount of the package pins by implementing the multiplexing of the data exchange modes, so as to reduce the volume of the chip package.

Description

处理器芯片与存储控制系统及方法  Processor chip and storage control system and method
本申请要求于 2006 年 1 月 6 日提交中国专利局、 申请号为 200610032786.0, 发明名称为"处理器芯片与存储控制系统及方法"的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。  This application claims priority to Chinese Patent Application No. 200610032786.0, entitled "Processor Chip and Storage Control System and Method", filed on January 6, 2006, the entire contents of which is incorporated herein by reference. In the application.
技术领域 Technical field
本发明涉及一种数据存储技术,特别涉及一种处理器芯片及存储控制系统 及方法。  The present invention relates to a data storage technology, and in particular, to a processor chip and a storage control system and method.
背景技术  Background technique
硬盘作为大多数 CPU系统必不可少的外围设备, 其控制器的设计是 CPU 系统设计的关键技术。 硬盘的接口类型有多种, 电子集成驱动器 (Integrated Drive Electronics , 简称 IDE )接口类型的硬盘, 简称其为 IDE硬盘, 因其生产 技术成熟与成本最低, 所以应用也最为广泛。 但是 IDE硬盘的接口集成到中 央处理器 CPU芯片中至少需要使用 28个左右的芯片控制管脚。而且,在 CPU 芯片外围设备中与 IDE硬盘共存的还有不少其它类型的存储器, 如静态随机 存取存储器( Static Random Access Memory , 简称 SRAM )、 闪存 Flash、 只 读存储器(Read Only Memory, 筒称 ROM )等, 它们也使用了大量的芯片控 制管脚。 因此导致了管脚太多, 芯片封装过大, 这对于日益微型化的电子手持 产品来说是一个较严重的问题。 所以, 实现 IDE硬盘与其它存储器数据线与 地址线的复用, 是 CPU芯片减少管脚、 减小封装的一个好办法。  Hard disks are an indispensable peripheral for most CPU systems, and the design of their controllers is a key technology in CPU system design. There are many types of interfaces for hard disks. The integrated drive electronics (IDE) interface type hard disk, referred to as IDE hard disk for short, is the most widely used because of its mature production technology and lowest cost. However, the interface of the IDE hard disk is integrated into the central processor CPU chip. At least 28 chip control pins are needed. Moreover, there are many other types of memory coexisting with the IDE hard disk in the CPU chip peripheral device, such as Static Random Access Memory (SRAM), Flash Flash, Read Only Memory (Read Only Memory). Called ROM), etc., they also use a large number of chip control pins. As a result, the number of pins is too large and the chip package is too large, which is a serious problem for the increasingly miniaturized electronic handheld products. Therefore, the multiplexing of the IDE hard disk and other memory data lines and address lines is a good way for the CPU chip to reduce the pins and reduce the package.
目前,一种现有技术方案如图 1所示: 通过系统总线上的一个通用的、可 配置的静态 RAM ( SRAM )控制器来统一控制所有的外部存储器。 且在该技 术方案中, SRAM控制器中设计有时序寄存器, 能够通过配置时序寄存器来实 现为不同的存储器类型配置正确的访问时序。 因此, 包括 IDE硬盘, Flash存 储器, 压缩 Flash ( Compact Flash, 简称 CF )存储器和 ROM/SRAM存储器在 内的外部存储器,无需分别在芯片中封装控制管脚, 而是根据一定的访问时序 在分配的数据线和地址线上进行数据交换, 实现控制管脚数目的降低。  Currently, a prior art solution is shown in Figure 1: All external memory is controlled in unison through a common, configurable static RAM (SRAM) controller on the system bus. In this solution, the SRAM controller is designed with timing registers that can be configured to configure the correct access timing for different memory types by configuring the timing registers. Therefore, external memory including IDE hard disk, Flash memory, Compact Flash (CF) memory and ROM/SRAM memory does not need to separately package control pins in the chip, but is allocated according to a certain access timing. Data is exchanged between the data line and the address line to reduce the number of control pins.
但上述技术方案中具有以下技术缺陷:  However, the above technical solutions have the following technical defects:
第一、 SRAM控制的时序相对筒单, 为一般的 SRAM时序, 对于 IDE硬 盘而言, 为了配合 SRAM 时序, 只能应用可编程输入 /输出 (Programming Input/Output, 简称 PIO )模式的数据交换方式。 First, the timing of the SRAM control is relative to the single, which is the general SRAM timing. For the IDE hard disk, only the programmable input/output can be applied to match the SRAM timing. Input/Output, referred to as PIO) mode data exchange.
目前硬盘与 CPU进行数据交换的方式主要有 PIO模式和直接内存访问 At present, the way of data exchange between the hard disk and the CPU mainly includes PIO mode and direct memory access.
( Direct Memory Access, 简称 DMA )模式的增强版本-高级直接内存访问Enhanced version of Direct Memory Access (DMA) mode - advanced direct memory access
( Ultra Direct Memory Access , 简称 UDMA )模式。 (Ultra Direct Memory Access, abbreviated as UDMA) mode.
其中, 所述 ΡΙΟ模式是一种通过 CPU执行 I/O端口指令来进行数据的读 写的数据交换模式, 是最早的硬盘数据传输模式, 分为 PIO模式 0、 PIO模式 1、 PIO模式 2、 PIO模式 3和 PIO模式 4等 5种模式。 由于其数据传输速率 从 3.3兆字节 /秒到 16.6兆字节 /秒不等, 数据传输速率相对较低; 且其硬盘和 内存之间的数据传输是由 CPU来控制的, 导致 CPU占有率很高, 大量传输数 据时会因为占用过多的 CPU资源导致系统停顿, 而无法进行其它的操作。 因 此, PIO模式受限于传输速率低下和极高的 CPU资源占有率。  The ΡΙΟ mode is a data exchange mode for reading and writing data by executing an I/O port instruction by the CPU, and is the earliest hard disk data transmission mode, and is divided into PIO mode 0, PIO mode 1, and PIO mode 2. Five modes, PIO mode 3 and PIO mode 4. Since the data transmission rate ranges from 3.3 megabytes/second to 16.6 megabytes/second, the data transmission rate is relatively low; and the data transmission between the hard disk and the memory is controlled by the CPU, resulting in CPU occupancy. Very high, when transferring a large amount of data, the system will be suspended due to excessive CPU resources, and other operations cannot be performed. Therefore, the PIO mode is limited by the low transmission rate and extremely high CPU resource occupancy.
所述 DMA模式是一种不经过 CPU而直接从内存来存取数据的数据交换 模式: CPU向 DMA控制器下达指令, 让 DMA控制器来处理数的传送, 数据 传送完毕后 DMA控制器再把信息反馈给 CPU。 这样不过分依赖 CPU, 很大 程度上减轻了 CPU资源占有率,可以大大节省系统资源。但 DMA模式与 PIO 模式相比, 在传输速度上的差异并不十分明显: DMA模式分为单字节 DMA 和多字节 DMA两种, 其所能达到的最大传输速率也只有 16.6兆字节 /秒。 为 克服这一缺陷, 现在硬盘使用的 DMA工作模式已基本淘汰单字节 DMA和多 字节 DMA, 而使用全新的 UDMA模式。  The DMA mode is a data exchange mode for directly accessing data from a memory without going through a CPU: the CPU issues an instruction to the DMA controller, and causes the DMA controller to process the number of transfers. After the data transfer is completed, the DMA controller again Information is fed back to the CPU. This does not overly rely on the CPU, which greatly reduces the CPU resource occupancy and can greatly save system resources. However, the difference in transmission speed between DMA mode and PIO mode is not very obvious: DMA mode is divided into single-byte DMA and multi-byte DMA, and the maximum transmission rate that can be achieved is only 16.6 megabytes. /second. To overcome this shortcoming, the DMA mode of operation used by the hard disk has now largely eliminated single-byte DMA and multi-byte DMA, while using the new UDMA mode.
UDMA模式釆用 16位多字节 DMA模式为基准, 为 DMA模式的增强版 本, 在包括了 DMA模式的优点的基础上, 又增加了 16比特的循环冗余码校 验( Cyclic Redundancy Check , 筒称 CRC ) , 提高了数据传输过程中的准确性 和安全性。 而且, 数据传输速度有了极大的提高, 其目前最高带宽已经可达到 133兆字节 /秒。  The UDMA mode is based on the 16-bit multi-byte DMA mode. It is an enhanced version of the DMA mode. Based on the advantages of the DMA mode, a 16-bit Cyclic Redundancy Check (Cyclic Redundancy Check) is added. Called CRC), which improves the accuracy and security of the data transmission process. Moreover, the data transfer speed has been greatly improved, and its current maximum bandwidth has reached 133 megabytes/second.
由于硬盘的数据交换速度决定了电子设备的存取速度, 因此,硬盘仅能支 Since the data exchange speed of the hard disk determines the access speed of the electronic device, the hard disk can only support
W ριο模式无疑限制了电子设备的数据存储速度。随着高清电视信号等多媒体 应用的带宽逐步增加, 不支持 UDMA模式显然不能适应高带宽应用需求。 The W ριο mode undoubtedly limits the data storage speed of electronic devices. With the increasing bandwidth of multimedia applications such as high-definition television signals, the UDMA mode is not supported and obviously cannot meet the needs of high-bandwidth applications.
第二、 SRAM不能实现所控制存储器的动态交替访问, 如果需要切换到 不同的存储器, 就需要重新配置时序寄存器。 例如, 如果多媒体芯片同时外挂 一个 Flash和一个 IDE硬盘, 则该多媒体芯片无法实现 Flash和多媒体 IDE硬 盘的交替访问, 必需通过 CPU干预的方式重新配置时序寄存器进行切换。 Second, the SRAM cannot implement dynamic alternate access to the controlled memory. If it is necessary to switch to a different memory, the timing register needs to be reconfigured. For example, if the multimedia chip is plugged in at the same time A Flash and an IDE hard disk, the multimedia chip can not achieve alternate access of the Flash and multimedia IDE hard disk, it is necessary to reconfigure the timing register to switch by CPU intervention.
由此可见, 现有技术的缺点为: 1 )由于 SRAM不能实现控制存储器的动 态交替访问,如果需要切换到不同的控制存储器, 就需要通过处理器重新配置 时序寄存器, 从而导致 CPU占有率很高, 数据传输速率低; 2 ) 虽然 UDMA 模式能极大的提高数据传输速率, 适应高带宽的需求, 但是, 随着高清电视信 号等多媒体应用的带宽逐步增加, 如果电子设备不支持 UDMA模式显然不能 适应高带宽应用需求。  It can be seen that the disadvantages of the prior art are as follows: 1) Since the SRAM cannot implement dynamic alternate access of the control memory, if it is necessary to switch to a different control memory, the timing register needs to be reconfigured by the processor, resulting in a high CPU occupancy rate. , the data transmission rate is low; 2) Although the UDMA mode can greatly improve the data transmission rate and adapt to the high bandwidth requirement, however, as the bandwidth of multimedia applications such as high-definition television signals is gradually increased, if the electronic device does not support the UDMA mode, it is obviously impossible. Adapt to high bandwidth applications.
发明内容 Summary of the invention
本发明实施例解决的技术问题是提供一种处理器芯片及基于处理器芯片 的存储控制系统及方法, 以解决目前技术中 CPU占有率高, 数据传输速率低 的问题。  The technical problem to be solved by the embodiments of the present invention is to provide a processor chip and a processor chip-based storage control system and method, which solve the problems of high CPU occupancy and low data transmission rate in the prior art.
为解决上述技术问题, 本发明实施例提供一种处理器芯片, 包括: 至少两个控制器,分別连接在处理器系统总线上,用于接收处理器系统总 线信号, 控制处理器外部存储器的读写;  To solve the above technical problem, an embodiment of the present invention provides a processor chip, including: at least two controllers respectively connected to a processor system bus for receiving a processor system bus signal and controlling reading of an external memory of the processor Write
总线选择器, 分别与所述控制器连接, 所述总线选择器包括一接口, 所述 控制器通过该接口与处理器外部存储器进行数据交换;  a bus selector, which is respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
其中, 所述控制器之一为硬盘控制器, 用于接收处理器系统总线信号, 控 制处理器外部硬盘的读写。  One of the controllers is a hard disk controller for receiving a processor system bus signal and controlling reading and writing of an external hard disk of the processor.
另外, 本发明实施例还提供一种存储控制系统, 包括:  In addition, an embodiment of the present invention further provides a storage control system, including:
至少两个存储器, 用于存储数据, 所述存储器之一为硬盘;  At least two memories for storing data, one of the memories being a hard disk;
处理器芯片;  Processor chip
共享主线, 连接处理器芯片和存储器;  Sharing the main line, connecting the processor chip and the memory;
所述处理器芯片包括:  The processor chip includes:
至少两个控制器,分别连接在处理器系统总线上,用于接收处理器系统总 线信号, 控制处理器外部存储器的读写;  At least two controllers are respectively connected to the processor system bus for receiving the processor system bus signals and controlling the reading and writing of the external memory of the processor;
总线选择器, 分别与所述控制器连接, 所述总线选择器包括一接口, 所述 控制器通过该接口与处理器外部存储器进行数据交换;  a bus selector, which is respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
控制器之一为硬盘控制器,用于接收处理器系统总线信号,控制处理器外 部的所述硬盘的读写。 One of the controllers is a hard disk controller for receiving processor system bus signals and controlling the processor Reading and writing of the hard disk of the department.
此外, 本发明实施例又提供一种存储控制方法, 所述方法包括步骤: In addition, an embodiment of the present invention further provides a storage control method, where the method includes the following steps:
A、 总线选择器接收控制器的总线请求信号, 确认共享总线释放后, 向所 述控制器发送总线允许信号, 共享总线连通所述控制器与其控制的存储器;A. The bus selector receives the bus request signal of the controller, confirms that the shared bus is released, sends a bus enable signal to the controller, and the shared bus communicates with the controller and the memory controlled by the controller;
B、 当连通的控制器为硬盘控制器时, 确定当前的数据交换模式, 并选择 该数据交换模式所对应的控制单元,然后,该控制单元控制硬盘进行数据读写;B. When the connected controller is a hard disk controller, determine a current data exchange mode, and select a control unit corresponding to the data exchange mode, and then the control unit controls the hard disk to perform data reading and writing;
C、 当连通的控制器为非硬盘控制器时, 该控制器直接控制对应的存储器 进行数据读写。 C. When the connected controller is a non-hard disk controller, the controller directly controls the corresponding memory to read and write data.
由上述技术方案可知,本发明实施例通过在系统中设置硬盘控制器,在支 持 PIO模式的同时实现对 IDE硬盘 UDMA访问模式的支持; 或者通过在系統 设置总线选择器, 实现了 CPU系统中硬盘控制器与其它存储控制器的数据地 址的动态共享;或者通过将包括硬盘控制器在内的控制器以及总线选择器封装 在处理器芯片里, 只通过总线器的接口与芯片外部存储器进行数据交换,减少 了芯片封装管脚,从而减少了封装体积; 以及在本发明所提供的存储控制方法 中, 通过控制器将时钟周期内接收的总线释放信号设置为无效,保证了在预定 的时钟周期内能完整传递数据。 从而解决现有技术中由于 CPU占有率很高, 数据传输速率低, 以及不能适应高带宽应用需求的问题。  According to the foregoing technical solution, the embodiment of the present invention implements the support of the UDMA access mode of the IDE hard disk while supporting the PIO mode by setting the hard disk controller in the system; or realizing the hard disk of the CPU system by setting the bus selector in the system. Dynamic sharing of the controller's data address with other memory controllers; or by encapsulating the controller including the hard disk controller and the bus selector in the processor chip, and only exchanging data with the external memory of the chip through the interface of the bus The chip package pin is reduced, thereby reducing the package volume; and in the memory control method provided by the present invention, the bus release signal received during the clock cycle is set to be invalid by the controller, ensuring that the predetermined clock cycle is within a predetermined clock cycle. Can pass data completely. Therefore, the problem in the prior art that the CPU occupation rate is high, the data transmission rate is low, and the high bandwidth application cannot be adapted is solved.
附图说明 DRAWINGS
图 1为现有技术中多媒体处理器的技术方案示意图;  1 is a schematic diagram of a technical solution of a multimedia processor in the prior art;
图 2为本发明实施例所述存储控制系统框图;  2 is a block diagram of a storage control system according to an embodiment of the present invention;
' 图 3为图 2所述硬盘控制器的系统框图;  Figure 3 is a system block diagram of the hard disk controller of Figure 2;
图 4为本发明实施例所述存储控制系统的实施例 2的系统框图; 图 5为本发明实施例所述存储控制方法的总体流程图;  4 is a system block diagram of Embodiment 2 of a storage control system according to an embodiment of the present invention; FIG. 5 is a general flowchart of a storage control method according to an embodiment of the present invention;
图 6为本发明实施例所述存储控制方法中硬盘控制器的工作流程图; 图 Ί为本发明实施例所述存储控制方法中硬盘控制器的写操作流程图; 图 8为本发明实施例所述存储控制方法中硬盘控制器的读操作流程图。 具体实施方式  6 is a flowchart of a working process of a hard disk controller in a storage control method according to an embodiment of the present invention; FIG. 8 is a flowchart of a write operation of a hard disk controller in a storage control method according to an embodiment of the present invention; A flowchart of a read operation of the hard disk controller in the storage control method. detailed description
下面将结合附图与实施例对本发明作进一步地详细描述。  The invention will be further described in detail below with reference to the drawings and embodiments.
为了在减少处理器封装管脚的同时实现多种数据交换模式的复用,本发明 实施例提供一种处理器芯片, 请参见图 2中的 A部分, 其包括至少两个控制 器, 分别连接在处理器系统总线上,控制器之一为硬盘控制器, 还包括一总线 选择器, 分别与控制器相连, 总线选择器上包括一接口, 所述控制器通过该接 口与芯片外部进行数据交换。 In order to achieve multiplexing of multiple data exchange modes while reducing processor package pins, the present invention The embodiment provides a processor chip, see part A in FIG. 2, which includes at least two controllers respectively connected to the processor system bus, one of the controllers is a hard disk controller, and further includes a bus selector. And respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the outside of the chip through the interface.
处理器芯片中各部分的主要功能为:  The main functions of each part of the processor chip are:
控制器, 用于接收处理器总线信号, 控制处理外部存储器的读写。 在实施 例 1中, 处理器为 CPU, 包括两个控制器: 第一控制器为 IDE硬啬控制器 21 , 第二控制器为 SRAM控制器 22。 IDE硬盘控制器 21和 SRAM控制器 22从 CPU系统总线接受指令, 分别对硬盘和其他存储器的读写进行控制。  The controller is configured to receive a processor bus signal, and control the reading and writing of the external memory. In the first embodiment, the processor is a CPU and includes two controllers: the first controller is an IDE hard controller 21, and the second controller is an SRAM controller 22. The IDE hard disk controller 21 and the SRAM controller 22 receive commands from the CPU system bus to control the reading and writing of the hard disk and other memories, respectively.
总线选择器, 用于控制 IDE硬盘控制器 21和 SRAM控制器 22的选路, 确定接口的使用权,连通 IDE硬盘控制器 21与其控制的硬盘,或者连通 SRAM 控制器 22与其他存储器。  A bus selector for controlling the selection of the IDE hard disk controller 21 and the SRAM controller 22, determining the right to use the interface, connecting the IDE hard disk controller 21 with the hard disk it controls, or connecting the SRAM controller 22 with other memories.
如图 2所示,相应地本发明实施例还提供一种存储控制系统, 包括处理器 芯片、共享总线和至少两个存储器。所述共享总线连接处理器芯片和并联的存 储器。  As shown in FIG. 2, an embodiment of the present invention further provides a storage control system including a processor chip, a shared bus, and at least two memories. The shared bus connects the processor chip and the paralleled memory.
在本实施例中, 处理器芯片为 CPU芯片, 共享总线为数据与地址共享主 线, 存储器分别为 SRAM/ROM存储器 32、 flash存储器 33和 IDE硬盘, 存储 控制系统各部分的主要功能为:  In this embodiment, the processor chip is a CPU chip, and the shared bus is a data and address sharing main line. The memory is SRAM/ROM memory 32, flash memory 33 and IDE hard disk respectively. The main functions of each part of the storage control system are:
CPU芯片, 包括 IDE硬盘控制器 21、 第二控制器为 SRAM控制器 22和 总线选择器 1。 IDE硬盘控制器 21从 CPU系统总线接受指令, 对 IDE硬盘 31 的存储进行控制, 而 SRAM控制器 22 从 CPU 系统总线接受指令, 对 SRAM/ROM存储器 32和 flash33按照 SRAM控制器内部的时序控制器进行存 储控制。 总线选择器 1分别与 IDE硬盘控制器 21和 SRAM控制器 22通过控 制器总线连接, 控制 IDE硬盘控制器 21和 SRAM控制器 22的选路; 总线选 择器 1通过接口与数据与地址共享总线连接,进而与 IDE硬盘 31、 SRAM/ROM 存储器 32和 flash存储器 33连接。 总线选择器确控制器对接口的使用权, 进 而控制器对确定数据与地址共享总线的使用权,连通 IDE硬盘控制器 21与 IDE 硬盘 31 ,或者连通 SRAM控制器 22与 SRAM/ROM存储器 32和 flash存储器 33。 通过引入 IDE硬盘控制器 21 , 并进行总线选择器 1的选路, 克服了仅仅 使用具有简单时序的 SRAM控制器无法实现该数据与地址共享总线的动态共 享的缺陷。 The CPU chip includes an IDE hard disk controller 21, and the second controller is an SRAM controller 22 and a bus selector 1. The IDE hard disk controller 21 receives commands from the CPU system bus to control the storage of the IDE hard disk 31, and the SRAM controller 22 receives commands from the CPU system bus, and follows the timing controllers of the SRAM controller in the SRAM/ROM memory 32 and the flash 33. Perform storage control. The bus selector 1 is connected to the IDE hard disk controller 21 and the SRAM controller 22 via a controller bus, respectively, to control the routing of the IDE hard disk controller 21 and the SRAM controller 22; the bus selector 1 is connected to the data and address sharing bus through the interface. Further, it is connected to the IDE hard disk 31, the SRAM/ROM memory 32, and the flash memory 33. The bus selector determines the right to use the interface by the controller, and the controller uses the right to determine the data and address sharing bus, connects the IDE hard disk controller 21 with the IDE hard disk 31, or connects the SRAM controller 22 and the SRAM/ROM memory 32 and Flash memory 33. By introducing the IDE hard disk controller 21 and performing the routing of the bus selector 1, it overcomes the drawback that the dynamic sharing of the data and the address sharing bus cannot be realized by using only the SRAM controller with simple timing.
硬盘控制器不局限于本实施例中的 IDE硬盘控制器 21 , 比如小型电脑系 统接口(Small Computer System Interface, 简称 SCSI)类型的硬盘控制器同样适 用于本发明。  The hard disk controller is not limited to the IDE hard disk controller 21 in this embodiment. For example, a small computer system interface (SCSI) type hard disk controller is also suitable for the present invention.
在本实施例中, 不局限于 SRAM控制器,第二控制器还可以为 Flash控制 器、 压缩 Flash控制器或者 ROM控制器等。  In this embodiment, the second controller may be a flash controller, a compressed flash controller, or a ROM controller.
还请参阅图 3 ,为本发明实施例 1中 IDE硬盘控制器的实施例的系统框图, 包括 PIO控制单元 211 ,与 CPU系统总线连接,用于接收 CPU系统总线信号, 以 PIO模式进行指令与数据传输控制, 实现硬盘 PIO模式的操作; UDMA控 制单元 212, 与所述 CPU 系统总线连接, 用于接收 CPU 系统总线信号, 以 UDMA模式进行数据传输控制, 实现硬盘 UDMA模式的操作;逻辑单元 213 , 分别与 PIO控制单元 211及 UDMA控制单元 212相连接, 用于区分硬盘 PIO 模式和硬盘 UDMA模式, 选通对应的 PIO控制单元或 UDMA控制单元, 可 以通过选通 PIO控制单元或 UDMA控制单元传输线路的方式进行; 接口单元 214,分别与 PIO控制单元 211、 UDMA控制单元 212以及总线选择器 1连接, 用于获取和释放对共享总线的控制权; 还包括一时序单元 215, 分别与 PIO控 制单元 211和 UDMA控制单元 212连接,用于提供硬盘 PIO模式和硬盘 UDMA 模式的实现时序参数, 实现对不同的核心时钟设定的支持。  Please refer to FIG. 3 , which is a system block diagram of an embodiment of an IDE hard disk controller according to Embodiment 1 of the present invention, which includes a PIO control unit 211 connected to a CPU system bus for receiving a CPU system bus signal, and performing commands in a PIO mode. Data transmission control, realizing operation of the hard disk PIO mode; UDMA control unit 212, connected to the CPU system bus, for receiving CPU system bus signals, performing data transmission control in UDMA mode, realizing operation of hard disk UDMA mode; logic unit 213 And respectively connected to the PIO control unit 211 and the UDMA control unit 212 for distinguishing the hard disk PIO mode and the hard disk UDMA mode, and strobing the corresponding PIO control unit or UDMA control unit, which can be transmitted by the strobe PIO control unit or the UDMA control unit The manner of the line is performed; the interface unit 214 is respectively connected to the PIO control unit 211, the UDMA control unit 212 and the bus selector 1 for acquiring and releasing the control right of the shared bus; further comprising a timing unit 215, respectively, and the PIO control The unit 211 is connected to the UDMA control unit 212 for providing a hard disk PIO. Type and timing parameters to achieve the hard disk UDMA mode, implement support for different core clock settings.
其中, PIO控制单元 211及 UDMA控制单元 212都与 CPU系统总线连接, 获取系统指令及数据, 但具体的, PIO控制单元 211控制指令及数据的传输, 但 UDMA控制单元 212只控制数据的传输, 即首先都必须通过 PIO控制单元 211进行系统指令的传输。  The PIO control unit 211 and the UDMA control unit 212 are both connected to the CPU system bus to acquire system commands and data. However, specifically, the PIO control unit 211 controls the transmission of commands and data, but the UDMA control unit 212 only controls the transmission of data. That is, the transmission of the system command must first be performed by the PIO control unit 211.
通过上述本发明的实施例, 可以实现对 PIO模式和 UDMA模式的复用支 持。  Through the above embodiments of the present invention, multiplexing support for the PIO mode and the UDMA mode can be realized.
在本发明实施例中,处理器芯片并不仅仅局限于上述两个控制器,可以包 括多个控制器, 统一由总线选择器进行共享总线的选路。  In the embodiment of the present invention, the processor chip is not limited to the above two controllers, and may include a plurality of controllers, and the routing of the shared bus is unified by the bus selector.
再请参阅图 4, 为本发明实施例所述处理器芯片的实施例 2, 该实施例在 图 2的基础上增加一个 flash控制器, 具体包括: 总线选择器 1、 IDE硬盘控制 器 21、 SRAM控制器 22和 flash控制器 23 , 其中 flash控制器 23负责 Flash 的读写控制。 总线选择器 1负责 DE硬盘控制器 21、 SRAM控制器 22和 flash 控制器 23的选路。 在该实施例中各个器件的功能和作用请参考上述, 在此不 再赘述。 Referring to FIG. 4, it is a second embodiment of a processor chip according to an embodiment of the present invention. Adding a flash controller based on FIG. 2 specifically includes: a bus selector 1, an IDE hard disk controller 21, an SRAM controller 22, and a flash controller 23, wherein the flash controller 23 is responsible for the read/write control of the flash. The bus selector 1 is responsible for routing of the DE hard disk controller 21, the SRAM controller 22, and the flash controller 23. For the function and function of each device in this embodiment, please refer to the above, and details are not described herein again.
本实施例中, 还可以包括压缩 Flash控制器或 ROM控制器。 一般来说, 不会出现两个同样的控制器, 以免造成空间和资源的浪费。  In this embodiment, a compressed flash controller or a ROM controller may also be included. In general, there will be no two identical controllers, so as to avoid wasting space and resources.
另外, 本发明实施例还提供了一种存储控制方法, 其流程图如图 5所示, 所述方法包括步骤:  In addition, an embodiment of the present invention further provides a storage control method, and a flowchart thereof is shown in FIG. 5, where the method includes the following steps:
步骤 101 : 总线选择器接收控制器的总线请求信号; 也就是说, 控制器需 要控制存储器的读写, 并向总线选择器发送总线请求信号, 总线选择器接收该 总线请求信号;  Step 101: The bus selector receives a bus request signal of the controller; that is, the controller needs to control the reading and writing of the memory, and sends a bus request signal to the bus selector, and the bus selector receives the bus request signal;
步骤 102: 总线选择器判断共享总线是否被占用, 如果共享总线被占用, 执行步骤 103 , 否则执行步骤 104;  Step 102: The bus selector determines whether the shared bus is occupied, if the shared bus is occupied, step 103 is performed, otherwise step 104 is performed;
步骤 103: 总线选择器向占用共享总线的控制器发送总线释放信号, 要求 占用的控制器释放共享总线;  Step 103: The bus selector sends a bus release signal to the controller occupying the shared bus, and the occupied controller is required to release the shared bus.
为了保证各个设备的公平竟争, 以及数据处理的完整性,接收到总线释放 指令的控制器如果还处在预定的时间周期内, 将该总线释放指令设置为无效, 比如, UDMA模式下进行数据传输时, 其预设的时间为一个 CPU时钟周期, 以满足 UDMA能够完整进行至少一个 CPU时钟的数据传输。  In order to ensure the fair competition of each device and the integrity of the data processing, the controller receiving the bus release instruction sets the bus release instruction to be invalid if it is still within a predetermined time period, for example, data is performed in UDMA mode. When transmitting, the preset time is one CPU clock cycle to satisfy the UDMA's ability to completely perform data transmission of at least one CPU clock.
本步據还可以包括以下步骤:  This step can also include the following steps:
步骤 1031 : 如果占用共享总线的控制器还处于预定的时间周期内, 则将 总线释放信号设置为无效;  Step 1031: If the controller occupying the shared bus is still within a predetermined time period, the bus release signal is set to be invalid;
步驟 1032: 占用共享总线的控制器一时间周期后进入暂停, 释放共享总 线;  Step 1032: The controller occupying the shared bus enters a pause after a time period, and releases the shared bus.
步驟 1033: 总线选择器检测共享总线是否获得释放, 若是, 则执行步骤 104, 否则重新执行步骤 1033, 直至确认共享总线被释放。  Step 1033: The bus selector detects whether the shared bus is released. If yes, step 104 is performed, otherwise step 1033 is re-executed until it is confirmed that the shared bus is released.
该步骤中也可以不进行总线选择器的检测操作,而是由占用共享总线的控 制器发出释放完成指令, 总线选择器接收到该释放完成指令后执行步骤 104。 步骤 104: 占用总线的控制器 #放共享总线后, 总线选择器向请求的控制 器发送总线允许信号; In this step, the detection operation of the bus selector may not be performed, but the release completion instruction is issued by the controller occupying the shared bus, and the bus selector executes step 104 after receiving the release completion instruction. Step 104: After the bus controller occupies the shared bus, the bus selector sends a bus enable signal to the requesting controller;
步骤 105: 通过共享总线连通控制器与其控制的存储器; 所述控制器分为 硬盘控制器和非硬盘控制器,当连通的控制器为硬盘控制器时,执行步骤 106, 否则执行步骤 107;  Step 105: Connect the controller and the memory controlled by the shared bus through the shared bus; the controller is divided into a hard disk controller and a non-hard disk controller, when the connected controller is a hard disk controller, step 106 is performed, otherwise step 107 is performed;
步骤 106: 硬盘控制器判断当前的数据交换工作模式, 如果是 UDMA模 式, 选择内部相应的单元用 UDMA模式控制硬盘的读写访问, 如果是 PIO模 式,选择内部相应的单元用 PIO模式控制硬盘的读写访问,并结束读写访问流 程;  Step 106: The hard disk controller determines the current data exchange working mode. If it is the UDMA mode, select the corresponding internal unit to control the read and write access of the hard disk by using the UDMA mode. If it is the PIO mode, select the corresponding internal unit to control the hard disk with the PIO mode. Read and write access, and end the read and write access process;
步骤 107: 非硬盘控制器控制存储器的读写访问, 并结束流程。  Step 107: The non-hard disk controller controls the read and write access of the memory and ends the process.
还请参阅图 6, 为本发明实施例存储控制方法中, 硬盘控制器被允许使用 共享总线时, 硬盘控制器进行读写控制过程的流程图, 包括以下步骤:  6 is a flowchart of a read/write control process performed by a hard disk controller when a hard disk controller is allowed to use a shared bus in the storage control method according to an embodiment of the present invention, including the following steps:
步骤 201、 硬盘控制器获取共享总线;  Step 201: The hard disk controller acquires a shared bus.
步骤 202、 硬盘控制器逻辑单元识别所述硬盘存储器的工作模式, 是 PIO 模式则执行步驟 203 , 如果是 UDMA模式执行步骤 204;  Step 202, the hard disk controller logic unit identifies the working mode of the hard disk storage, in the PIO mode, step 203 is performed, and if it is the UDMA mode, step 204 is performed;
步驟 203、 逻辑单元选通 PIO控制单元的线路, 进行 PIO读写访问控制, 并执行步骤 209;  Step 203, the logic unit strobes the line of the PIO control unit, performs PIO read and write access control, and performs step 209;
步骤 204、逻辑单元选通 PIO控制单元的线路,采用 PIO模式向硬盘存储 器发送 UDMA传输指令;  Step 204: The logic unit strobes the line of the PIO control unit, and sends a UDMA transmission instruction to the hard disk storage by using a PIO mode;
步骤 205、 选通 UDMA控制单元的线路; 也就是说, 硬盘存储器发送接 受反馈指令表示可以适用 UDMA模式, 逻辑单元接收到硬盘存储器的接受反 馈指令后, 选通 UDMA控制单元的线路;  Step 205, strobing the line of the UDMA control unit; that is, the hard disk memory transmitting and receiving the feedback instruction indicates that the UDMA mode can be applied, and after receiving the feedback command from the hard disk memory, the logic unit strobes the line of the UDMA control unit;
步驟 206、 UDMA控制单元判断 UDMA模式类型, 若是写访问, 则执行 步骤 207, 否则执行步驟 208;  Step 206, the UDMA control unit determines the UDMA mode type, if it is a write access, step 207 is performed, otherwise step 208 is performed;
步骤 207、 用 UDMA模式进行写访问控制;  Step 207: Perform write access control in a UDMA mode.
步驟 208、 用 UDMA模式进行读访问控制;  Step 208: Perform read access control in a UDMA mode.
步驟 209、 读 /写数据交换完成, 结束。  Step 209, the read/write data exchange is completed, and the process ends.
下面的实施例详细介绍 UDMA模式下读写访问控制的过程。  The following embodiment details the process of read and write access control in UDMA mode.
还请参阅图 7, 为本发明实施例中所述 UDMA模式下写访问控制的完整 流程图, 包括以下步驟: Please refer to FIG. 7, which is a complete diagram of write access control in the UDMA mode according to an embodiment of the present invention. The flow chart includes the following steps:
步骤 401、 总线选择器接收到硬盘控制器发送的总线请求信号; 步骤 402、 总线选择器判断数据与地址共享总线是否被占用, 若是, 则执 行步骤 403后执行步骤 404, 否则执行步骤 404;  Step 401, the bus selector receives the bus request signal sent by the hard disk controller; Step 402, the bus selector determines whether the data and address sharing bus is occupied, and if so, after performing step 403, step 404 is performed; otherwise, step 404 is performed;
步骤 403、总线选择器向占用所述数据与地址共享总线的控制器发送总线 释放信号;  Step 403: The bus selector sends a bus release signal to a controller that occupies the data and address sharing bus.
步骤 404、 所述总线选择器检测数据与地址共享总线被幹放或空闲后, 向 硬盘控制器返回总线允许信号;  Step 404: After the bus selector detects that the data and the address sharing bus are dry or idle, return a bus enable signal to the hard disk controller.
步骤 405、 总线选择器通过接口将硬盘控制器连通至数据与地址共享总 线;  Step 405: The bus selector connects the hard disk controller to the data and address sharing bus through the interface;
步骤 406、硬盘控制器逻辑单元识别所述硬盘存储器的工作模式为 UDMA 模式, 通过 PIO控制器发送 UDMA传输指令;  Step 406: The hard disk controller logic unit identifies that the working mode of the hard disk storage is a UDMA mode, and sends a UDMA transmission instruction by using a PIO controller.
步骤 407、 硬盘存储器识别命令并准备好 UDMA数据传输时, 产生硬 盘中断信号, 处理器接收到中断信号以后, 查询硬盘的状态寄存器, 确认 硬盘控制器可以执行 UDMA数据传输。 处理器切换逻辑单元到 UDMA模 式所对应的逻辑值, 并选择操作模式配置寄存器为写操作;  Step 407: When the hard disk memory recognizes the command and prepares the UDMA data transmission, a hard disk interrupt signal is generated. After receiving the interrupt signal, the processor queries the status register of the hard disk to confirm that the hard disk controller can perform UDMA data transmission. The processor switches the logic unit to a logic value corresponding to the UDMA mode, and selects the operation mode configuration register as a write operation;
步骤 408、 逻辑单元选通 UDMA控制单元;  Step 408, the logic unit strobes the UDMA control unit;
步骤 409、操作模式配置寄存器向 UDMA控制单元发送操作指令, UDMA 控制单元识别该操作指令为写操作指令;  Step 409: The operation mode configuration register sends an operation instruction to the UDMA control unit, and the UDMA control unit recognizes the operation instruction as a write operation instruction;
步驟 410、 UDMA控制单元判断是否执行过 UDMA写初始化, 是则执行 步驟 415, 否则执行步骤 411;  Step 410, the UDMA control unit determines whether the UDMA write initialization has been performed, if yes, step 415 is performed, otherwise step 411 is performed;
步骤 411、 执行 UDMA写初始化;  Step 411, performing UDMA write initialization;
步骤 412、 UDMA控制单元检测是否接收到总线释放信号, 如是执行步 骤 413, 否则执行步骤 415;  Step 412, the UDMA control unit detects whether a bus release signal is received, if the step 413 is performed, otherwise step 415 is performed;
步驟 413、 UDMA控制单元进入写暂停状态, 释放共享总线;  Step 413, the UDMA control unit enters a write pause state, and releases the shared bus.
步驟 414、 发出总线请求指令, 重新执行步骤 401;  Step 414, issue a bus request instruction, and re-execute step 401;
步驟 415、 UDMA控制单元进行写传输一个 CPU时钟的数据;  Step 415, the UDMA control unit performs write and transfer data of one CPU clock;
步驟 416、 判断写传输是否结束, 是则执行步驟 417, 否则执行步骤 412; 步骤 417、 发送循环冗余码校验并结束。 也就是说, 本实施例在 UDMA写控制状态机中, 进入主机暂停状态的判 断条件增加了总线释放信号的有效条件,一旦该条件成立, 则会进入主机暂停 状态, 暂停发送随路时钟和数据。 当 UDMA访问结束后主动获取数据地址总 线, 此时退出主机暂停状态到数据传输状态, 继续发送数据到 IDE硬盘, 直 至 UDMA写传输完毕后发送校验 CRC Step 416: Determine whether the write transmission ends. If yes, go to step 417. Otherwise, go to step 412. Step 417: Send the cyclic redundancy code check and end. That is to say, in the UDMA write control state machine, the determination condition of entering the host pause state increases the valid condition of the bus release signal, and once the condition is met, the host pause state is entered, and the associated clock and data are suspended. . When the UDMA access ends, the data address bus is actively acquired. At this time, the host pause state to the data transfer state is exited, and the data is continuously sent to the IDE hard disk until the UDMA write transfer is completed and the check CRC is sent.
再请参阅图 8, 为本发明实施例所述 UDMA模式下读访问控制的完整流 程图, 包括以下步骤:  Referring to FIG. 8, a complete flow diagram of read access control in UDMA mode according to an embodiment of the present invention includes the following steps:
步驟 501、 总线选择器接收到硬盘控制器发送的总线请求信号;  Step 501: The bus selector receives a bus request signal sent by the hard disk controller.
步骤 502、 总线选择器判断数据与地址共享总线是否被占用, 是则执行步 骤 503后执行步骤 504, 否则执行步骤 504;  Step 502, the bus selector determines whether the data and address sharing bus is occupied, if yes, step 503 is followed by step 504, otherwise step 504 is performed;
步骤 503、总线选择器向占用所述数据与地址共享总线的控制器发送总线 释放信号;  Step 503: The bus selector sends a bus release signal to a controller that occupies the data and address sharing bus.
步驟 504、 所述总线选择器检测数据与地址共享总线被释放或空闲后, 向 硬盘控制器返回总线允许信号;  Step 504: After the bus selector detects that the data and the address sharing bus are released or idle, returning a bus enable signal to the hard disk controller;
步驟 505、 总线选择器将硬盘控制器连通至数据与地址共享总线; 步骤 506、硬盘控制器逻辑单元识别所述硬盘存储器的工作模式为 UDMA 模式, 通过 PIO控制器发送 DMA传输指令;  Step 505: The bus selector connects the hard disk controller to the data and address sharing bus. Step 506: The hard disk controller logic unit identifies that the working mode of the hard disk memory is a UDMA mode, and sends a DMA transfer instruction through the PIO controller.
步驟 507、 硬盘存储器识别命令并准备好 UDMA数据传输时, 产生硬盘 中断信号, 处理器接收到中断信号以后, 查询硬盘的状态寄存器, 确认硬盘控 制器可以执行 UDMA数据传输。处理器切换逻辑单元到 UDMA模式所对应的 逻辑值, 并选择操作模式配置寄存器为读操作;  Step 507: When the hard disk memory recognizes the command and prepares the UDMA data transmission, the hard disk interrupt signal is generated. After receiving the interrupt signal, the processor queries the status register of the hard disk to confirm that the hard disk controller can perform UDMA data transmission. The processor switches the logic unit to a logic value corresponding to the UDMA mode, and selects the operation mode configuration register as a read operation;
步驟 508、 逻辑单元选通 UDMA控制单元;  Step 508, the logic unit strobes the UDMA control unit;
步驟 509、操作模式配置寄存器向 UDMA控制单元发送操作指令, UDMA 控制单元识别该操作指令为读操作指令;  Step 509: The operation mode configuration register sends an operation instruction to the UDMA control unit, and the UDMA control unit recognizes the operation instruction as a read operation instruction;
步骤 510、 控制单元判断是否执行过 UDMA读初始化, 若是, 则执行步 骤 517, 否则执行步骤 511;  Step 510, the control unit determines whether the UDMA read initialization has been performed, and if so, step 517 is performed, otherwise step 511 is performed;
步骤 511、 执行 UDMA读初始化;  Step 511, performing UDMA read initialization;
步骤 512、控制单元检测是否接收到总线锋放信号, 如是,执行步骤 513 , 否则执行步骤 517; 步骤 513、 UDMA控制单元将 DMA就绪信号设置为无效; Step 512, the control unit detects whether a bus front-end signal is received, and if so, step 513 is performed, otherwise step 517 is performed; Step 513, the UDMA control unit sets the DMA ready signal to be invalid;
步骤 514、 按照设定继续接收 0-2个数据; 若速率模式提高后, 还可以接 收更多数据。  Step 514, continue to receive 0-2 data according to the setting; if the rate mode is increased, more data can be received.
步骤 515、 UDMA控制单元进入读暂停状态, 释放共享总线;  Step 515, the UDMA control unit enters a read pause state, releasing the shared bus;
步驟 516、 发出总线请求指令, 重新执行步骤 501;  Step 516, issue a bus request instruction, and re-execute step 501;
步骤 517、 UDMA进行读传输一个 CPU时钟的数据;  Step 517, UDMA performs read and transfer data of one CPU clock;
步驟 518、 判断读传输是否结束, 若是, 则执行步骤 519, 否则执行步骤 Step 518: Determine whether the read transmission ends, and if yes, perform step 519, otherwise perform steps
512; 512;
步骤 519、 发送循环冗余码校验, 并结束。  Step 519, sending a cyclic redundancy code check, and ending.
也就是说, 本实施例在 UDMA工作模式下, 在 UDMA读控制状态机中, 进入主机暂停状态的判断条件增加了总线释放信号有效的条件,一旦该条件判 断成立, 将 IDE总线上的主侧 DMA就绪信号置为无效, 在继续收到了 IDE 硬盘的 0-2个 16比特数据之后, 再进入主机的暂停状态, 直到 SRMA访问结 束并重新获取数据地址总线, 重新进入传输状态后, 将 IDE总线上主侧 DMA 就绪信号置为有效, IDE硬盘继续发送数据到 IDE硬盘控制器。  That is to say, in the UDMA working mode, in the UDMA read control state machine, the judgment condition of entering the host pause state increases the condition that the bus release signal is valid, and once the condition is judged, the main side on the IDE bus is established. The DMA ready signal is disabled. After continuing to receive 0-2 16-bit data from the IDE hard disk, it enters the host's pause state until the SRMA access ends and reacquires the data address bus. After re-entering the transfer state, the IDE bus is used. The upper main DMA ready signal is asserted and the IDE hard drive continues to send data to the IDE hard disk controller.
由此可见, 本发明实施例支持数据地址共享的 IDE硬盘控制器不仅支持 原来已有的 PIO模式, 还能支持效率更高的 UDMA模式, 实现了 IDE硬盘控 制器与其它存储器的数据地址线的动态共存。 也就是说, 本发明实施例使得 IDE硬盘控制器在与其它存储控制器实现数据线和地址线复用的情况下,能够 同时实现 PIO模式和 U MA模式的传输,从而解决现有技术中 CPU占有率很 高, 数据传输速率低, 以及不能适 高带宽应用需求的问题。 通过本发明在实 现多种数据交换模式复用的基础上减少了封装管脚的数目,从而减少了芯片封 装体积。  It can be seen that the IDE hard disk controller supporting the data address sharing in the embodiment of the present invention not only supports the original PIO mode, but also supports the more efficient UDMA mode, and realizes the data address line of the IDE hard disk controller and other memories. Dynamic coexistence. That is to say, the embodiment of the present invention enables the IDE hard disk controller to simultaneously implement the transmission of the PIO mode and the U MA mode in the case of multiplexing the data lines and the address lines with other storage controllers, thereby solving the CPU in the prior art. High occupancy, low data transfer rates, and the problem of not being able to accommodate high bandwidth applications. The invention reduces the number of package pins on the basis of realizing multiple data exchange mode multiplexing, thereby reducing the chip package volume.
最后所应说明的是, 以上实施例仅用以说明本发明的技术方案而非限制, 尽管参照较佳实施例对本发明进行了详细说明 ,本领域的普通技术人员应当理 解, 可以对本发明的技术方案进行修改或者等同替换, 而不脱离本发明技术方 案的精神和范围。  It should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments. Modifications or equivalents are made without departing from the spirit and scope of the invention.

Claims

权 利 要 求 Rights request
1、 一种处理器芯片, 其特征在于, 包括:  A processor chip, comprising:
至少两个控制器,分别连接在处理器系统总线上,用于接收处理器系统总 线信号, 控制处理器外部存储器的读写;  At least two controllers are respectively connected to the processor system bus for receiving the processor system bus signals and controlling the reading and writing of the external memory of the processor;
总线选择器, 分别与所述控制器连接, 用于所述总线选择器包括一接口, 所述控制器通过该接口与处理器外部存储器进行数据交换;  a bus selector, respectively connected to the controller, wherein the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
其中, 所述控制器之一为硬盘控制器, 用于接收处理器系统总线信号, 控 制处理器外部硬盘的读写。  One of the controllers is a hard disk controller for receiving a processor system bus signal and controlling reading and writing of an external hard disk of the processor.
2、 根据权利要求 1所述的处理器芯片, 其特征在于, 所述硬盘控制器包 括 IDE硬盘控制器。  2. The processor chip of claim 1, wherein the hard disk controller comprises an IDE hard disk controller.
3、 根据权利要求 1或 2所述的处理器芯片, 其特征在于, 所述硬盘控制 器包括:  The processor chip according to claim 1 or 2, wherein the hard disk controller comprises:
可编程输入输出 PIO控制单元, 与处理器芯片的系统总线连接, 用于接 收处理器芯片的系统总线信号, 以 PIO模式进行指令与数据传输控制;  Programmable input and output PIO control unit, connected to the system bus of the processor chip, is used to receive the system bus signal of the processor chip, and performs command and data transmission control in the PIO mode;
直接内存访问 UDMA控制单元, 与所述处理器芯片系统的总线连接, 用 于接收处理器芯片的系统总线信号, 以 UDMA模式进行数据传输控制;  a direct memory access UDMA control unit, connected to the bus of the processor chip system, for receiving a system bus signal of the processor chip, and performing data transmission control in a UDMA mode;
逻辑单元, 分别与所述 PIO控制单元及所述 UDMA控制单元相连接, 用 于区分硬盘 PIO模式和硬盘 UDMA模式, 并选通对应的 PIO控制单元或 UDMA控制单元;  a logic unit, respectively connected to the PIO control unit and the UDMA control unit, for distinguishing between a hard disk PIO mode and a hard disk UDMA mode, and strobing a corresponding PIO control unit or a UDMA control unit;
接口单元, 分别与所述 PIO控制单元、 所述 UDMA控制单元和所述总线 选择器相连接,用于接收总线选择器发送的总线允许信号和总线释放信号, 以 获取和释放对所述总线选择器接口的控制。  An interface unit, respectively connected to the PIO control unit, the UDMA control unit, and the bus selector, for receiving a bus enable signal and a bus release signal sent by the bus selector to acquire and release the bus selection Control of the interface.
4、 根据权利要求 3所述的处理器芯片, 其特征在于, 所述硬盘控制器还 包括:  The processor chip according to claim 3, wherein the hard disk controller further comprises:
时序单元, 分别与所述 PIO控制单元和所述 UDMA控制单元连接, 用于 提供硬盘 PIO模式和硬盘 UDMA模式的实现时序。  The timing unit is respectively connected to the PIO control unit and the UDMA control unit, and is configured to provide an implementation timing of the hard disk PIO mode and the hard disk UDMA mode.
5、 根据权利要求 1所述的处理器芯片, 其特征在于, 所述控制器包括: 闪存 Flash控制器、 压缩 Flash控制器、 SRAM控制器或 ROM控制器。  The processor chip according to claim 1, wherein the controller comprises: a flash memory controller, a compressed flash controller, an SRAM controller or a ROM controller.
6、 一种存储控制系统, 其特征在于, 包括: 至少两个存储器, 用于存储数据, 所述存储器之一为硬盘; 6. A storage control system, comprising: At least two memories for storing data, one of the memories being a hard disk;
处理器芯片;  Processor chip
共享主线, 连接处理器芯片和存储器;  Sharing the main line, connecting the processor chip and the memory;
所述处理器芯片包括:  The processor chip includes:
至少两个控制器,分别连接在处理器系统总线上,用于接收处理器系统总 线信号, 控制处理器外部存储器的读写;  At least two controllers are respectively connected to the processor system bus for receiving the processor system bus signals and controlling the reading and writing of the external memory of the processor;
总线选择器, 分别与所述控制器连接, 所述总线选择器包括一接口, 所述 控制器通过该接口与处理器外部存储器进行数据交换;  a bus selector, which is respectively connected to the controller, the bus selector includes an interface, and the controller exchanges data with the external memory of the processor through the interface;
所述控制器之一为硬盘控制器,用于接收处理器系统总线信号,控制处理 器外部的所述硬盘的读写。  One of the controllers is a hard disk controller for receiving a processor system bus signal and controlling reading and writing of the hard disk external to the processor.
7、 根据权利要求 6所述的存储控制系统, 其特征在于, 所述硬盘控制器 为 IDE硬盘控制器; 所述硬盘为 IDE硬盘。  7. The storage control system according to claim 6, wherein the hard disk controller is an IDE hard disk controller; and the hard disk is an IDE hard disk.
8、 根据权利要求 6或 7所述的存储控制系统, 其特征在于, 所述硬盘控 制器包括:  The storage control system according to claim 6 or 7, wherein the hard disk controller comprises:
PIO控制单元, 与所述处理器系统总线连接, 用于接收处理器系统总线信 号, 以 PIO模式进行指令与数据传输控制;  a PIO control unit, connected to the processor system bus, for receiving a processor system bus signal, and performing command and data transmission control in a PIO mode;
UDMA控制单元, 与所述处理器系统的总线连接, 用于接收处理器的系 统总线信号, 以 UDMA模式进行数据传输控制;  a UDMA control unit, connected to the bus of the processor system, for receiving a system bus signal of the processor, and performing data transmission control in a UDMA mode;
逻辑单元, 分别与所述 PIO控制单元及所述 UDMA控制单元相连接, 用 于区分 PIO模式和 UDMA模式, 选通对应的 PIO控制单元或 UDMA控制单 元;  a logic unit, respectively connected to the PIO control unit and the UDMA control unit, for distinguishing between a PIO mode and a UDMA mode, and stroking a corresponding PIO control unit or a UDMA control unit;
接口单元, 分别与所述 PIO控制单元及所述 UDMA控制单元以及所述总 线选择器相连接, 用于接收总线选择器发送的总线允许信号和总线释放信号, 以获取和幹放对所述数据与地址共享总线的控制。  An interface unit, respectively connected to the PIO control unit and the UDMA control unit and the bus selector, for receiving a bus enable signal and a bus release signal sent by the bus selector, to acquire and dry the data Control of the bus shared with the address.
9、 根据权利要求 8所述的存储控制系统, 其特征在于, 所述硬盘控制器 还包括:  The storage control system according to claim 8, wherein the hard disk controller further comprises:
时序单元, 分别与所述 PIO控制单元和所述 UDMA控制单元连接, 用于 提供硬盘 PIO模式和硬盘 UDMA模式的实现时序。  The timing unit is respectively connected to the PIO control unit and the UDMA control unit, and is configured to provide an implementation timing of the hard disk PIO mode and the hard disk UDMA mode.
10、根据权利要求 9所述的存储控制系统,其特征在于,所述控制器包括: Flash控制器、 压缩 Flash控制器、 SRAM控制器或 ROM控制器。 10. The storage control system of claim 9, wherein the controller comprises: Flash controller, compressed flash controller, SRAM controller or ROM controller.
11、 一种存储控制方法, 其特征在于, 包括以下步驟:  11. A storage control method, comprising the steps of:
A、 总线选择器接收控制器的总线请求信号, 确认共享总线释放后, 向所 述控制器发送总线允许信号, 共享总线连通所述控制器与其控制的存储器; A. The bus selector receives the bus request signal of the controller, confirms that the shared bus is released, sends a bus enable signal to the controller, and the shared bus communicates with the controller and the memory controlled by the controller;
B、 当连通的控制器为硬盘控制器时, 确定当前的数据交换模式, 并选择 该数据交换模式所对应的控制单元,然后,该控制单元控制硬盘进行数据读写;B. When the connected controller is a hard disk controller, determine a current data exchange mode, and select a control unit corresponding to the data exchange mode, and then the control unit controls the hard disk to perform data reading and writing;
C、 当连通的控制器为非硬盘控制器时, 该控制器直接控制对应的存储器 进行数据读写。 C. When the connected controller is a non-hard disk controller, the controller directly controls the corresponding memory to read and write data.
12、 如权利要求 11所述的存储控制方法, 其特征在于, 所述确认共享总 线释放具体包括:  The storage control method according to claim 11, wherein the confirming the shared bus release specifically includes:
所述总线选择器判断共享总线是否被占用,若是,则向占用共享总线的控 制器发送总线释放信号; , 如果所述占用共享总线的控制器还处于预定的时间周期内,则将所述总线 释放信号设置为无效, 当该时间周期结束后释放共享总线。  The bus selector determines whether the shared bus is occupied, and if so, sends a bus release signal to a controller occupying the shared bus; if the controller occupying the shared bus is still within a predetermined time period, the bus is The release signal is set to inactive and the shared bus is released when the time period is over.
13、 如权利要求 11所述的存储控制方法, 其特征在于, 所述步骤 B的具 体实现过程包括:  The storage control method according to claim 11, wherein the specific implementation process of the step B includes:
Bl、 硬盘控制器中的逻辑单元识别所述硬盘存储器的工作模式, 如果是 PIO模式, 则执行步骤 B2, 如果是 UDMA模式, 则执行步驟 B3;  Bl, the logic unit in the hard disk controller identifies the working mode of the hard disk memory, if it is the PIO mode, step B2 is performed, if it is the UDMA mode, step B3 is performed;
B2、 所述逻辑单元选通 PIO控制单元, 所述 PIO控制单元进行 PIO模式 读写访问控制, 结束;  B2, the logic unit strobes the PIO control unit, and the PIO control unit performs PIO mode read and write access control, and ends;
B3、 所述逻辑单元选通 PIO控制单元的线路, 向硬盘存储器发送 UDMA 传输指令;  B3, the logic unit strobes the line of the PIO control unit, and sends a UDMA transmission instruction to the hard disk storage;
B4、 当接收到硬盘存储器的接受反馈指令后, 选通 UDMA控制单元; B5、 所述 UDMA控制单元进行 UDMA模式读写访问控制。  B4. After receiving the feedback command from the hard disk storage, the UDMA control unit is strobed; B5, the UDMA control unit performs UDMA mode read/write access control.
14、 如权利要求 13所述的存储控制方法, 其特征在于, 所述步骤 B4的 具体实现过程包括:  The storage control method according to claim 13, wherein the specific implementation process of the step B4 includes:
硬盘存储器识别所述传输指令并准备好 UDMA数据传输时, 产生硬盘中 断信号, 当处理器接收到所述硬盘中断信号以后, 查询硬盘的状态寄存器, 确 认硬盘控制器执行 UDMA数据传输时,切换所述逻辑单元到 UDMA模式所对 应的逻辑值, 并选择操作模式配置寄存器为写操作。 When the hard disk memory recognizes the transfer instruction and prepares the UDMA data transmission, generates a hard disk interrupt signal. When the processor receives the hard disk interrupt signal, queries the hard disk status register to confirm that the hard disk controller performs UDMA data transmission, and switches the location. Logic unit to UDMA mode The logical value should be, and the operating mode configuration register is selected as the write operation.
15、 如权利要求 14所述的存储控制方法, 其特征在于, 所述步骤 B5的 具体实现过程包括:  The storage control method according to claim 14, wherein the specific implementation process of the step B5 includes:
操作模式配置寄存器向 UDMA控制单元发送操作指令, 所述 UDMA控 制单元识别所述操作指令为写操作指令,判断是否执行过写初始化, 如果没有 执行过, 则执行写初始化;  The operation mode configuration register sends an operation instruction to the UDMA control unit, the UDMA control unit recognizes that the operation instruction is a write operation instruction, determines whether a write initialization has been performed, and if not, performs write initialization;
所述 UDMA控制单元检测是否接收到总线释放信号;  The UDMA control unit detects whether a bus release signal is received;
如果接收到总线释放信号, UDMA控制单元进入写暂停状态, 释放共享 总线, 发出总线请求信号;  If a bus release signal is received, the UDMA control unit enters a write suspend state, releases the shared bus, and issues a bus request signal;
如果没有接收到总线释放信号, UDMA控制单元进行写传输一个时钟周 期的数据;  If the bus release signal is not received, the UDMA control unit performs a write transfer of one clock cycle of data;
当写传输结束时, 发送循环冗余码校验。  When the write transfer ends, a cyclic redundancy check is sent.
16、 如权利要求 14所述的存储控制方法, 其特征在于, 所述步骤 B5具 体包括:  The storage control method according to claim 14, wherein the step B5 includes:
操作模式配置寄存器向 UDMA控制单元发送操作指令, 所述 UDMA控 制单元识别所述操作指令为读操作指令,判断是否执行过读初始化,如果没有 执行过, 则执行读初始化;  The operation mode configuration register sends an operation instruction to the UDMA control unit, the UDMA control unit recognizes that the operation instruction is a read operation instruction, determines whether to perform over-read initialization, and if not, performs read initialization;
所述 UDMA控制单元检测是否接收到总线释放信号;  The UDMA control unit detects whether a bus release signal is received;
如果接收到总线释放信号, UDMA控制单元设置 DMA就绪信号为无效, 继续 0-2个数据, 进入读暂停状态, 释放共享总线;  If the bus release signal is received, the UDMA control unit sets the DMA ready signal to be invalid, continues 0-2 data, enters the read pause state, and releases the shared bus;
如果没有接收到总线释放信号, UDMA控制单元进行读传输一个时钟周 期的数据;  If the bus release signal is not received, the UDMA control unit performs a read transfer of data for one clock cycle;
当读传输结束时, 发送循环冗余码校验。  When the read transmission ends, a cyclic redundancy check is sent.
PCT/CN2006/003725 2006-01-06 2006-12-30 Processor chip and memory controlling system and method thereof WO2007079660A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200610032786.0 2006-01-06
CNB2006100327860A CN100346285C (en) 2006-01-06 2006-01-06 Processor chip, storage control system and method

Publications (1)

Publication Number Publication Date
WO2007079660A1 true WO2007079660A1 (en) 2007-07-19

Family

ID=37484090

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2006/003725 WO2007079660A1 (en) 2006-01-06 2006-12-30 Processor chip and memory controlling system and method thereof

Country Status (2)

Country Link
CN (1) CN100346285C (en)
WO (1) WO2007079660A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669894A (en) * 2018-12-21 2019-04-23 天津国芯科技有限公司 A kind of universal asynchronous receiving-transmitting device reducing chip package pin
CN113383326A (en) * 2019-05-17 2021-09-10 华为技术有限公司 Integrated circuit with interface multiplexing function and pin switching method
CN114564426A (en) * 2020-11-27 2022-05-31 中国科学院声学研究所 Embedded multi-interface data conversion device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043592B (en) * 2010-12-09 2012-05-02 成都市华为赛门铁克科技有限公司 Connecting and processing method of solid state disk (SSD), SSD and system
CN103106042B (en) * 2011-11-14 2016-07-06 联想(北京)有限公司 Data access method and electronic equipment
CN104239252A (en) * 2013-06-21 2014-12-24 华为技术有限公司 Data transmission method, device and system of data storage system
CN106155963A (en) * 2015-03-31 2016-11-23 上海黄浦船用仪器有限公司 A kind of data guiding system based on Multibus bus and application
CN105389283A (en) * 2015-12-11 2016-03-09 中国航空工业集团公司西安航空计算技术研究所 Electronic disk controller circuit and control method based on CoreConnect bus
CN108762460A (en) * 2018-06-28 2018-11-06 北京比特大陆科技有限公司 A kind of data processing circuit, calculation power plate, mine machine and dig mine system
CN112685344B (en) * 2020-12-30 2024-05-14 合肥市芯海电子科技有限公司 DMA programming circuit and programming method based on same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1387644A (en) * 1999-08-31 2002-12-25 英特尔公司 SDRAM controller for parallel processor architecture
CN1437730A (en) * 1999-12-28 2003-08-20 英特尔公司 Distributed memory control and bandwidth optimization
CN1542766A (en) * 2003-11-06 2004-11-03 威盛电子股份有限公司 CD control chip having common storage access assembly and storage access method thereof
US20050251593A1 (en) * 2004-05-05 2005-11-10 Chanson Lin Method for determining transmitting mode of a memory card with multiple interface functions

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5495586A (en) * 1991-12-26 1996-02-27 Kabushiki Kaisha Toshiba Computer system having memory card/disk storage unit used as external storage device
JPH07311633A (en) * 1994-05-19 1995-11-28 Toshiba Corp Data recording and reproducing device and interface cable therefor
CN2335192Y (en) * 1998-02-25 1999-08-25 穆春虎 Computer hard disc switcher
CN100367151C (en) * 2004-03-02 2008-02-06 广达电脑股份有限公司 Portable computer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1387644A (en) * 1999-08-31 2002-12-25 英特尔公司 SDRAM controller for parallel processor architecture
CN1437730A (en) * 1999-12-28 2003-08-20 英特尔公司 Distributed memory control and bandwidth optimization
CN1542766A (en) * 2003-11-06 2004-11-03 威盛电子股份有限公司 CD control chip having common storage access assembly and storage access method thereof
US20050251593A1 (en) * 2004-05-05 2005-11-10 Chanson Lin Method for determining transmitting mode of a memory card with multiple interface functions

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669894A (en) * 2018-12-21 2019-04-23 天津国芯科技有限公司 A kind of universal asynchronous receiving-transmitting device reducing chip package pin
CN113383326A (en) * 2019-05-17 2021-09-10 华为技术有限公司 Integrated circuit with interface multiplexing function and pin switching method
CN114564426A (en) * 2020-11-27 2022-05-31 中国科学院声学研究所 Embedded multi-interface data conversion device
CN114564426B (en) * 2020-11-27 2024-05-14 中国科学院声学研究所 Embedded multi-interface data conversion device

Also Published As

Publication number Publication date
CN1873604A (en) 2006-12-06
CN100346285C (en) 2007-10-31

Similar Documents

Publication Publication Date Title
WO2007079660A1 (en) Processor chip and memory controlling system and method thereof
KR970000842B1 (en) System direct memory access(dma)support logic for pci based computer system
US7200692B2 (en) PVDM (packet voice data module) generic bus
US7769934B1 (en) Master and slave side arbitrators associated with programmable chip system components
JP2552085B2 (en) System and method for multiple bus arbitration logic
US6772237B2 (en) Host controller interface descriptor fetching unit
US6157970A (en) Direct memory access system using time-multiplexing for transferring address, data, and control and a separate control line for serially transmitting encoded DMA channel number
JP2002300229A (en) Device and method for controlling usb communication and usb communication system
JP2006522414A (en) Virtual Peripheral Component Interconnect Multifunction Device
WO2023143504A1 (en) Computing system, pci device manager, and initialization method therefor
US6567881B1 (en) Method and apparatus for bridging a digital signal processor to a PCI bus
EP3716084A1 (en) Apparatus and method for sharing a flash device among multiple masters of a computing platform
JP2539058B2 (en) Data processor
US5566345A (en) SCSI bus capacity expansion controller using gating circuits to arbitrate DMA requests from a plurality of disk drives
JPH05197647A (en) Input/output device and method of data transfer
KR20180116717A (en) Electronic system having serial system bus interface and direct memory access controller and method of operating the same
TWI416418B (en) Controllers, apparatuses, and methods for transferring data
US6519670B1 (en) Method and system for optimizing a host bus that directly interfaces to a 16-bit PCMCIA host bus adapter
US8756356B2 (en) Pipe arbitration using an arbitration circuit to select a control circuit among a plurality of control circuits and by updating state information with a data transfer of a predetermined size
JP4011258B2 (en) Arbitration method of bus having interrupt function between control chip sets
US20030084223A1 (en) Bus to system memory delayed read processing
US9280298B2 (en) Storage device and storage system
JP2004503871A (en) Direct memory access controller and method
JPS581454B2 (en) Input/output control method
CA2282166C (en) Method and apparatus for bridging a digital signal processor to a pci bus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06840755

Country of ref document: EP

Kind code of ref document: A1