m-labs / migen

A Python toolbox for building complex digital hardware
https://m-labs.hk/migen
Other
1.18k stars 211 forks source link

export as hierarchy (verilog modules) #70

Open jordens opened 7 years ago

jordens commented 7 years ago

I'd like to be able to translate the migen Module hierarchy into the exported HDL hierarchy at least to some extent.

Implementation idea:

whitequark commented 7 years ago

i.e. ensure that module inputs are not also assigned to from within a module and that internal Signals within a module are not accessed from the outside.

Right now I see the fact that I can manipulate signals without regard to module boundaries as a major feature of Migen (and I believe it's used in ARTIQ quite a bit, too). Do you suggest blanket prohibiting this, or just when exporting? In any case, splitting the Migen language into two like that seems troublesome...

jordens commented 7 years ago

No. This shouldn't touch existing code style or features at all. It's just an trade-off that one has to accept and deal with when exporting hierarchy. This will only give you the tools to do so.

mithro commented 6 years ago

@jordens Are you actively working on this at the moment or is this something you would just like to see in the future?

jordens commented 6 years ago

I would like to see it and don't have substantial progress.

phire commented 5 years ago

I think this can/should be done without requiring the user to specify a list of ios.

Just automatically infer them from how the module is used.

whitequark commented 5 years ago

Triage: fixed in nMigen.