> On April 5, 2012, 2:30 a.m., Andreas Hansson wrote:
> > src/python/m5/params.py, line 642
> > <http://reviews.gem5.org/r/1129/diff/1/?file=25524#file25524line642>
> >
> >     Why not use getValue()?

I could, but adding the "__nonzero__" function makes things much more readable. 
 More importantly this patches fixes the bug where currently testing a bool 
prameter always evaluates to be true.  Without this change, the following code 
from review #1126 would not work correctly:

     if ruby_port.support_data_reqs: 
          tester.cpuDataPort = ruby_port.slave 
     if ruby_port.support_inst_reqs: 
          tester.cpuInstPort = ruby_port.slave 


- Brad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1129/#review2440
-----------------------------------------------------------


On April 4, 2012, 10:07 p.m., Brad Beckmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/1129/
> -----------------------------------------------------------
> 
> (Updated April 4, 2012, 10:07 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Description
> -------
> 
> Changeset 8931:ee5f54ce4140
> ---------------------------
> python: added __nonzero__ function to SimObject Bool params
> 
> 
> Diffs
> -----
> 
>   src/python/m5/params.py 570b44fe6e0430378a70155e9e265eeef9b031a2 
> 
> Diff: http://reviews.gem5.org/r/1129/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Brad Beckmann
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to