IP Library › Granted Patent US 12,326,808
Granted Patent B2
US 12,326,808 · App. 18/623,055 · Granted Jun 10, 2025

Flash memory controller and associated control method

Inventors: Kuo-Han Yuan (Hsinchu County, TW); Cheng-Yu Tsai (Kaohsiung, TW)
Assignee: Silicon Motion, Inc.
G06F12/0246
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,326,808
App. No.
18/623,055
Granted
Jun 10, 2025
Kind
B2
Abstract

The present invention provides a control method of a flash memory controller, which includes the steps of: setting a waiting time in an interrupt coalescing mechanism, and setting a timer, wherein a timeout value of the timer is equal to the waiting time; receiving multiple commands from a submission queue in a host device, generating multiple command responses after processing the multiple commands, and writing the multiple command responses to a completion queue in the host device; receiving a submission queue tail and a completion queue head from the host device; and when the timer reaches the timeout value, subtracting the completion queue head from the submission queue tail to obtain a queue depth of a command queue of the host device.

Claims (29)

1. A flash memory controller, wherein the flash memory controller is configured to access a flash memory module, and the flash memory controller comprises:

a read-only memory (ROM), configured to store a program code;

a microprocessor, configured to execute the program code to control access of the flash memory module;

wherein the microprocessor is configured to perform the steps of:

setting a waiting time in an interrupt coalescing mechanism, and setting a timer, wherein a timeout value of the timer is equal to the waiting time;

receiving multiple commands from a submission queue in a host device, processing the multiple commands to generate multiple command responses respectively, and writing the multiple command responses to a completion queue in the host device;

receiving a submission queue tail and a completion queue head from the host device, wherein the submission queue tail indicates how many commands the host device sends, and the completion queue head indicates how many command responses the host device has read from the completion queue;

when the timer reaches the timeout value, subtracting the completion queue head from the submission queue tail to obtain a queue depth of a command queue inside the host device; and

when the timer reaches the timeout value, sending an interrupt signal to the host device, wherein the interrupt signal is used to trigger the host device to read the multiple command responses from the completion queue.

2. The flash memory controller of claim 1 , wherein the waiting time in the interrupt coalescing mechanism is greater than a time required for the microprocessor to complete execution of multiple read commands or multiple write commands.

3. The flash memory controller of claim 1 , wherein the step of when the timer reaches the timeout value, sending the interrupt signal to the host device comprises:

sending the interrupt signal to the host device only when the timer reaches the timeout value; and before the timer reaches the timeout value, no interrupt signal is sent to the host device.

4. The flash memory controller of claim 1 , wherein the step of when the timer reaches the timeout value, subtracting the completion queue head from the submission queue tail to obtain the queue depth of the command queue inside the host device comprises:

when the timer reaches the timeout value, controlling a queue depth calculation circuit to subtract the completion queue head from the submission queue tail to obtain the queue depth of the command queue inside the host device.

5. The flash memory controller of claim 1 , wherein the microprocessor is further configured to perform the steps of:

controlling a time for the microprocessor to send the interrupt signal to the host device when processing subsequent commands based on the calculated queue depth of the command queue.

6. A control method of a flash memory controller, comprising:

setting a waiting time in an interrupt coalescing mechanism, and setting a timer, wherein a timeout value of the timer is equal to the waiting time;

receiving multiple commands from a submission queue in a host device, processing the multiple commands to generate multiple command responses respectively, and writing the multiple command responses to a completion queue in the host device;

receiving a submission queue tail and a completion queue head from the host device, wherein the submission queue tail indicates how many commands the host device sends, and the completion queue head indicates how many command responses the host device has read from the completion queue;

when the timer reaches the timeout value, subtracting the completion queue head from the submission queue tail to obtain a queue depth of a command queue inside the host device; and

when the timer reaches the timeout value, sending an interrupt signal to the host device, wherein the interrupt signal is used to trigger the host device to read the multiple command responses from the completion queue.

7. The control method of claim 6 , wherein the waiting time in the interrupt coalescing mechanism is greater than a time required for the flash memory controller to complete execution of multiple read commands or multiple write commands.

8. The control method of claim 6 , wherein the step of when the timer reaches the timeout value, sending the interrupt signal to the host device comprises:

sending the interrupt signal to the host device only when the timer reaches the timeout value; and before the timer reaches the timeout value, no interrupt signal is sent to the host device.

9. The control method of claim 6 , wherein the step of when the timer reaches the timeout value, subtracting the completion queue head from the submission queue tail to obtain the queue depth of the command queue inside the host device comprises:

when the timer reaches the timeout value, controlling a queue depth calculation circuit to subtract the completion queue head from the submission queue tail to obtain the queue depth of the command queue inside the host device.

10. The control method of claim 6 , wherein the microprocessor is further configured to perform the steps of:

controlling a time for the flash memory controller to send the interrupt signal to the host device when processing subsequent commands based on the calculated queue depth of the command queue.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 1, 2024
From: YUAN, KUO-HAN; TSAI, CHENG-YU
To: SILICON MOTION, INC.
Reel/Frame 066959/0334 →
Priority Claims (1)
TW 112113996 · Apr 14, 2023 · national
Continuity (1)
Related Publication 20240345950A1 · Oct 17, 2024
References Cited (8)
US 11249926B1 · Han · 2022 [cited by examiner]
US 11397699B2 · Benisty · 2022 [cited by examiner]
US 20130219088A1 · Rawe · 2013 [cited by applicant]
US 20170075834A1 · Cha · 2017 [cited by examiner]
US 20190278523A1 · Benisty · 2019 [cited by applicant]
US 20220156208A1 · Benisty · 2022 [cited by examiner]
CN 110659122A · 2020 [cited by applicant]
TW 202125270A · 2021 [cited by applicant]