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


Overall this looks pretty interesting.  Some minor quibbles below, but no major 
objections (other than the 'if hasattr()' stuff at the end).  I would like to 
see some examples of what a command-line setting looks like though to help me 
understand the enumerateParams() method and the ParamInfo class a little better 
though.


src/python/m5/SimObject.py
<http://reviews.gem5.org/r/2246/#comment4605>

    comment please?  i don't understand the condition here, or why it's elif 
and not a separate if



src/python/m5/SimObject.py
<http://reviews.gem5.org/r/2246/#comment4611>

    Should it live in params.py?  Seems like that would be more appropriate.  
Can it be folded in with ParamDesc?  



src/python/m5/SimObject.py
<http://reviews.gem5.org/r/2246/#comment4612>

    This seems kind of complicated, but I'm going to wait for a higher-level 
description of what it's doing before I dig into it.



src/python/m5/SimObject.py
<http://reviews.gem5.org/r/2246/#comment4606>

    this comment seems 90% redundant with the one above... if you just move the 
one line of code up under this one:
      self._values = multidict(ancestor._values)
    then I think it would be self-explanatory
    



src/python/m5/SimObject.py
<http://reviews.gem5.org/r/2246/#comment4607>

    this obviously parallels the if/elif above, except for the proxy check (is 
it correct to skip that here?)... and like above, it could use a comment



src/python/m5/params.py
<http://reviews.gem5.org/r/2246/#comment4608>

    this seems clunky... would it be easier to list the classes that *can't* be 
set on the command line?



src/python/m5/params.py
<http://reviews.gem5.org/r/2246/#comment4609>

    how does printing the entire map here help?  self.vals is the list of keys, 
I believe, which should be all that's relevant for this error message



src/python/m5/simulate.py
<http://reviews.gem5.org/r/2246/#comment4610>

    for all these 'if hasattr()' changes (here and below, and in simulate.py): 
seems like it would be much cleaner to make sure whatever dummy objects are 
being inserted into the config tree support dummy versions of these calls 
rather than add all these distributed checks all over the place. Maybe create a 
special DummySimObject class or something?  I don't fully understand the use 
case here or perhaps I could be more specific.


- Steve Reinhardt


On April 23, 2014, 5:22 a.m., Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/2246/
> -----------------------------------------------------------
> 
> (Updated April 23, 2014, 5:22 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 10198:f749128e94c8
> ---------------------------
> config: Add hooks to enable new config sys
> 
> This patch adds helper functions to SimObject.py, params.py and
> simulate.py to enable the new configuration system.  Functions like
> enumerateParams() in SimObject lets the config system auto-generate
> command line options for simobjects to be modified on the command
> line.
> 
> Params in params.py have __call__() added
> to their definition to allow the argparse module to use them
> as a type to check command input is in the proper format.
> 
> simulate.py is changed to allow for empty simobjects to exist in the hierarchy
> to allow a system to be built in parts to be stitched together later.
> 
> 
> Diffs
> -----
> 
>   src/python/m5/SimObject.py e40b35147270 
>   src/python/m5/params.py e40b35147270 
>   src/python/m5/simulate.py e40b35147270 
>   src/python/m5/stats/__init__.py e40b35147270 
> 
> Diff: http://reviews.gem5.org/r/2246/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andreas Hansson
> 
>

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

Reply via email to