Hi Edward, 1) In configs/example/se.py or fs.py, you can directly manipulate the parameters. Find (CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options) And append CPUClass.branchPred.localCtrBits = 4
Note that FutureClass should be used instead of CPUClass if you're fast-forwarding or restoring from checkpoint. That is, if you're switching CPU, then FutureClass is your target. 2) You can control the assigned value (in thus example, 4) using configs/common/Options.py Just add your option in the function addCommonOptions like this: parser.add_option("--bpred-ctr", type="int", default=2) And reference the command-line passed value like this: CPUClass.branchPred.localCtrBits = options.bpred_ctr Best regards, Jae-Eon 2014-09-22 9:47 GMT+09:00 Edward HUANG via gem5-users <gem5-users@gem5.org>: > Hi there, > I'm new to gem5, and I'm now trying to analyze the influence of number > of bits in saturating counter for a branch predictor (for my course > project). > Is there any way to pass the number of bits as a parameters via command > line? Or I will have to hard coded it inside source files like > *src/cpu/pred/bi_mode.cc* or *src/cpu/pred/tournament.cc*? > > Edward ZILONG HUANG > MS@ECE department, Carnegie Mellon University > http://www.andrew.cmu.edu/user/zilongh/ > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users