FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

SonicBOOMのデザインを読み解く (DispatcherとFrontendのReplay動作)

前回の解析で、イシューユニットで命令があふれてしまった場合にどのように動作するのかが解析できなかった。いくつか構成を変えて新しいコンフィグレーションを生成してみる。

StrangeBoomConfigという新しいコンフィグレーションを作ってその動作を確かめてみる。このコンフィグレーションには、整数の発行ユニットのエントリ数を5に絞っている。

+/**
+  * Strange BOOM.
+  */
+class WithStrangeBooms extends Config((site, here, up) => {
+  case BoomTilesKey => up(BoomTilesKey, site) map { b => b.copy(
+    core = b.core.copy(
+      fetchWidth = 8,
+      decodeWidth = 5,
+      numRobEntries = 130,
+      issueParams = Seq(
+        IssueParams(issueWidth=2, numEntries=24, iqType=IQT_MEM.litValue, dispatchWidth=5),
+        IssueParams(issueWidth=5, numEntries=5,  iqType=IQT_INT.litValue, dispatchWidth=5),
+        IssueParams(issueWidth=2, numEntries=32, iqType=IQT_FP.litValue , dispatchWidth=5)),
+      numIntPhysRegisters = 128,
+      numFpPhysRegisters = 128,
+      numLdqEntries = 32,
+      numStqEntries = 32,
+      maxBrCount = 20,
+      numFetchBufferEntries = 40,
+      enablePrefetching=true,
+      numDCacheBanks=1, // Duplicate the DCache. For Science
+      ftq = FtqParameters(nEntries=40),
+      fpu = Some(freechips.rocketchip.tile.FPUParams(sfmaLatency=4, dfmaLatency=4, divSqrt=true))),
+    dcache = Some(DCacheParams(rowBits = site(SystemBusKey).beatBytes*8,
+      nSets=64, nWays=8, nMSHRs=8, nTLBEntries=32)),
+    icache = Some(ICacheParams(fetchBytes = 4*4, rowBits = site(SystemBusKey).beatBytes*8, nSets=64, nWays=8, prefetch=true))
+  )}
+  case SystemBusKey => up(SystemBusKey, site).copy(beatBytes = 16)
+  case XLen => 64
+  case MaxHartIdBits => log2Up(site(BoomTilesKey).size)
+})
+

シミュレーション結果がこうなった。5サイクルに一度FetchバスのReady信号がAssertされているので、1命令発行されるたびに新たにイシューユニットに取り込まれているという感じだな。

f:id:msyksphinz:20210114014631p:plain

この辺のデザインのフローを確認してみよう。

f:id:msyksphinz:20210114014849p:plain