Store signals in Module (as a dict)?
When starting to work a bit more actively on the code, I think it may make sense to store all signals in the Module. Probably as a dict {str: Signal}
. In this way, one will not have to define get_input_signals
etc locally and one can, if needed, get the "name" of the port in a unified way.
The idea is that all modules looks like now, but when calling super().__init__
, the dict is created.
This also means that we do not need to store the signals as class members explicitly, but can do self.get_input_signals()['foo']
(or self._input_signals['foo']
).
Maybe you have already considered this? Any pros and cons that you can think of before starting to refactoring the code?
Edited by Oscar Gustafsson