amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Add `processes` variable to `main_runner`

Open cyber-murmel opened this issue 2 years ago • 1 comments

It would be nice to pass processes for simulation to the main runner. Maybe change the function signature to

def main_runner(parser, args, design, platform=None, name="top", ports=(), ports=(), processes=()):
    ...

and add to the main runner

        ...
        for process in processes:
            sim.add_sync_process(process)
        ...

This should add the functionality without breaking changes.

cyber-murmel avatar Mar 07 '23 22:03 cyber-murmel

The entire main_runner feature is poorly designed and should be redesigned, which is why I'd like to avoid adding featuers to it. However, at the moment there are no short term plans to redesign it.

I'll leave this issue open and marked with needs-rfc so that it can be used as input in a future redesign.

whitequark avatar Mar 07 '23 23:03 whitequark