Hi,
I am trying to pass a boolean as one of the params to the BaseCPU class from
the Options.py file. I have declared my boolean in the Options.py file as
parser.add_argument('--defense', action="store_true", default=False,
help="Enable defense") so that I could enable or disable from the cmd line.
In the BaseCPU.py file, I have added the boolean to pass to the BaseCPU class
defense = Param.Bool(False, "Whether to use Defense")
Finally, in the base.cc file in the constructor for BaseCPU, I used
params().defense and p.defense, but the value never changes to True. It's
always False.
Command to run Gem5 with my passed argument
run configs/example/se.py --cmd tests/test-progs/hello/bin/arm/linux/hello
--mem-size=4GB --cpu-type=DerivO3CPU --cpu-clock 2GHz --sys-clock 2GHz
--l1d_size 32kB --l1d_assoc 8 --l1i_size 32kB --l1i_assoc 8 --l2_size 2MB
--l2_assoc 16 --l2cache --caches --defense
I am not sure what I am doing wrong.
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s