The preset invention relates to apparatus for reading/writing storage devices, more particularly relates to apparatus without built-in MCU (microprocessor control unit) for reading/writing storage devices.
Most of traditional memory card I/O (Input/Output) devices for example, the card reader are incorporated with a built-in MCU (microprocessor control unit) for processing the memory card instructions from PCs (personal computers.) Referring to
The MCU has basic microinstructions, and the driver of the traditional memory card I/O device calls the microinstructions in order to handle the communications between the PCs and the memory cards. Main function of the MCU is an interpreter for the USB instructions and the memory card instructions, and the MCU also provides functions for the memory card without built-in MCU (such as a smart media card, an eXtreme Digital card and a memory stick card) to build up a PTL (physical to logical translation table) table and support lager capacities.
Generally, the MCU includes an EEPROM (Electrically Erasable & Programmable ROM) for storing the microinstructions. Typically, the users have to upgrade the firmware in order to recover certain problem when the capability of memory card fails to meet the requirement. In order to upgrade the firmware, the users have to connect their memory card I/O devices to the PC by USB connector. However, the failure risk of the updating process is extremely high. On the other hands, the manufacturers usually suggest the customs not to do so, and the solution of the problem becomes highly difficult.
In accordance with aforementioned situations, the cost of the traditional solution for the memory card I/O devices is too high and the flexibility of the traditional memory card I/O device is also not enough. What is required is a novel scheme to solve the problem.
Above-mentioned theological arts are well know to those skilled in the art, and the cost of the memory card I/O device is too high, the flexibility is relatively too low. One purpose of the present invention is to reduce the cost of the memory card I/O device by providing an apparatus without MCU (microprocessor control unit) for reading/writing storage devices.
Another purpose of the present invention is to increase the flexibility of the memory card I/O device in ways of providing an apparatus, whose capacity and supportability can be modified by updating relative driver, for reading/writing storage devices.
Based on foregoing purposes, the present invention discloses an apparatus for reading/writing memory cards. The apparatus includes a transfer interface, a finite state machine, a control register and a memory card control interface. The transfer interface outputs detailed commands and data received from a host, and receives the data and status signals of a memory card; the control register temporarily stores and outputs the detailed commands, the data of the memory card and the status signals of the memory card; the finite state machine receives the detailed commands, and outputs processing steps based on the detailed commands and the status signals of the memory card; the memory card control interface receives the processing steps and delivers memory card control commands based on the processing steps, furthermore, the memory card control interface also sends the status signals of the memory card based on a status of the memory card, transfers the data to the memory card, and receives the data of the memory card from the memory card and transfers the data of the memory card to the control register simultaneously.
The present invention also discloses an apparatus for reading/writing storage elements. The aforementioned apparatus includes a transfer interface, a hardwired circuit and a storage element control device. The transfer interface transfers detailed commands and data; and the hardwired circuit that is coupled to the transfer interface, transfers the data and outputs processing steps based on the detailed commands; and the storage device control device that is coupled to the hardwired circuit, transfers storage device commands to a storage device in accordance with the processing steps.
The present invention further discloses a hardwired circuit for apparatus of reading/writing storage devices, includes a control register for temporarily storing detailed commands and data; and a finite state machine for receiving the detailed commands, and outputting processing steps based on the detailed commands; wherein the detailed commands are compiled from SCSI instructions by a driver of a host.
The present invention is described with preferred embodiments and accompanying drawings. It should be appreciated that all the embodiments are merely used for illustration. Although the present invention has been described in term of a preferred embodiment, the invention is not limited to this embodiment. It will be understood, however, to one skilled in the art, that the present invention may be practiced without some or all of these specific details. In other instances, well known process operations have not been described in detail in order not to unnecessary obscure the present invention.
The essence of the present invention is to replace the built-in MCU (microprocessor control unit) inside traditional memory card I/O devices by software and a hardwired circuit. The tasks which previously were processed by the MCU, like supporting the memory capacity and building up the PTL (physical to logical translation table) table, will be taken by the software. At the meantime, the SCSI (Small Computer System Interface) instructions, which are sent from the OS (operation system) to the memory card I/O device, will also be processed by the software, and the software will further compile the SCSI into detailed commands. Subsequently, the hardwired circuit will process the detailed commands, and translate the detailed commands into memory commands. In this manner, whole functions of the MCU are fully replaced by the hardwired circuit and the software, thereby extremely reducing the cost of the memory card reading/writing devices by omitting the MCU from the memory card I/O devices. Furthermore, the problems of upgrading the firmware in the traditional memory card I/O devices can be simply solved by updating the driver software in the present invention.
Referring to
The hardwired circuit 140 further includes a control register 135 and a finite state machine 145. The control register 135 temporarily stores the detailed commands and the data from the transfer interface 130, and separately sends the detailed commands to the finite state machine 145 and the data to the storage element control device 150. After receiving the detailed commands, the finite state machine 145 outputs processing steps based on the detailed commands to the storage element control device 150. The storage element control device 150 receives the processing steps and subsequently deliveries the storage element commands based on the received processing steps to the storage element 160, and also sends status signals of the storage element, which are based on the status of the storage element 160, to the finite state machine 145, thereby allowing the finite state machine 145 can arrange the processing steps in accordance with the status of the storage element 160.
Referring to
Above-mentioned detailed commands are compiled from SCSI instructions by a driver of the host 110 or 210. The detailed commands include Read, Write, Erase, Copy, Scan Extra Area, Reset Card, Format Card and the combinations thereof. The foregoing data includes writing data from the host 110 or 210 to the storage device 160 or 250, reading data from the storage device 160 or 250 to the host 110 or 210.
The antecedent transfer interface 130 can be a FIFO interface, however, the transfer interface 130 or 224 also can be USB (Universal Serial Bus) interface or IEEE1394 (FireWire) interface. It means that the storage element reading/writing device 100 or 200 is coupled to the host 110 or 210 through the USB port or the IEEE1394 port. The storage elements of the present invention include following two different types; one is a flash memory card with built-in MCU, another is a flash memory card without built-in MCU. The flash memory card with built-in MCU includes a compact flash card, a micro drive, a secure digital card, a memory stick pro card and a multimedia card; and the flash memory card without built-in MCU further includes a smart media card, an eXtreme Digital card and a memory stick card. Furthermore, the storage elements also include the storage elements with built-in MCU, for example a compact flash card, a micro drive, a secure digital card, a memory stick pro card and a multimedia card; and the storage elements without built-in MCU, for example a smart media card, an eXtreme Digital card and a memory stick card. With regard to other embodiment, the storage elements even include a smart card (IC card.)
Moreover, the storage element reading/writing device 100 or 200 in present invention can even have plural slots which are coupled to storage element control interface 150 or 240. The plural slots include a smart card slot, a compact flash card slot, a micro drive slot, a secure digital card slot, a memory stick pro card slot, a multimedia card slot, a smart media card slot, an eXtreme Digital card slot, a memory stick card slot and the combinations thereof.
In terms of former illustration, the storage element reading/writing device of the present invention may omit the built-in MCU, so as to significantly reduce the cost of making the storage element reading/writing device. In addition, by the practice of updating the driver, the present invention can be better than the conventional manner of upgrading the firmware, and not only reduces the risk of failure upgrading firmware but also improves the flexibility of the storage element reading/writing device structure. The conventional storage element reading/writing devices usually have compatibility troubles of the storage elements by various vendors, yet the compatibilities of the storage elements in the present invention can easily be enhanced by adjusting the timing of the relative driver.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention. The word “comprising” and forms of the word “comprising” as used in the description and in the claims are not meant to exclude variants or additions to the invention. Furthermore, certain terminology has been used for the purposes of descriptive clarity, and not to limit the present invention. The embodiments and preferred features described above should be considered exemplary, with the invention being defined by the appended claims.