# US 12,223,199 B2 · Method and apparatus for programming data arranged to undergo specific stages into flash memory based on virtual carriers

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,223,199 B2
- Document ID: US12223199B2
- Status: Granted
- Kind: B2
- Application number: 17/879,232
- Filed: 2022-08-02
- Published: 2023-03-30
- Granted: 2025-02-11
- Earliest claimed: 2021-09-29
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Shen-Ting Chiu
- Web page: https://patentgrep.com/patent/US12223199B2

## CPC

- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0623: {in relation to content}
- G06F 3/0658: {Controller construction arrangements}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0689: {Disk arrays, e.g. RAID, JBOD}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The invention relates to a method, and an apparatus for programming data into flash memory. The method includes: reading operating settings of a virtual carrier; setting a redundant array of independent disks (RAID) engine for driving the RAID engine to complete a designated encryption or encoding operation on first data associated with the virtual carrier when the operation settings indicate that the first data associated with the virtual carrier need to go through a mid-end processing stage; and sending a programming index to a data access engine for driving the data access engine to read a programming table from the SRAM, and program the second data associated with the virtual carrier into a designated address in a flash module when the operation settings indicate that the second data associated with the virtual carrier need to go through the back-end processing stage.

## Claims

### Claim 1

A method for programming data into flash memory, performed by a controller of an accelerator, comprising:
reading operating settings of a virtual carrier from a static random access memory (SRAM), wherein the accelerator comprises the SRAM;
detecting a first operation setting indicating that first data associated with the virtual carrier need to go through a mid-end processing stage, and setting a redundant array of independent disks (RAID) engine according to a mid-end parameter set stored in the SRAM for driving the RAID engine to complete a designated encryption or encoding operation on the first data associated with the virtual carrier; and
detecting a second operation setting indicating that the first data associated with the virtual carrier have gone through the mid-end processing stage and second data associated with the virtual carrier need to go through a back-end processing stage, and sending a programming index to a data access engine according to a back-end parameter set stored in the SRAM for driving the data access engine to read a programming table from the SRAM according to the programming index, and program the second data associated with the virtual carrier into a designated address in a flash module according to content of the programming table.

### Claim 2 (depends on 1)

The method of claim 1, wherein a processing unit generates the operation settings, and does not directly drive the RAID engine and the data access engine during a data programming process.

### Claim 3 (depends on 1)

The method of claim 1, wherein the mid-end parameter set comprises a first address allocated for storing the first data associated with the virtual carrier in a random access memory (RAM), a second address allocated for storing an encrypted or encoded result in the RAM, and a parameter used to set the RAID engine; the RAM is disposed outside of the accelerator.

### Claim 4 (depends on 1)

The method of claim 1, wherein the programming table comprises an address allocated for storing the second data associated with the virtual carrier in a random access memory (RAM), a series of flash commands and their programming parameters; the RAM is disposed outside of the accelerator.

### Claim 5 (depends on 1)

The method of claim 1, comprising:
sending a poll to the RAID engine regularly after setting the RAID engine until a status indicates that the mid-end processing stage has completed, which is replied by the RAID engine.

### Claim 6 (depends on 1)

The method of claim 1, comprising:
obtaining first cargo flags associated with the virtual carrier from a routing engine;
reading second cargo flags associated with the virtual carrier from the SRAM;
generating third cargo flags according to the first cargo flags and the second cargo flags; and
determining whether the operation settings indicate that the first data associated with the virtual carrier need to go through the mid-end processing stage after determining that data associated with all cargos in the virtual carrier have completed a front-end processing stage or do not need to go through the front-end processing stage according to information carried in the third cargo flags.

### Claim 7 (depends on 6)

The method of claim 6, wherein the third cargo flags are a result of a logical OR operation on the first cargo flags and the second cargo flags, and all bits of the third cargo flags are “1”.

### Claim 8 (depends on 6)

The method of claim 6, wherein the first data associated with the virtual carrier is obtained from the host side through a host interface (I/F) in the front-end processing stage.

### Claim 9 (depends on 8)

The method of claim 8, wherein the accelerator interacts with the RAID engine to obtain an encrypted or encoded result from the RAID engine according to the first data associated with the virtual carrier in the mid-end processing stage.

### Claim 10 (depends on 8)

The method of claim 8, wherein the accelerator interacts with the data access engine to program the second data associated with the virtual carrier into a designated address in a flash module in the back-end processing stage.

### Claim 11

An apparatus for programming data into flash memory, comprising:
a static random access memory (SRAM), arranged operably to: store operating settings of a virtual carrier;
a controller, coupled to the SRAM, arranged operably to: read the operating settings of the virtual carrier from the SRAM; set a redundant array of independent disks (RAID) engine according to a mid-end parameter set stored in the SRAM for driving the RAID engine to complete a designated encryption or encoding operation on first data associated with the virtual carrier when the operation settings indicate that the first data associated with the virtual carrier need to go through a mid-end processing stage; determine whether second data associated with the virtual carrier need to go through a back-end processing stage according to the operation settings when the operation settings indicate that the first data associated with the virtual carrier do not need to go through the mid-end processing stage, or the first data associated with the virtual carrier have gone through the mid-end processing stage; and send a programming index to a data access engine according to a back-end parameter set stored in the SRAM for driving the data access engine to read a programming table from the SRAM according to the programming index, and program the second data associated with the virtual carrier into a designated address in a flash module according to content of the programming table when the operation settings indicate that the second data associated with the virtual carrier need to go through the back-end processing stage.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein a processing unit generates the operation settings, and does not directly drive the RAID engine and the data access engine during a data programming process.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein the mid-end parameter set comprises a first address allocated for storing the first data associated with the virtual carrier in a random access memory (RAM), a second address allocated for storing an encrypted or encoded result in the RAM, and a parameter used to set the RAID engine; the RAM is disposed outside of the accelerator.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the programming table comprises an address allocated for storing the second data associated with the virtual carrier in a random access memory (RAM), a series of flash commands and their programming parameters; the RAM is disposed outside of the accelerator.

### Claim 15 (depends on 11)

The apparatus of claim 11, wherein the controller is arranged operably to: send a poll to the RAID engine regularly after setting the RAID engine until a status indicates that the mid-end processing stage has completed, which is replied by the RAID engine.

### Claim 16 (depends on 11)

The apparatus of claim 11, wherein the controller is arranged operably to: obtain first cargo flags associated with the virtual carrier from a routing engine; read second cargo flags associated with the virtual carrier from the SRAM; generate third cargo flags according to the first cargo flags and the second cargo flags; and determine whether the operation settings indicate that the first data associated with the virtual carrier need to go through the mid-end processing stage after determining that data associated with all cargos in the virtual carrier have completed a front-end processing stage or do not need to go through the front-end processing stage according to information carried in the third cargo flags.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the third cargo flags are a result of a logical OR operation on the first cargo flags and the second cargo flags, and all bits of the third cargo flags are “1”.

### Claim 18 (depends on 16)

The apparatus of claim 16, wherein the first data associated with the virtual carrier is obtained from the host side through a host interface (I/F) in the front-end processing stage.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the controller is arranged operably to: interact with the RAID engine to obtain an encrypted or encoded result from the RAID engine according to the first data associated with the virtual carrier in the mid-end processing stage.

### Claim 20 (depends on 18)

The apparatus of claim 18, wherein the controller is arranged operably to: interact with the data access engine to program the second data associated with the virtual carrier into a designated address in a flash module in the back-end processing stage.
