Thanks Tao and Amin. I am able to add options, but I am not able to assign
it to numROBEntries. I mean when I use this in O3CPU.py:

numROBEntries = options.robsize

it doesn't work, since options module is not defined here. I tried
importing options, but still didn't work. Can you elaborate on how to do
this?

Thanks.


On Tue, Jul 16, 2013 at 9:32 PM, Zheng Wu <z...@uwaterloo.ca> wrote:

> Hi,
>
> I am also curious about how to create new options as well. The
> numRobEntries in O3CPU.py you mentioned has the following:
>
> "numROBEntries = Param.Unsigned(192, "Number of reorder buffer entries")"
>
> How is this related to options.robsize as mentioned?
>
>
> In addition, what if I were to add another data member to a class and want
> to use python options to set the value, what additional steps or procedure
> do i need to perform? Do I need to do anything with SWIG or something?
>
> Thanks,
> Zheng Wu
>
>
> On 2013-07-16, at 8:23 PM, Amin Farmahini <amin...@gmail.com> wrote:
>
> The last thing that Tao forgot to mention is to use options.robsize to set
> the value of numROBEntries (numROBEntries is defined in
> src/cpu/o3/O3CPU.py).
>
> Amin
>
>
> On Tue, Jul 16, 2013 at 5:06 PM, Tao Zhang <tao.zhang.0...@gmail.com>wrote:
>
>> Hi Mahshid,****
>>
>> ** **
>>
>> You can use the “add_option” to add any desired options in the command
>> line. To do this, you just add the line below (or something like it) at the
>> beginning of your fs.py. ****
>>
>> ** **
>>
>> parser.add_option("-rob", "--robsize", type="int", default=128,
>> help=”specify the rob size”);****
>>
>> ** **
>>
>> Then, after all options (including the default options and personalized
>> options) have been parsed (in other words, the variable ‘options’ is
>> initialized), you can simply leverage the option below.****
>>
>> ** **
>>
>> options.robsize****
>>
>> ** **
>>
>> After this, you can use the option in the command line, like****
>>
>> ** **
>>
>> gem5.opt configs/example/se.py --robsize=64 ……****
>>
>> ** **
>>
>> Note that if your option includes dash “-”, it will be converted into
>> underscore “_”. For example, “--rob-size” produces representative
>> “options.rob_size”. ****
>>
>> ** **
>>
>> Also, it is pretty helpful if you look at the Options.py to see how the
>> default options are added into the system. The file is in configs/common/.
>> ****
>>
>> ** **
>>
>> -Tao****
>>
>> ** **
>>
>> ** **
>>
>> *From:* gem5-users-boun...@gem5.org [mailto:gem5-users-boun...@gem5.org]
>> *On Behalf Of *Mahshid Sedghi
>> *Sent:* Tuesday, July 16, 2013 4:35 PM
>> *To:* gem5 users mailing list
>> *Subject:* [gem5-users] (no subject)****
>>
>> ** **
>>
>> Hello,****
>>
>> ** **
>>
>> I want to introduce a new option to the simulation script to define the
>> ROB size, since I am doing experiments with different ROB sizes and would
>> like to skip the procedure of rebuilding the gem5 again and again for
>> different ROB sizes. Basically, I need to do a similar thing as the thread
>> below:****
>>
>> ** **
>>
>> http://www.mail-archive.com/gem5-users@gem5.org/msg00480.html****
>>
>> ** **
>>
>> I am not still sure how to relate the option with the cpu parameters. I'd
>> appreciate it if someone can give me some hints.****
>>
>> ** **
>>
>> Thanks,****
>>
>> Mahshid****
>>
>> _______________________________________________
>> 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
>
>
>
> _______________________________________________
> 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

Reply via email to