# Why does CSR reads need three cycles?

**URL:** <https://forums.sifive.com/t/why-does-csr-reads-need-three-cycles/4559>\
**Category:** HiFive Unleashed\
**Created:** [March 23, 2021, 5:49am UTC](https://forums.sifive.com/t/why-does-csr-reads-need-three-cycles/4559 "2021-03-23T05:49:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewZhu](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@andrewZhu](https://forums.sifive.com/u/andrewZhu)\
**Post date:** [March 23, 2021, 5:49am UTC](https://forums.sifive.com/t/why-does-csr-reads-need-three-cycles/4559/1 "2021-03-23T05:49:04Z")

</div>

Hi,  
It’s mentioned in U540 manual:

> CSR reads have a three-cycle result latency.

So why does it take three cycles to read a CSR register? Thank you.

---

<div class="post-metadata">

**Author:** ![bruce](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/bruce/32/452_2.png) [@bruce](https://forums.sifive.com/u/bruce)\
**Post date:** [March 25, 2021, 12:11am UTC](https://forums.sifive.com/t/why-does-csr-reads-need-three-cycles/4559/2 "2021-03-25T00:11:15Z")

</div>

Because … CSR space is more similar in size and distance from the pipeline to L1 cache or DTIM than it is to CPU registers, so similar access time makes sense? Because … CSRs are read so seldom it’s not worth spending a lot of design effort and silicon on making that faster?

---

<div class="post-metadata">

**Author:** ![andrewZhu](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@andrewZhu](https://forums.sifive.com/u/andrewZhu)\
**Post date:** [March 25, 2021, 5:49am UTC](https://forums.sifive.com/t/why-does-csr-reads-need-three-cycles/4559/3 "2021-03-25T05:49:17Z")

</div>

Thanks for your reply’s.

In Rocket’s pipeline, the CSR’s reading and writing are executed in writeback phase. So I don’t know whether to read CSR in WB stage is to consider three cycles or to unify the process.
