> On Nov. 23, 2016, 3:17 p.m., Jason Lowe-Power wrote: > > src/cpu/pred/BranchPredictor.py, line 100 > > <http://reviews.gem5.org/r/3743/diff/2/?file=63759#file63759line100> > > > > Comment is now wrong. > > > > Also, does it make more sense to call this histBufferEntries (or > > histBufferBits) and make the default 2**21? (or would it be 2**21*8? <-- > > this is the confusion.) > > > > I think it would be more clear to use bits or entries, personally. But > > if the branch predictor papers usually talk about the history buffer in > > terms of bytes instead of bits, I guess the current version makes more > > sense. > > Nathanael Premillieu wrote: > This big buffer is just a software structure and it does not represent a > hardware one. > It is just done like this to simplify the management of the branch > history and avoid copying those bits too often. > The modeled hardware history is implemented as a sliding window on this > big buffer. > > Arthur Perais wrote: > In effect, the predictor will create an array of 2**21 entries, each > entry containing an uint8_t, so the buffer is indeed 2MB, even though it > contains 2Mbits of history information. As Nathanael pointed out, this is a > trick to avoid using a linked-list/deque which is more costly. The buffer is > much bigger than the actual history size to remove bound checks and > wrap-around adjustment that would be necessary with a circular buffer in > *most* places where it is accessed, at the cost of copying the whole history > from the beginning to the end of the buffer when the buffer is filled (so it > has to be big enough to amortize the cost of the copy). > > If you really think it should be changed to Param.Unsigned, I'll change > it. I'll wait for some input before posting the version with the correct > comment (my bad).
Yeah, I think it's much better to use an unsigned (int). Otherwise it's not clear whether this is the number of bits, or the number of entries, or something else. - Jason ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3743/#review9160 ----------------------------------------------------------- On Nov. 23, 2016, 2:52 p.m., Arthur Perais wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3743/ > ----------------------------------------------------------- > > (Updated Nov. 23, 2016, 2:52 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11707:1d085f66c4ca > --------------------------- > > cpu: implement an L-TAGE branch predictor > > This patch implements an L-TAGE predictor, based on André Seznec's code > available from > CBP-2 > (http://hpca23.cse.tamu.edu/taco/camino/cbp2/cbp-src/realistic-seznec.h). The > patch also changes the default branch predictor of o3 from the tournament > predictor > to L-TAGE. > > This patch requires patch #3727 (http://reviews.gem5.org/r/3727/) to compile. > > > Diffs > ----- > > src/cpu/pred/BranchPredictor.py 1d085f66c4ca > src/cpu/pred/SConscript 1d085f66c4ca > src/cpu/pred/ltage.hh PRE-CREATION > src/cpu/pred/ltage.cc PRE-CREATION > > Diff: http://reviews.gem5.org/r/3743/diff/ > > > Testing > ------- > > > Thanks, > > Arthur Perais > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
