hammer icon indicating copy to clipboard operation
hammer copied to clipboard

Ability to add the same hooks to all hierarchical modules

Open colinschmidt opened this issue 5 years ago • 2 comments

If my project needs to add hooks and is using a hierarchical flow I need to create a dictionary for all possible modules names. https://github.com/ucb-bar/hammer/blob/fcd92bd82b03f9128ab5fa51affc1fd198b674a1/src/hammer-vlsi/hammer_vlsi/cli_driver.py#L740 While the current scheme is powerful it doesn't allow me to specify hooks that should be added to all modules. Ideally a hybrid scheme would be best, perhaps using a dictionary entry like * to note which hooks should be applied to all modules.

colinschmidt avatar Feb 21 '20 02:02 colinschmidt

@colinschmidt - you could use get_extra_par_hooks for this.

However, doing this would also introduce a bug. If I have a level of hierarchy that needs to be not bound to the common par hooks, I can't override anymore.

harrisonliew avatar Feb 28 '20 05:02 harrisonliew

Yeah @harrisonliew, the bug you note is why I think we need some solution for this case of overridable defaults for hierarchical hooks.

colinschmidt avatar Feb 28 '20 16:02 colinschmidt