简体   繁体   English

生成具有不同缓存大小的RISCV火箭芯片

[英]Generating a RISCV Rocket Chip with different cache sizes

I am having problems changing parameters of the Rocket-Chip. 我在更改火箭芯片的参数时遇到问题。 I am trying to raise the number of sets for the L1 data and instruction cache. 我正在尝试增加L1数据和指令缓存的集合数。 I am following this description: http://riscv.org/download.html#tab_rocket 我正在关注此描述: http : //riscv.org/download.html#tab_rocket
The following codelines are the values I am trying to change in the file: Configs.scala which is located in the Rocket Chip Generator repository (rocket-chip/src/main/scala) 以下代码行是我要在文件中更改的值:位于Rocket Chip Generator存储库(rocket-chip / src / main / scala)中的Configs.scala

  knobValues = {
    case "NTILES" => 1
    case "NBANKS" => 1
    case "L1D_MSHRS" => 2
    case "L1D_SETS" => 64
    case "L1D_WAYS" => 4
    case "L1I_SETS" => 64
    case "L1I_WAYS" => 4
  }
)

Before I do any changes I can run the following command with no error: 在进行任何更改之前,我可以运行以下命令而不会出现错误:

make run-asm-tests

If I change LD1_SETS => 64 to LD1_SETS => 128 I get a lot of errors using the command above. 如果我将LD1_SETS => 64更改为LD1_SETS => 128 ,则使用上述命令会出现很多错误。

Do I have to set the Cache-Size somewhere different?? 我是否必须在其他地方设置Cache-Size?

Rocket uses a virtually-indexed, physically-tagged L1 data cache. Rocket使用虚拟索引的,带有物理标签的L1数据缓存。 Because of this, the size of a way must be less than the page size. 因此,方法的大小必须小于页面大小。 The errors you are seeing are caused by asserts to enforce this. 您看到的错误是由强制执行此操作的断言引起的。 To get around this, I recommend increasing the number of ways (not the number of sets), or increasing the size of L2 to compensate. 为了解决这个问题,我建议增加路数(而不是套数)或增加L2的大小来进行补偿。

This may seem like an odd requirement, but many processors have it. 这似乎是一个奇怪的要求,但是许多处理器都有它。 The L1 cache size is typically determined by the page size and the maximum associativity they can do without hurting the critical path. L1高速缓存大小通常由页面大小和在不损害关键路径的情况下可以执行的最大关联性决定。

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

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