0
0
ARM Architectureknowledge~5 mins

AHB and APB bus overview in ARM Architecture - Time & Space Complexity

Choose your learning style9 modes available
Time Complexity: AHB and APB bus overview
O(n)
Understanding Time Complexity

We want to understand how the time to transfer data changes when using AHB and APB buses in ARM systems.

How does the bus design affect the speed as data size or requests increase?

Scenario Under Consideration

Analyze the time complexity of this simplified ARM bus transaction sequence.

// Simplified bus transaction sequence
START:
  READ DATA_FROM_AHB
  WRITE DATA_TO_APB
  CHECK IF MORE_DATA
  IF YES: LOOP TO START
  ELSE: END

This code shows reading multiple data units from the faster AHB bus and then writing to the slower APB bus.

Identify Repeating Operations

Look for repeated steps that take most time.

  • Primary operation: Loop reading data from AHB bus and writing to APB bus.
  • How many times: Once per data unit, depends on data size.
How Execution Grows With Input

More data means more reads from AHB and writes to APB.

Input Size (n)Approx. Operations
10About 10 reads + 10 writes
100About 100 reads + 100 writes
1000About 1000 reads + 1000 writes

Pattern observation: The total operations grow linearly with the number of data units.

Final Time Complexity

Time Complexity: O(n)

This means the time to complete transfers grows directly in proportion to the amount of data.

Common Mistake

[X] Wrong: "The APB bus speed does not affect overall transfer time because it is simpler."

[OK] Correct: APB is slower and each write takes time, so it adds up and affects total time linearly with data size.

Interview Connect

Understanding how bus speeds and repeated transfers affect performance helps you explain system bottlenecks clearly and shows you grasp real hardware behavior.

Self-Check

What if the APB bus was replaced with a faster bus? How would the time complexity change?