Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1149
  • Last Modified:

How to test AHCI's CCC(Command Completion Coalescing) feature ?

Dear experts,
I have one question about the testing of AHCI's CCC(Command Completion Coalescing) function...

According to AHCI spec v1.3, chapter 11:
Command Completion Coalescing (CCC) is a feature designed to reduce the interrupt and command completion overhead in a heavily loaded system. The feature enables the number of interrupts taken per completion to be reduced significantly, while ensuring a minimum quality of service for command completions.

After reading the doc I setup a testing scenario:
1. Disable CCC_CTL.EN first(to update CCC_CTL.CC field)
2. Set CCC_PORTS = 0x00000001, indicating Port0 is part of the CCC feature
3. Set CCC_CTL.CC = 5, indicating the number of command completions that are necessary to cause a CCC interrupt
4. Set CCC_CTL.EN = 1 to enable this feature
5. Issue 5 FPDMA Write Queued commands to device and observe the IS.IPS(32bits)

* Assume CCC_CTL.INT = 6, indicating when CCC interrupt occurs IS.IPS[6] will be 1

My expected results will be:
Issue 1st command to device...
After command complete IS.IPS[6] = 0
Issue 2nd command to device...
After command complete IS.IPS[6] = 0
Issue 3rd command to device...
After command complete IS.IPS[6] = 0
Issue 4th command to device...
After command complete IS.IPS[6] = 0
Issue 5th command to device...
After command complete IS.IPS[6] = 1

But finally I found IS.IPS[6] = 1 immediately after 1st command is completed...!

Is the scenario correct  ?
0
liaoo
Asked:
liaoo
1 Solution
 
liaooAuthor Commented:
I found the reason why CCC interrupt generated immediately after 1st command completed in this scenario:

11.4 Interrupt Definition
The command coalescing completion interrupt, called the ‘CCC interrupt’, is generated on any of the following conditions:
• hCccComplete is greater than or equal to the value specified by software in CCC_CTL.CC and CCC_CTL.CC != 0
• hCccTimer is decremented to 0h. (The interrupt is generated on the decrement to 0h, not the decrement from 0h to -1.)
• hCccComplete is incremented and there are no more commands outstanding on the selected ports for command completion coalescing and CCC_CTL.CC != 0.
In my scenario software issues command one by one thus there is only 1 bit is "1" in PxCI[] each time...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now