CN1959659A - Method for realizing dedicated commands for storage devices, and storage device - Google Patents

Method for realizing dedicated commands for storage devices, and storage device Download PDF

Info

Publication number
CN1959659A
CN1959659A CN 200610152311 CN200610152311A CN1959659A CN 1959659 A CN1959659 A CN 1959659A CN 200610152311 CN200610152311 CN 200610152311 CN 200610152311 A CN200610152311 A CN 200610152311A CN 1959659 A CN1959659 A CN 1959659A
Authority
CN
China
Prior art keywords
memory device
logical address
specific command
command
operational order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200610152311
Other languages
Chinese (zh)
Inventor
阮玉园
杨天文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HEXINGJIANGYUAN TECH DEVELOPMENT Co Ltd CHONGQING
Original Assignee
HEXINGJIANGYUAN TECH DEVELOPMENT Co Ltd CHONGQING
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 HEXINGJIANGYUAN TECH DEVELOPMENT Co Ltd CHONGQING filed Critical HEXINGJIANGYUAN TECH DEVELOPMENT Co Ltd CHONGQING
Priority to CN 200610152311 priority Critical patent/CN1959659A/en
Publication of CN1959659A publication Critical patent/CN1959659A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

A method for realizing special command of storage device includes expanding logic address of storage device, setting each expanded logic address to be corresponded to a special command, receiving operation command by storage device and analyzing logic address in command then judging whether analyzed logic address is in scope of expanded logic address or not and executing special command corresponding to analyzed logic address if it is. The storage device used for realizing said method is also disclosed.

Description

Realize the method and the memory device of dedicated commands for storage devices
Technical field
The present invention relates to technical field of memory, relate in particular to a kind of method and memory device of realizing dedicated commands for storage devices.
Background technology
Memory device is generally all supported the interface protocol of standard, IDE (Integrated DriveElectronics for example, ide)/ATA (Advanced Technology Attachment, the advanced techniques attachment device), SCSI (Small Computer System Interface, small computer system interface), USB (Universal Serial Bus, USB (universal serial bus)) agreement such as, the operating system of main frame (host computer) is also all supported these standard agreements usually.The generic command that defines in standard agreement, the manufacturer of memory device has also defined the specific command (Vendor Unique Command is hereinafter to be referred as specific command) of oneself.Can realize specific function beyond the standard agreement by these specific commands, for the designing and developing of product, test and performance maintenance etc. are provided convenience.But because these specific commands do not belong to the interface protocol of standard, and the specific command of different manufacturers definition is generally all different, so operating system is not generally supported these specific commands.
Make main frame can support these specific commands to finish specific function, the designer must write driver or write software under the DOS pattern, comes operation port to distribute specific command to memory device.For different operating system, the designer need write different drivers.And, when memory device is connected with main frame by adapter, for example, using the adapter of band USB bridging chip, the developer must obtain the support of adapter manufacturer, gets command sequence by USB and comes to send specific command to memory device.As seen, realize the specific command of memory device, need do many extra works, increase the complexity of memory device performance history, prolong the construction cycle.
Summary of the invention
The invention discloses a kind of method and memory device of realizing dedicated commands for storage devices, on the basis of not writing or change driver, just can realize the specific command of main frame support memory device.
For this reason, the present invention adopts following technical scheme:
A kind of method that realizes dedicated commands for storage devices comprises step:
The logical address of expanding storage apparatus, wherein, the logical address that each expansion is set is corresponding with a specific command;
Memory device receives operational order, resolves logical address wherein, and judges the logical address of resolving whether in the ranges of logical addresses of expansion, if carry out the specific command of the logical address correspondence of resolving.
Described method also comprises:
If the logical address of resolving in effective ranges of logical addresses, is carried out the generic command of memory device.
Before memory device received operational order, described method also comprised:
Host computer invokes is the read of parameter with the logical address of memory device;
The operating system of main frame is according to the read call driver;
Driver is handed down to memory device by interface with operational order.
Described method also comprises:
Under the situation in the ranges of logical addresses that the logical address of resolving neither in effective ranges of logical addresses, is not also being expanded, memory device returns error message to main frame.
Described memory device comprises: be the memory device of read write command parameter with the logical address.
Described is that the memory device of read write command parameter comprises with the logical address: the memory device that uses the ide interface.
The memory device of described use ide interface comprises: hard disk or CD.
A kind of memory device comprises operational order demoder, specific command demoder, specific command actuator and controller;
Described operational order demoder is used for receiving operational order under the control of controller, and parses the logical address that operational order comprises;
Described specific command demoder is used to store the logical address of expansion and the corresponding relation of specific command; And the logical address of the expansion that the operational order demoder is resolved is decoded, and obtains the specific command of logical address correspondence;
Described specific command actuator is used to carry out the specific command that the specific command demoder obtains;
Described controller, scope is judged under the logical address that is used for the operational order demoder is resolved, and according to judged result control specific command demoder and the work of specific command actuator.
Described memory device also comprises: the generic command actuator;
Described generic command actuator is used to carry out the generic command of memory device.
Described memory device comprises: be the memory device of read write command parameter with the logical address.
Described is that the memory device of read write command parameter comprises with the logical address: the memory device that uses the ide interface.
The memory device of described use ide interface comprises: hard disk or CD.
The present invention has realized the specific command of memory device by the logical address of expanding storage apparatus.As seen, the present invention reads and writes special logical address by directly calling the general read write command that host operating system provides, and realizes calling dedicated commands for storage devices.Adopt the present invention, do not need the developer to write or change driver, just can realize main frame, thereby simplified the development sequence of memory device, shortened the construction cycle, saved cost of development the calling of dedicated commands for storage devices.
And the present invention is general to various operating systems.Just, on the different operating system of main frame, can realize support to dedicated commands for storage devices.As seen, the present invention has improved the compatibility of dedicated commands for storage devices.
Description of drawings
Fig. 1 realizes the process flow diagram of dedicated commands for storage devices for the present invention;
Fig. 2 is a process flow diagram of realizing dedicated commands for storage devices in the embodiment of the invention;
Fig. 3 is the system architecture synoptic diagram of main frame among the present invention and memory device.
Embodiment
The present invention is mainly by to the expansion of memory device logical address, and with the logical address of the expansion parameter as operational order, realizes that main frame supports the specific command of memory device.
As shown in Figure 1, the present invention includes following steps:
Step 101: the logical address of expanding storage apparatus, wherein, the logical address that each expansion is set is corresponding with a specific command;
Step 102: memory device receives the host service function order, resolves logical address wherein;
Step 103: whether the logical address of judge resolving is in the ranges of logical addresses of expansion, if then carry out the specific command of the logical address correspondence of resolving.
Wherein, memory device comprises the device that is used to store of various existing or following appearance, comprises with the logical address being the memory device of read write command parameter, particularly uses the memory device of ide interface, such as, hard disk or CD etc.These memory devices all have an effective ranges of logical addresses.Among the present invention, effectively logical address is definition like this: memory device is according to the size of capacity, different ranges of logical addresses can be arranged, this scope is meant the logical address of starting from scratch to maximum, in this scope, read and write and allow, will read and write mistake in the outer read-write of this scope, this scope is exactly effective ranges of logical addresses.Effectively the physical address of storage unit is corresponding on logical address and the memory device.Main frame is read and write the logical address in this effective ranges of logical addresses, with regard to realizing the physical address corresponding on the storage media is read and write.When the logical address of read-write operation was not in this valid logical address scope, memory device returned error message usually.
The present invention is outside this effective ranges of logical addresses, and a self-defined special ranges of logical addresses is just expanded the logical address of memory device.In the ranges of logical addresses of expansion, as required, define the implication of each logical address correspondence voluntarily, just specific command.When main frame was read and write certain logical address in the ranges of logical addresses of expansion, memory device did not return error message, but calls predefined specific command, thereby realized main frame calling dedicated commands for storage devices.
When using certain specific command, only need know the logical address of this specific command correspondence, the file read-write function of the standard that provides by the operating system of calling main frame carries out read-write operation to this logical address then, just can realize calling of specific command.
Introduce one embodiment of the present of invention below in detail.
As shown in Figure 2, the present embodiment flow process comprises:
Step 201: the logical address of expanding storage apparatus;
As previously mentioned, the corresponding relation of logical address and specific command is set just, finishes expansion the memory device logical address.The logical address of expansion is greater than effective logical address.
Step 202: application call read, read are parameter with the logical address;
Application program on the main frame is responsible for the normative document read that the call operation system provides.
If want to call specific command, then when calling the normative document read, with the logical address of specific command correspondence parameter as function call.
Step 203: file system handles accordingly to read; And call driver;
After the function call, the file system in the operating system is handled accordingly to read, and according to read, the device driver that the call operation system provides.
Step 204: driver is handed down to memory device by interface with operational order;
Read obtains operation task and parameter through after the processing of file system.Device driver will be handed down to memory device by the operational order that operation task and parameter constitute by interface hardware.
Step 205: memory device is decoded to operational order, obtains logical address;
Memory device carries out decode operation by the operational order demoder of self to operational order, thus the parameter that comprises in the acquisition operational order, just logical address.
Step 206: the decision logic address whether in effective ranges of logical addresses, if, execution in step 207; Otherwise, execution in step 208;
For logical address, at first to judge it whether in effective ranges of logical addresses, if, then carry out the generic command of memory device, otherwise, judge that it is whether in the ranges of logical addresses of expansion.
Step 207: the generic command of carrying out memory device;
The data read-write operation of memory device executive's interface agreement specified standard is read and write storage media.
Step 208: the decision logic address whether in the ranges of logical addresses that step 201 is expanded, if, execution in step 209; Otherwise, execution in step 211;
Step 209: the logical address to expansion is decoded;
Wherein, the logical address of step 209 is meant the logical address of specific command correspondence, and just it drops in the scope of logical address of expansion.By logical address is carried out decode operation, obtain the pairing specific command of logical address.
If logical address neither in effective ranges of logical addresses, also not in the ranges of logical addresses of expansion, illustrates that then the logical address parameter that read is called made mistakes.
Step 210: the specific command of actuating logic address correspondence;
Step 211: return error message to main frame.
Wherein,, also can replace by following steps for step 206, step 207 and step 208: the decision logic address size, if logical address falls in the valid logical address scope, then carry out the generic command of memory device; If logical address falls in the expansion ranges of logical addresses, then execution in step 209 and step 210; If logical address neither in valid logical address also not the expansion logical address in, then execution in step 211.
The invention also discloses a kind of memory device, the system schematic that realizes specific command with this memory device as shown in Figure 3, system comprises main frame 301 and memory device 302.
Main frame 301 comprises application program 311 and operating system 312.Application program 311 is responsible for the normative document read that call operation systems 312 provide, when calling the normative document read, with logical address as function parameters, especially, with the logical address of specific command correspondence as parameter.File system in the operating system 312 is correspondingly processed to function, and the device driver according to function call operating system 312 provides will be handed down to memory device 302 by device driver by the operational order that read-write task and parameter constitute by interface hardware.
After memory device 302 is received operational order, carry out command decode by the operational order demoder, when logical address that decoding obtains was in effective ranges of logical addresses, the data read-write operation of executive's interface agreement specified standard was read and write storage media.When logical address that decoding obtains is not in effective ranges of logical addresses, memory device 302 does not return error message, but whether the decision logic address is in the logical address of expansion, if, then logical address is decoded by the specific command demoder, obtain the specific command of logical address correspondence, and carry out specific command by the specific command actuator; If not, then return error message.
As shown in Figure 3, memory device 302 comprises: operational order demoder 313, generic command actuator 314, specific command demoder 315, specific command actuator 316 and controller 317.
Operational order demoder 313 is used for, and the operational order decoding to memory device receives obtains logical address, and other command parameter.
Generic command actuator 314 is used for, and carries out the generic command of memory device.
Specific command demoder 315 is preserved the corresponding relation of expansion logical address and specific command in advance, and, 315 pairs of specific command demoders judge, have determined that through controller 317 logical address of expansion carries out decoded operation, obtain its corresponding specific command.Specific command actuator 316 is used for, and carries out the specific command that specific command demoder 315 obtains.
Controller 317 unifications are controlled operational order demoder 313, generic command actuator 314, specific command demoder 315 and specific command actuator 316.Mainly comprise, the logical address that operational order demoder 313 is resolved is done the scope judgement,, then indicate generic command actuator 314 to carry out generic commands if judged result shows logical address in effective logical address; If judged result shows logical address and in the ranges of logical addresses of expansion, then indicates the logical address of 315 pairs of expansions of specific command demoder to decode, and indication specific command actuator 316 is carried out specific command.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1, a kind of method that realizes dedicated commands for storage devices is characterized in that, described method comprises:
The logical address of expanding storage apparatus, wherein, the logical address that each expansion is set is corresponding with a specific command;
Memory device receives operational order, resolves logical address wherein, and judges the logical address of resolving whether in the ranges of logical addresses of expansion, if carry out the specific command of the logical address correspondence of resolving.
2, the method for realization dedicated commands for storage devices according to claim 1 is characterized in that, described method also comprises:
If the logical address of resolving in effective ranges of logical addresses, is carried out the generic command of memory device.
3, the method for realization dedicated commands for storage devices according to claim 1 and 2 is characterized in that, before memory device received operational order, described method also comprised:
Host computer invokes is the read of parameter with the logical address of memory device;
The operating system of main frame is according to the read call driver;
Driver is handed down to memory device by interface with operational order.
4, the method for realization dedicated commands for storage devices according to claim 1 and 2 is characterized in that, described method also comprises:
Under the situation in the ranges of logical addresses that the logical address of resolving neither in effective ranges of logical addresses, is not also being expanded, memory device returns error message to main frame.
5, the method for realization dedicated commands for storage devices according to claim 1 and 2 is characterized in that,
Described memory device comprises: be the memory device of read write command parameter with the logical address.
6, the method for realization dedicated commands for storage devices according to claim 5 is characterized in that, described is that the memory device of read write command parameter comprises with the logical address:
Use the memory device of ide interface.
7, the method for realization dedicated commands for storage devices according to claim 6 is characterized in that, the memory device of described use ide interface comprises:
Hard disk or CD.
8, a kind of memory device is characterized in that, described memory device comprises operational order demoder, specific command demoder, specific command actuator and controller;
Described operational order demoder is used for receiving operational order under the control of controller, and parses the logical address that operational order comprises;
Described specific command demoder is used to store the logical address of expansion and the corresponding relation of specific command; And the logical address of the expansion that the operational order demoder is resolved is decoded, and obtains the specific command of logical address correspondence;
Described specific command actuator is used to carry out the specific command that the specific command demoder obtains;
Described controller, scope is judged under the logical address that is used for the operational order demoder is resolved, and according to judged result control specific command demoder and the work of specific command actuator.
9, memory device according to claim 8 is characterized in that, described memory device also comprises: the generic command actuator;
Described generic command actuator is used to carry out the generic command of memory device.
10, according to Claim 8 or 9 described memory devices, it is characterized in that described memory device comprises: be the memory device of read write command parameter with the logical address.
11, memory device according to claim 10 is characterized in that, described is that the memory device of read write command parameter comprises with the logical address:
Use the memory device of ide interface.
12, memory device according to claim 11 is characterized in that, the memory device of described use ide interface comprises:
Hard disk or CD.
CN 200610152311 2006-09-21 2006-09-21 Method for realizing dedicated commands for storage devices, and storage device Pending CN1959659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610152311 CN1959659A (en) 2006-09-21 2006-09-21 Method for realizing dedicated commands for storage devices, and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610152311 CN1959659A (en) 2006-09-21 2006-09-21 Method for realizing dedicated commands for storage devices, and storage device

Publications (1)

Publication Number Publication Date
CN1959659A true CN1959659A (en) 2007-05-09

Family

ID=38071361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610152311 Pending CN1959659A (en) 2006-09-21 2006-09-21 Method for realizing dedicated commands for storage devices, and storage device

Country Status (1)

Country Link
CN (1) CN1959659A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377704A (en) * 2021-06-11 2021-09-10 上海壁仞智能科技有限公司 Artificial intelligence chip and data operation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377704A (en) * 2021-06-11 2021-09-10 上海壁仞智能科技有限公司 Artificial intelligence chip and data operation method
CN113377704B (en) * 2021-06-11 2022-04-12 上海壁仞智能科技有限公司 Artificial intelligence chip and data operation method

Similar Documents

Publication Publication Date Title
CN101030146A (en) Method and system for updating fastener
CN1920780A (en) Method and system for accessing critical region
CN101038551A (en) Method for implementing the start of Linux operation system in mobile hard disk
CN1848087A (en) Using usb memory device to recover operating system
CN1869915A (en) Memory card providing hardware acceleration for read operations
CN1294711A (en) Disk system and method of updating firmware
CN1831777A (en) System and method for managing multiple hot plug operations
US20070162679A1 (en) Bus device
CN1993676A (en) Method and apparatus for discovering hardware in a data processing system
CN1851635A (en) Method and system for read-write operation to cheap magnetic disk redundant array
CN1908910A (en) Method for data backup and recovery
CN100340983C (en) Method and device for on-line upgrading of programmable logic device
CN1763729A (en) The data processing equipment and the method that are used for flash memory
CN1855032A (en) Microprocessor systems, bus address translation methods and program repair method
CN1801092A (en) Embedded chip and its program space extension method
CN1882152A (en) Data configuration method for access network device
CN1845087A (en) Interrupt handling method and interrupt handling apparatus
CN1959659A (en) Method for realizing dedicated commands for storage devices, and storage device
CN1841329A (en) Method and apparatus for positioning target file
CN1178130C (en) Control method and electronic device thereof
CN1737767A (en) Debug supporting unit and method with abeyant execution ability on chip electronic hardware
CN1294494C (en) System for detecting master USB interface transfer rate and method thereof
CN1975699A (en) Serial peripheral interface control device, system and determining method thereof
CN1862502A (en) Method and system for implementing data back-up between main-standby nodes
CN1687910A (en) Interrupt recovering method and apparatus under continuous access environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
C20 Patent right or utility model deemed to be abandoned or is abandoned