我想在Gshare中使用gem5。我已经找到了源代码和指令这里。不幸的是,GshareBP选项没有出现在gem5 5的分支预测器列表中。有什么想法吗?
发布于 2020-12-29 00:44:32
列表是从Python类生成的。作者忘记添加参数类的Python声明,所以您必须自己做。
例如,GShareBP需要参数localPredictorSize和localCtrBits,因此您需要添加以下类src/cpu/pred/BranchPredictor.py (这只是一个示例;我不知道参数的实际值):
class GShareBP(BranchPredictor):
type = 'GShareBP'
cxx_class = 'GShareBP'
cxx_header = "cpu/pred/gshare.hh"
localPredictorSize = Param.Unsigned(2048, "Size of local predictor")
localCtrBits = Param.Unsigned(2, "Bits per counter")您还需要通知必须编译gshare.cc (在src/cpu/pred/SConscript中):
Source('gshare.cc')这样做后,您将面临许多错误;该代码是为2014年的gem5编写的。
你可能还需要做的事情:
#include "params/GShareBP.hh"typedef GShareBPParams Params;添加到gshare.hhSatCounter重命名为SatCounter8有关更多信息,您可能会发现“学习gem5”一书很有帮助。
https://stackoverflow.com/questions/65484487
复制相似问题