简体   繁体   English

火箭芯片上的设置关联 TLB

[英]Set-associative TLB on Rocket Chip

I am trying to address if Rocket Chip Generator supports a set-associative TLB (both for L1 and L2 TLB) but I cannot find any straightforward code about that in RocketCore.scala or PTW.scala .我想地址,如果火箭队芯片Generator支持组关联TLB(都为L1和L2 TLB),但我无法找到有关的任何直接的代码RocketCore.scalaPTW.scala On the other hand changing the associativity of the Caches in HellaCache.scala is pretty straight-forward.另一方面,在HellaCache.scala更改缓存的关联性非常简单。

From my understanding L1 TLB is fully-associative and L2 TLB is direct-mapped.根据我的理解,L1 TLB 是完全关联的,而 L2 TLB 是直接映射的。

Is there a straightforward way to change the set-associativity of the TLB on Rocket Chip that I am missing?有没有一种直接的方法可以更改我缺少的 Rocket Chip 上的 TLB 的集合关联性? If not, are there any resources that you could provide in order to help me add these features in Rocket Chip?如果没有,您是否可以提供任何资源来帮助我在 Rocket Chip 中添加这些功能?

Thank you.谢谢你。

I implemented the configurable L1/L2 TLB on Rocket Chip myself, my code is upstream and merged in the official Rocket Chip repository .我自己在 Rocket Chip 上实现了可配置的 L1/L2 TLB,我的代码在上游并合并到官方Rocket Chip 存储库中

In order to change the associativity and size of the L1 TLB you can tweak nTLBSets, nTLBWays in /src/main/scala/rocket/HellaCache.scala (only power of 2 sets/ways are allowed for now).为了改变 L1 TLB 的关联性和大小,您可以调整nTLBSets, nTLBWays/src/main/scala/rocket/HellaCache.scala (目前只允许 2 组/路的幂)。

For the L2 TLB, you can tweak nL2TLBSets, nL2TLBWays in /src/main/scala/rocket/RocketCore.scala .对于 L2 TLB,您可以在/src/main/scala/rocket/RocketCore.scala调整nL2TLBSets, nL2TLBWays /src/main/scala/rocket/RocketCore.scala

I finally implemented an L1 TLB Generator on Rocket Chip myself, it is still a work in progress as some stuff like replacement policies and TLB flushing are not fully implemented, but it works! 我终于在我自己的Rocket Chip上实现了L1 TLB生成器,它仍在进行中,因为诸如替换策略和TLB刷新之类的某些东西尚未完全实现,但它可以正常工作!

It required many modifications and a bit of reverse-engineering (documentation and comments are sparse) that would take ages to explain in detail, so you can check it out here . 它需要进行许多修改和一些逆向工程(文档和注释稀疏),这需要花费很多时间才能详细解释,因此您可以在此处进行查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM