Skip to content

Conversation

@gautschimi
Copy link
Contributor

This commit adds the possibility to increase the fifo depth in the xbar to values > 1 to support multiple outstanding transactions.

Why this is beneficial:
The ibex instruction cache issues two 32b requests to the flash controller. Inside xbar_main a pipeline register is added to break the critical path to the flash. The pipeline register is added with a fifo of depth=1 for req and rsp data and effectively inserts a bubble after each request and response because the fifo is immediately full. Ibex and flash_ctrl can deal with up to 2 outstanding transactions.

The impact on performance is low because the instruction cache reads the critical word first and hides the additional latency that is inserted by the fifo with depth=1. Nonetheless, in phases with many cache misses, the performance can be improved at the price of an additional fifo entry.

This commit adds the possibility to increase the fifo depth in the xbar
to values > 1 to support multiple outstanding transactions.

Why this is beneficial:
The ibex instruction cache issues two 32b requests to the flash controller.
Inside xbar_main a pipeline register is added to break the critical path
to the flash. The pipeline register is added with a fifo of depth=1 for
req and rsp data and effectively inserts a bubble after each request and
response because the fifo is immediately full. Ibex and flash_ctrl can
deal with up to 2 outstanding transactions.

The impact on performance is low because the instruction cache reads the
critical word first and hides the additional latency that is inserted by
the fifo with depth=1. Nonetheless, in phases with many cache misses,
the performance can be improved at the price of an additional fifo entry.

Signed-off-by: Michael Gautschi <[email protected]>
@gautschimi gautschimi force-pushed the xbar_fifo_depth_support branch from 2972f23 to 40202d2 Compare November 28, 2025 10:57
@gautschimi
Copy link
Contributor Author

master:
image

Requests every 2nd cycle, 1 bubble after each request and response.

fifo_depth=2
image

Requests are granted in two cycles in a row to access a full cacheline. No more bubbles in between cacheline requests and responses

@gautschimi gautschimi marked this pull request as ready for review November 28, 2025 11:19
Copy link
Contributor

@vogelpi vogelpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good and it seems like a nice improvement!

Two questions:

  • Could you observe any performance improvement e.g. for CoreMark?
  • Shall we also enable this for Darjeeling (executes from a big SRAM but also has the I-Cache present)?

rsp_fifo_pass = True

# FIFO depth option. default is 1
# If pipeline is false or req/rsp_fifo_pass are true, this field has no meaning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the depth have no meaning if the either of the pass options are true? I guess it's just a limitation of the current implementation, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants