CN107315699B - TF card - Google Patents

TF card Download PDF

Info

Publication number
CN107315699B
CN107315699B CN201710437665.2A CN201710437665A CN107315699B CN 107315699 B CN107315699 B CN 107315699B CN 201710437665 A CN201710437665 A CN 201710437665A CN 107315699 B CN107315699 B CN 107315699B
Authority
CN
China
Prior art keywords
command
card
extended function
state
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710437665.2A
Other languages
Chinese (zh)
Other versions
CN107315699A (en
Inventor
王彤
王陆
俞伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ramaxel Technology Shenzhen Co Ltd
Original Assignee
Ramaxel Technology Shenzhen 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 Ramaxel Technology Shenzhen Co Ltd filed Critical Ramaxel Technology Shenzhen Co Ltd
Priority to CN201710437665.2A priority Critical patent/CN107315699B/en
Publication of CN107315699A publication Critical patent/CN107315699A/en
Application granted granted Critical
Publication of CN107315699B publication Critical patent/CN107315699B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a TF card, which is characterized in that at least one part of address space is divided in the logic address space of the TF card to be used as an extended function command, and the extended function command accesses the TF card according to the format of a normal read-write command; a remapping module is added in the TF card and used for analyzing whether the normal read-write command is an extended function command or not, and if so, the TF card is triggered to execute an operation command according to a preset extended function command; if not access to the TF card data space is required according to the command. By adding the Mapping module and the two data channels, not only are various functions specified in the original protocol compatible, but also the security of data access is improved, and the convenience of adding new functions is increased.

Description

TF card
Technical Field
The invention relates to the field of storage equipment, in particular to a TF card.
Background
The current TF card Host uses the LBA to access the data of the TF card, and the LBA is increased linearly in one dimension; such an access method has several problems as follows: 1. the LBA is 32bit and the data unit corresponding to the LBA is 512bytes, which means that Host can access 2T data at maximum, but there is no TF Card with such large capacity in practical application, so that a considerable part of the LBA is invalid, and when Host tries to access the LBA, the Card returns an error; 2. it is expected that the data on the Card will be the same, i.e. the same LBA read and write must be the same data, which makes it simple to steal the data on the BUS.
Meanwhile, when the TF card needs to expand functions, a command is often required to be added; however, since the Command has a limited length, the number of commands has an upper limit, and thus, the complexity of firmware increases only by adding commands to different clients, and it is not easy to rapidly develop and manage firmware versions.
Disclosure of Invention
Aiming at the defects, the invention aims to conveniently realize the extended function command of the TF card with the extended standard.
The invention provides a TF card for solving the problems, which is characterized in that at least one part of address space is divided in the logic address space of the TF card to be used as an extended function command, and the extended function command accesses the TF card according to the format of a normal read-write command; a remapping module is added in the TF card and used for analyzing whether the normal read-write command is an extended function command or not, and if so, the TF card is triggered to execute an operation command according to a preset extended function command; if not access to the TF card data space is required according to the command.
The TF card is characterized in that the remapping module at least comprises a policy table stored by a nonvolatile memory, the policy table is configured online or stored in advance through a host, and the policy table at least comprises information of an extended function command.
The TF card is characterized in that the remapping module analyzes whether the normal read-write command is an extended function command or not through an analysis state machine, and specifically comprises the following steps: and searching and matching the logic address information of the transmitted normal read-write command in the policy table through the analysis state machine, identifying a corresponding extended Function command if the logic address information of the transmitted normal read-write command is matched with the logic address information of the transmitted normal read-write command, and transmitting the extended Function command to the Function processing module Function of the TF card.
The TF card is characterized in that a Controller of the TF card receives an instruction of a host, directly issues a functional command which accords with a standard protocol of the TF card in the instruction to a functional processing module Function, and issues the instruction which possibly contains an extended functional command to a remapping module Mapping.
The TF card is characterized in that the Controller is realized by software or hardware; parameter passing is performed through a register group or FIFO when being realized through hardware.
The TF card is characterized in that the parsing state machine at least comprises: idle state Idle, Dispatch state Dispatch, Switch state Switch, configuration state Configure, and Process state Process.
The TF card, wherein the policy table at least includes: command index Command, Start logical address Start LBA, End logical address End LBA, extended function Command indexes Functions, and toggle Command Switch Command.
The invention not only is compatible with each function specified in the original protocol, but also improves the safety of data access and increases the convenience of adding new functions by adding the Mapping module and two data channels.
Drawings
FIG. 1 is a schematic diagram of the internal components and data path of a TF card;
FIG. 2 is a schematic diagram of the Mapping module;
FIG. 3 is a schematic diagram of the components of a resolution state machine.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of internal components and data paths of a TF card, in which a Controller: processing related tasks of the external bus protocol of the TF card, and responding to a Host to send a command; receiving and transmitting Host request information; translating the Host command; and transmitting and receiving data through the SD Bus. Function: the method is used for realizing the functions defined in the protocol and the user requirements, and comprises function commands and extended function commands which accord with the TF card standard. Newly added Mapping: and mapping between the Command + LBA and user data space, system space, user-defined function and user requirements is realized. NandFlash: for storing user data. Systemespace: and the system inner space is used for storing system related data.
The TF card comprises 5 data paths: channel 1, Channel 2, Channel 3, Channel 4 and Channel 5. Wherein: channel 1: controller translated commands and data channels. This channel is compatible with the LBA base usage defined in the standard TF card protocol (also known as the SD protocol). Channel 2: the Controller translates the command and data channel, which is the command data channel defined in the protocol for reading and writing non-user data. Channel 3: after Mapping, a command data channel processed by the Function module is required to be handed over. Channel 4: and accessing a command data channel of NandFlash after Mapping. Channel 5: the Function module needs to access the command data channel of the SystemSpace.
FIG. 2 is a schematic diagram of the Mapping module; FIG. 3 is a schematic diagram of the components of a resolution state machine.
The Command and logical address Command index Command and LBA are Command information and related LBA information after the Controller receives and parses the host Command. The Command Index Command Index does not exceed the specified range of the SD protocol, but can define the function by itself under the condition of good agreement; LBA ranges are as defined by the SD protocol. This module can be implemented using software or hardware: for a hardware implementation, a register can be used for data transfer, and a FIFO can also be used for data transfer.
Strategy Table policy Table: wherein, at least one Default strategy Default string strategy is stored for configuring the strategy table of the user; and when the corresponding table entry cannot be found in the policy table, processing according to the SD protocol. This table should be implemented using a non-volatile storage medium, such as norflash, nandflash, tcam (ternary content addressable memory), etc. The policy table includes, but is not limited to, the following: command index Command, Start LBA, End LBA, extended function Command indexes Functions, and Switch Command.
The Core-Logic analysis module is a module of the Mapping module. The module is used for analyzing the relation between the Command indexes Command and LBA and Strategy Table, and outputting the extended function Command indexes Functions and data and the Operation and data information for processing and interacting with Nand Flash. This module needs to implement but is not limited to the following functions: the system comprises a parsing state machine, a policy table index logic and a policy arbitration logic.
The resolution state machine entity includes, but is not limited to, an Idle state Idle, a Dispatch state Dispatch, a Switch state Switch, a configuration state Configure, and a Process state Process.
Idle state Idle:
entry conditions were as follows: the TF card is powered on and,
internal operation: polling the module for transferring the Command index Command and LBA parsed by the Controller,
and (3) exit conditions: obtaining Command index Command and LBA analyzed by a Controller, and entering a scheduling state Dispatch;
dispatch status Dispatch:
entry conditions were as follows: idle state and Command index Command and LBA information,
internal operation: invoking policy table index logic to search relevant policy table entries, invoking policy arbitration logic to select to use the policy table entries,
and (3) exit conditions: entering a configuration state configuration without table matching, or entering a switching state Switch if the matched table needs to be switched in function, or entering a processing state Process if the matched table does not need to be switched in function;
switching state Switch:
entry conditions were as follows: dispatch status and extended function command index Functions numbers,
internal operation: configuring the relevant soft and hard modules according to the Functions number and the command carrying data,
and (3) exit conditions: receiving a Command index Command defined in a strategy table entry;
process status Process:
entry conditions were as follows: the matching table entries do not require a function switch,
internal operation: according to the command carrying data and the corresponding table item description function, the relevant operation is carried out,
and (3) exit conditions: the operation is complete. The policy table indexing logic implements, according to the difference of the policy table storage medium, the following modes including but not limited to:
1. if the policy table storage medium is NorFlash or NandFlash, the contents of the table entry need to be partially or completely copied into the memory, and then the search and the search are carried out by using a software mode or a hardware mode.
2. The storage medium of the policy table is TCAM, and the TCAM can carry out content matching search without developing a software algorithm.
Implementation of policy arbitration logic includes, but is not limited to, the following:
1. a first lookup match is used. The arbitration logic always uses the table entry obtained by the first search to perform corresponding processing.
2. The latest configuration table entry is used. The arbitration logic always uses the newly configured entry for corresponding processing.
3. The history table entry is used. The arbitration logic needs to record the past arbitration result once or many times, and compare the search results, and select the past commonly used performance to perform corresponding processing.
Functions and data: and if the result after the Core-Logic analysis shows that a Function module is required to carry out the residual processing, the Core-Logic organizes the Functions and the data information and sends the Functions and the data information to the Function module.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. A TF card is characterized in that at least one part of address space is divided in the logic address space of the TF card to be used as an extended function command, and the extended function command accesses the TF card according to the format of a normal read-write command; a remapping module is added in the TF card and used for analyzing whether the normal read-write command is an extended function command or not, and if so, the TF card is triggered to execute an operation command according to a preset extended function command; if not, accessing the TF card data space according to the command requirement; the remapping module at least comprises a policy table stored by a nonvolatile memory, the policy table is configured on line or stored in advance by a host, and the policy table at least comprises information of an extended function command; the remapping module analyzes whether the normal read-write command is an extended function command through an analysis state machine, and specifically comprises the following steps: and searching and matching the logic address information of the transmitted normal read-write command in the policy table through the analysis state machine, identifying a corresponding extended Function command if the logic address information of the transmitted normal read-write command is matched with the logic address information of the transmitted normal read-write command, and transmitting the extended Function command to the Function processing module Function of the TF card.
2. The TF card of claim 1, wherein the Controller of the TF card receives the commands from the host, directly issues the functional commands meeting the standard protocol of the TF card to the functional processing module Function, and issues the commands containing the extended functional commands to the remapping module Mapping.
3. The TF card of claim 2, wherein the Controller is implemented by software or by hardware; parameter passing is performed through a register group or FIFO when being realized through hardware.
4. TF card according to any of the claims 1 to 3, characterized in that said resolution state machine comprises at least: idle state Idle, Dispatch state Dispatch, Switch state Switch, configuration state Configure, and Process state Process.
5. The TF card of claim 4 wherein the policy table includes at least: command index Command, Start logical address Start LBA, End logical address End LBA, extended function Command indexes Functions, and toggle Command Switch Command.
6. The TF card of claim 5 wherein the states of the parsing state machine are specifically defined as follows:
idle state Idle:
entry conditions were as follows: the TF card is powered on and,
internal operation: a module for polling the Command index Command and the logical address LBA resolved by the transfer Controller,
and (3) exit conditions: obtaining a Command index Command and a logic address LBA analyzed by a Controller, and entering a Dispatch state;
dispatch status Dispatch:
entry conditions were as follows: idle state and Command index Command and logical address LBA information,
internal operation: invoking policy table index logic to search relevant policy table entries, invoking policy arbitration logic to select to use the policy table entries,
and (3) exit conditions: entering a configuration state configuration without table matching, or entering a switching state Switch if the matched table needs to be switched in function, or entering a processing state Process if the matched table does not need to be switched in function;
switching state Switch:
entry conditions were as follows: dispatch status and extended function command index Functions numbers,
internal operation: configuring the related soft and hard modules according to the extended function command index Functions number and the command carrying data,
and (3) exit conditions: receiving a Command index Command defined in a strategy table entry;
process status Process:
entry conditions were as follows: the matching table entries do not require a function switch,
internal operation: according to the command carrying data and the corresponding table item description function, the relevant operation is carried out,
and (3) exit conditions: the operation is complete.
CN201710437665.2A 2017-06-12 2017-06-12 TF card Expired - Fee Related CN107315699B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710437665.2A CN107315699B (en) 2017-06-12 2017-06-12 TF card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710437665.2A CN107315699B (en) 2017-06-12 2017-06-12 TF card

Publications (2)

Publication Number Publication Date
CN107315699A CN107315699A (en) 2017-11-03
CN107315699B true CN107315699B (en) 2021-04-23

Family

ID=60182220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710437665.2A Expired - Fee Related CN107315699B (en) 2017-06-12 2017-06-12 TF card

Country Status (1)

Country Link
CN (1) CN107315699B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7644191B2 (en) * 2004-11-12 2010-01-05 Emulex Design & Manufacturing Corporation Legacy-compatible extended command input-output control block
US8078788B2 (en) * 2005-12-08 2011-12-13 Sandisk Technologies Inc. Media card command pass through methods
US20070136501A1 (en) * 2005-12-08 2007-06-14 Chang Robert C Media card command pass through methods
CN101882058A (en) * 2010-05-26 2010-11-10 孟智平 Method for virtually dividing storage device into a plurality of devices
CN102207912B (en) * 2010-07-07 2015-10-07 无锡中科龙泽信息科技有限公司 Flash memory device and the access method thereof of sectoring function is realized in equipment end
CN104951412B (en) * 2015-06-06 2018-01-02 华为技术有限公司 A kind of storage device accessed by rambus
CN205302306U (en) * 2015-12-31 2016-06-08 北京兆易创新科技股份有限公司 Embedded system

Also Published As

Publication number Publication date
CN107315699A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
KR101529811B1 (en) Systems and methods for managing endian mode of a device
RU2445676C2 (en) Method of communication with multifunctional memory card
EP3370155A1 (en) Storage data access method, related controller, device, host, and system
KR100533682B1 (en) Data managing device and method for flash memory
WO2008075361A2 (en) Apparatus, method and computer readable medium for disambiguating commands with respect to logical protocols
US20190286817A1 (en) Method and Apparatus For Vetting Universal Serial Bus Device Firmware
US10552068B2 (en) Access method and device for random access memories, control chip and storage medium
CN107622207B (en) Encrypted system-level data structure
US20090240885A1 (en) Memory card complying with a plurality of standards
CN111708288B (en) Data processing method and device, electronic equipment and storage medium
CN107315699B (en) TF card
CN117608856A (en) Memory expansion method, system, terminal and storage medium for NVMe (network video Me) acceleration card
CN110737678B (en) Data searching method, device, equipment and storage medium
EP4242819A1 (en) System and method for efficiently obtaining information stored in an address space
CN112965760A (en) Method and device for modifying root directory, electronic equipment and readable storage medium
US7287098B2 (en) Control method and electronic device enabling recognition of functions installed in the electronic device
CN107357853B (en) Method and device for operating REDIS console and computer system
CN108920092B (en) Data operation method and device of memory data and electronic equipment
CN115495406A (en) Message transmission method, device, equipment and storage medium based on PCIe
CN112291212B (en) Static rule management method and device, electronic equipment and storage medium
US10331381B2 (en) Method and device for recording memory access operation information
CN111176726A (en) Configurable command cancellation method and device thereof
CN110737396A (en) Method, apparatus and computer program product for data replication
CN117896182B (en) Linux network communication security management and control method, device and storage medium
US20090113154A1 (en) Non-Volatile Memory Apparatus and Method of Accessing the Same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210423

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